I am using Azure Blob Storage Load to load the data from csv file in blob to Snow flake table
1. I am not able to truncate and load the table, please let us know which option to select for truncate and load. 2. Source file in blob will be placed into different date folders created one per each day. So how to direct the component to go and read the file in folder created with latest date\today's date.
1 Community Answers
Veronica Kupetz —
Thanks for contacting support. Have you created the table in Snowflake by using the Create Table Component? In that component, there is an option in the properties to replace the table in “Create/Replace”. Another option is to use a SQL Script component prior to your Azure Blob Storage Load component. In that SQL component, you can add the truncate sql query to truncate the table prior to the load.
The use of job variables will be helpful for your second question. You can set a new job variable for the current_date and then use a Python Script component to get the current date by importing the datetime module and update the job variable with the current date retrieved via Python. This variable can then be referenced in the Azure Blob Storage Load for the storage location. Here is a link to additional information on Variables. Hope this helps out!