Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aggiedan97
New Member

Azure Synapse reading csv file

Referring to Youtube video (https://www.youtube.com/watch?v=vOSzw40TohM) and attempting to utilze a csv file uploaded to Azure Blob/Gen2 datalake, and execute a SQL Script against a CSV file. Attempted many combinations to query but only returns the filename.

 

base query

SELECT
    TOP100 *
FROM
    OPENROWSET(
        FORMAT = 'CSV',
        FIELDTERMINATOR = ';',
        ROWTERMINATOR = '',
        PARSER_VERSION='2.0'
    ) AS [result]
 
Tried defining all the columns, data types, and data row start which should return 6 columns with 100k rows of data.
2 REPLIES 2
gdarakji
Resolver III
Resolver III

You can try to directly connect to this csv file from within Power BI. Open Power BI -> Get Data -> Azure -> Azure Data Lake Storage Gen 2 -> Put the URL of the CSV and then sign in. This should be the easiest and most straight forward way.

gdarakji_0-1621180680576.png

 

v-lionel-msft
Community Support
Community Support

Hi @aggiedan97 ,

 

OPENROWSET (Transact-SQL) - SQL Server | Microsoft Docs

Please refer to the link.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.