question

sakuraime avatar image
0 Votes"
sakuraime asked HimanshuSinha-MSFT commented

Azure synapse external table definition

how to view the definition (especially the path/datatype/format) of the external table ?

78249-image.png


azure-synapse-analytics
image.png (17.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You want to generate scripts for create external table in SQL Pool? Did you try it in SSMS?

I don't have SQL pool to test as it is too costly :(

0 Votes 0 ·

Hello @sakuraime ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

0 Votes 0 ·

1 Answer

serverlesssql avatar image
1 Vote"
serverlesssql answered

Hi,

If this is for Serverless SQL Pools then you can use the following DMVs:

 select * from sys.external_tables
 select * from sys.external_file_formats
 select * from sys.external_data_sources
    
 select et.name as TableName,
 et.location as TableLocation,
 ef.name as FileFormatName,
 ef.format_type as FileFormatType,
 es.name as DataSourceName,
 es.location as DataSourceLocation
 from sys.external_tables et
 inner join sys.external_file_formats ef on ef.file_format_id = et.file_format_id
 inner join sys.external_data_sources es on es.data_source_id = et.data_source_id
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.