Question
You want to filter your files with a regex that needs to match using the start of string character ^
, but why is this not working as expected?
Environment
Connector: File connectors
Answer
Use the forward-slash character /
as if it was the beginning of the string for the filename;
Correct:
Filename: my-awesome-table-file.csv
Regex: \/my-.*file\.csv$
Meaning: All files that contain /my-
and end in file.csv
Incorrect:
Filename: my-awesome-table-file.csv
Regex: ^my-.*file\.csv$
Meaning: All files starting by my-
and ending by file.csv
Cause
The files are uploaded to a server before Fivetran ingests them. When analyzing the paths for regex, the full path is taken into account for the match. The matching string is temp-folder/my-awesome-table-file.csv
, instead of just your filename my-awesome-table-file.csv