All Questions
Tagged with snowflake-cloud-data-platform regex
129
questions
0
votes
0
answers
35
views
Handling Large Batches of Snowflake schemas with Github Actions
Within a Github Actions workflow, I am trying to create batches of snowflake schemas by:
calling a python script from a GH Actions step
fetching a list of schemas with SHOW SCHEMAS; from the python ...
0
votes
1
answer
72
views
How to remove special character without knowing the type of special character?
I am using snowflake and I am parsing an email message for a certain field. I found that only 2 records have a whitespace in the front. I have used trim, tried various types of char replace (9,10,13,...
0
votes
2
answers
79
views
regular expression with regexp_like is not working in snowflake
SELECT
'HAB' AS NAME,
CASE
WHEN REGEXP_LIKE(LIST_TXT, '(^|,)201(,|$)') THEN 'YES'
END AS MC_NM
FROM TABLE1
)
SELECT * FROM HAB;
my reg expression works as ...
0
votes
0
answers
89
views
Regex to split out json objects and key values from field in Snowflake table
I have json objects inside a VARCHAR field in Snowflake and would like to extract each resource and the actions that can be applied in another column ideally represented like key and values in ...
1
vote
0
answers
86
views
snowflake File_Format to remove double quotes from txt file and load to snowflake which also has a column with Json data
I have a txt file with pipe demilited data.
One of the column has a json value like below.
"Failure: {"errors":[{"message":"Does not contain a valid address.","...
0
votes
3
answers
59
views
Regex to Exclude records which does not have any vowels on Snowflake not working
I am trying for a regex function to exclude the records which does not have a vowel in it. Similar way to remove records which does not have consonant in it. It looks like the regular regex is not ...
2
votes
3
answers
132
views
regex split string into consecutive letter pairs (not recurring)
I'm struggling to figure out how to generate a series of consecutive letter/character pairs from a string, incrementing over each letter. i.e. "FOOBARBAZ" should find:
[ "FO", &...
-1
votes
6
answers
310
views
Snowflake-How to filter out numbers whose digits are all the same?
I am trying to filter out numbers whose all digits are the same- like '000000000','111111111111',etc..
I am hoping it could be done using REGEXP_LIKE in snowflake.
But it is not working.
These are the ...
0
votes
2
answers
363
views
dbt: regular expression to pick numeric value from text
I am doing transformation using dbt (connected to snowflake). I have a column in a table which contains textual and numeric information. I want to extract the numeric values from the text. Following ...
0
votes
2
answers
298
views
Snowflake INSTR
I am trying to extract the values in a string before the last ~ and first ~ using Snowflake
For example:
‘jjjjj~hhhhh-iiiiii~jklmn~abc’
‘ftgftr~hhhhhiiiiii~jklmn~trf’
‘fgfgf~hhhhhiiiiii~fgfgf~tddrf’
...
0
votes
1
answer
37
views
Does REGEX_SUBSTR have a maximum return size in Snowflake?
Does regex_substr in SNowflake (or in general) have a maximum return length or byte value? I have a very large field in a Snowflake table and I want to extract individual fields from it, for example
...
-3
votes
1
answer
219
views
Snowflake: Regex for text between the last slash and dot?
If I have the string:
test_stage/parquet_location/9f7d37fd-7039-4454-94ef-2b0cd6c3206a_b1df97ad-54dc-4fc9-a099-1fb9cd6530be_custom_1696963985.parquet
How do I write a regex that will match the text ...
0
votes
1
answer
234
views
Text cleanup in snowflake
I have a column in a table that contains data about any updates related to changes about a company in the below format -
#=============#==============#================#
| Company ID | updated_at | ...
0
votes
1
answer
155
views
Regex for extracting text in URL between a constant start position until the immediate next slash or the end of the string
Trying to extract text using Snowflake’s REGEX_SUBSTR() function. I have a working solution using CASE WHENs to handle for the different scenarios, but I’d love a cleaner solution if one exists
These ...
0
votes
0
answers
56
views
Query works when ran in SNOWFLAKE UI but when ran through a Stored Procedure. It gives Null records. What needs to be done?
This is the SNOWFLAKE QUERY which I want to run through Stored Proc.
REGEXP_SUBSTR(INTERNET_ADDRESS,
'[A-Z0-9\\!\\#\\$\\%\\&''\\*\\+\\/\\=\\?\\^\\_\`\`\\{\\|\\}\\~\\,\\-]+([\\.]?[...