Dan Pham
Dan Pham

Reputation: 107

Create a dynamic path inside a yaml file

I have a yml file that contains a path for data source. Something like this:

data_source: s3://bucket/file.csv

I want to change the job to grab only the file with yesterday appended to the title, for example: file-2021-10-21.csv

so basically, something like this: data_source: s3://bucket/file-{yesterday}.csv

How can i define it in the yaml file? thanks!

Upvotes: 1

Views: 820

Answers (1)

ashish v
ashish v

Reputation: 11

You can have something like below, where all files defined under 'files' variable

data_source: s3://bucket/file-
files:
    - 2021-10-21.csv
    - 2021-10-21.csv

yml snippet

Upvotes: 1

Related Questions