CurrentMonth/CurrentDay/Sysdate

Rohit Kulkarni 676 Reputation points
2021-09-29T07:35:04.387+00:00

Hello Team,

I am trying to extract the data from csv file from Blob storage and trying to load into synapse analytics. The Path :

https://BlobStorageName.blob.core.windows.net/global/ods/coastal/**2021/09/28**/Test.csv.

I need to mention the path like mentioned below .

https://BlobStorageName.blob.core.windows.net/global/ods/coastal/CurrentYear/CurrentMonth/CurrentDay/Test.csv.

Manually every time I can't go and select the path. Please advise.

Thanks in Advance
RK

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,415 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,346 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rohit Kulkarni 676 Reputation points
    2021-09-30T08:27:52.087+00:00

    Already i have mentioned in above comments .i am using the below comments :

    COPY INTO Table1
    FROM 'azure://BlobStorageName.blob.core.windows.net/global/ods/coastal/2021/09/28/Test.csv.'
    FILE_FORMAT = (TYPE = 'csv' FIELD_OPTIONALLY_ENCLOSED_BY = '"' RECORD_DELIMITER = '\n' SKIP_HEADER = 1 ) ON_ERROR='Continue';

    I need to make currentYear and Current Month and Current date i need to make Dynamic.

    0 comments No comments