Snowflake ext table with pattern case sensitive
Question:
create or replace external table table_namewith
location = @abc/corpfiles
pattern = '.folder1/subfolder/..csv$'
auto_refresh = true
file_format = (Type=CSV,field_optionally_enclosed_by = '"');
Above ext table works fine but when file extension is uppercase such as abc.CVS then it doesn’t work. abc.csv works fine. How to account for case sensitivity here. Any help?
Snowflake ext table case sensitive with pattern
Answers:
PATTERN is a regex:
[ PATTERN = ‘<regex_pattern>’ ]
Thus you should be able to use:
pattern = '.folder1/subfolder/..[cC][sS][vV]$'
to cover the variants
create or replace external table table_namewith
location = @abc/corpfiles
pattern = '.folder1/subfolder/..csv$'
auto_refresh = true
file_format = (Type=CSV,field_optionally_enclosed_by = '"');
Above ext table works fine but when file extension is uppercase such as abc.CVS then it doesn’t work. abc.csv works fine. How to account for case sensitivity here. Any help?
Snowflake ext table case sensitive with pattern
PATTERN is a regex:
[ PATTERN = ‘<regex_pattern>’ ]
Thus you should be able to use:
pattern = '.folder1/subfolder/..[cC][sS][vV]$'
to cover the variants