You can translate the question and the replies:

Dynamic Path for Custom S3 Wrapper

I have a backup file that is time stamped like this each day: GDW_08-30-2021.csv The current path to reference this file in the custom wrapper via AWS S3... looks like this: /gdw_backup/GDW_08-30-2021.csv is there a way to embed a caclulated value in the path field that will always look for a file that is 7 days before today? so for example it should reference the file /gdw_backup/GDW_08-23-2021.csv instead if I was to pull the job today. Any suggestions would be appreaciated. We have a custom wrapper that is working for our authentication so I can't set up a new wrapper.

2 Answers

Hi, In order to get the FilePath for Custom S3 Wrapper dynamically, I would use [interpolation variables](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) in the path of the base view. By using the interpolation variable, you do not have to provide the final path value when creating the base view. Instead, the values of the path parameter will be provided at runtime. You can have a look at the section **Extending capabilities with the DFSListFilesWrapper** of the [Denodo Distributed File System Custom Wrapper](https://community.denodo.com/docs/html/document/denodoconnects/8.0/en/Denodo%20Distributed%20File%20System%20Custom%20Wrapper%20-%20User%20Manual#h.kz04u3ofiwz) for more information. If you still need help and you have a valid support user account, please open a new support case at [Denodo Support site](https://support.denodo.com/) so that our Support Team will assist you. Hope this helps!
Denodo Team
31-08-2021 08:42:53 -0400
Thanks this worked: I used the following variable in my baseview /gdw_backup/GDW_@{backupdate}.csv and was able to create a view that used query like this (to get file from a week ago): SELECT * from ds_ctigeneral_s3_gdw_backupdate where backupdate = Formatdate('MM-dd-yyyy',addday(CURRENT_DATE(), -7))
user
31-08-2021 09:05:29 -0400
You must sign in to add an answer. If you do not have an account, you can register here