Hi snehal dange ,
Welcome to Microsoft Q&A platform and thanks for posting your question here.
As I understand your query here, you are trying to run SQL queries via REST API or via SDK using Azure synapse analytics. Please let me know if that is not the ask here.
- You can store your SQL queries inside SQL scripts option in Develop tab and execute it directly in the Synapse workspace. Click here to know more about it.
- REST APIs mentioned here are to fetch the content of the SQL scripts, to create and update those scripts etc. , not to execute the scripts. In order to execute those scripts, you can pass on the result obtained to 'Script activity' or run a stored procedure in Synapse pipeline. Check out this thread for more details on how to do the same.
- You can use a serverless SQL pool to query data files in various common file formats, like CSV, JSON and parquet by using the following syntax:
SELECT TOP 100 * FROM OPENROWSET( BULK 'https://mydatalake.blob.core.windows.net/data/files/*.csv', FORMAT = 'csv') AS rows
For more details around the same , check this blog post: Query files using a serverless SQL pool
Hope it helps. Please do consider clicking
Accept Answer and
Up-Vote for the same as accepted answers help community as well