Search code examples
azure-synapsedelta-lake

How to query latest version of Delta Lake table in Azure Synapse?


How can we use Azure Synapse serverless SQL pool to query the latest version of Delta Lake table ??

Below link specifies it can be done under Delta Lake, but unable to find any examples:

https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/resources-self-help-sql-on-demand#delta-lake

"You can use serverless SQL pool to query the latest version of Delta Lake"

Thanks!


Solution

  • The documentation for querying Delta tables in Synapse Serverless SQL is here. Basically the syntax looks like:

    SELECT TOP 10 *
    FROM OPENROWSET(
        BULK 'https://sqlondemandstorage.blob.core.windows.net/delta-lake/covid/',
        FORMAT = 'delta') as rows;