External Tables and Polybase in Synapse and Sql Server

Karl Gardner 65 Reputation points
2024-05-17T21:19:29.67+00:00

So, I thought I knew external tables well in azure but I was reading about external tables with Sql Server: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-external-table-transact-sql?view=sql-server-ver16&tabs=dedicated

and it seems it uses polybase to actually transfer the data. I am wondering if the whole concept of external tables is around using Polybase to actually transfer the data? So basically querying from an external table with an external datasource and scoped credentials use polybase on the backend with sql server, synapse serverless and dedicated sql pool?

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,503 questions
{count} votes

Accepted answer
  1. BhargavaGunnam-MSFT 27,976 Reputation points Microsoft Employee
    2024-05-17T21:39:10.08+00:00

    Hello Karl Gardner,

    Welcome to the Microsoft Q&A forum.

    The concept of external tables in SQL Server is closely tied to PolyBase, which is a technology that allows you to query non-relational data stored in Hadoop or Azure Blob Storage using T-SQL. The external table defines the structure of the data and the location in the external data source. When you query an external table, SQL Server uses PolyBase to execute the query against the external data source.

    PolyBase does not transfer the data into SQL Server; instead, it processes the query and returns only the results. This means that the data remains in its original location, and only the data is retrieved by the query. This approach allows for a form of data virtualization, where you can integrate and query data across different data stores.

    In the context of Azure Synapse Analytics, Serverless SQL pools in Azure Synapse Analytics support a native data virtualization technology, while dedicated SQL pools support both native and PolyBase data virtualization.

    When you query the external table, PolyBase is used to retrieve the data from the external data source and return it to the database. You can use standard SQL queries to query the external table, and the results are returned as if they were stored in the database.

    also you can use scoped credentials to securely access the external data source. Scoped credentials are used to authenticate the connection to the external data source and are stored in the database.

    I hope this answers your question. Please let me know if you have any further questions

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful