An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
Hi Harinath Reddy A,
Thanks for sharing the details — this is helpful.
Since your query is working fine in PySpark but failing from the SQL endpoint, this usually means the issue is not with the data itself, but with how the serverless SQL pool is trying to access your ADLS Gen2 storage.
The error you’re seeing:
“Query failed because of connection issues to control container or control container failure”
is commonly related to storage access, networking, or sometimes a temporary backend issue.
**
**What I’d suggest checking
1. Storage permissions
First, please make sure the SQL endpoint has proper access to your storage account:
- If you’re using Managed Identity → it should have at least Storage Blob Data Reader role
- If you’re using SAS or credentials → double-check that they are still valid and not expired
As a quick test, you can try querying the file directly using OPENROWSET. This helps confirm whether the SQL endpoint can actually reach the storage.
2. Storage networking settings
If your storage account has firewall rules or private endpoints enabled:
- Make sure “Allow Azure services” is enabled, or
- Verify that Synapse is correctly configured with Managed VNet / private endpoint access
3. External table / file path check
Since your tables are built on CSV files:
- Confirm the files are still present in the same location
- Ensure the path hasn’t changed
- Check if there were any recent changes to file format or schema
Since the query works in PySpark, the data and storage are healthy. The issue is isolated to the serverless SQL pool’s access path (permissions, networking, or transient service condition). Following the above steps should help resolve the problem.
Microsoft Documentation
- https://learn.microsoft.com/azure/synapse-analytics/sql/resources-self-help-sql-on-demand#query-failures
- https://learn.microsoft.com/azure/synapse-analytics/sql/develop-storage-files-overview
- https://learn.microsoft.com/azure/storage/common/storage-network-security
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
Please do not forget to "Accept Answer" and "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.