Skip to content
Advertisement

Tag: snowflake-cloud-data-platform

SnowflakeSQL get me last text after specific char

I’m trying to retrieve last part of string after underscore.. but every record has different number of underscore and I’m not sure how to write it correctly. Example: aaa_bb_cccc_dddd_ee – only ee aaa_bb_cccc_dddd – only dddd sss_aas_ww_ww_ww_bb – only bb As you can see there is different number of underscore and I need only last part after last underscore. I

How to Convert Array or String in Snowflake to Timestamp_NTZ

I currently have some incoming datestamps as from outside datasource, but am struggling to define them in a table through my Snowflake Tables. The column is formatted as such: {“type”:”TEXT”,”length”:12,”byteLength”:48,”nullable”:true,”fixed”:false} The only current workaround I have is this convoluted code. Any suggestions to convert string to integer for timestamp? Answer Assuming the format of input ‘YYMMDDHH24MISS’ and first 22 stands

Advertisement