Hey
in addition to what Vedant has described, below blog explains it in detail w.r.t all scenarios :
https://www.serverlesssql.com/schema-versioning-in-serverless-sql-pools/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
I have a requirement wherein we are using azure synapse serverless tables to read appending csv files present in azure data lake.
The schema of the files is not constant and columns can be added or deleted from the newly created files.
How can we handle this scenario wherein we would be able to read old as well new files present in data lake in azure synapse serverless tables?
Hey
in addition to what Vedant has described, below blog explains it in detail w.r.t all scenarios :
https://www.serverlesssql.com/schema-versioning-in-serverless-sql-pools/
Hey Priya!
To handle the dynamic structure of files in Azure Synapse serverless, you can follow these steps:
OPENROWSET
function with the WITH (FORMAT='CSV')
option to handle schema drift. This allows the external table to read files with varying column structures.ETL Processes: If you require a more structured approach and need to transform the data before loading it into Azure Synapse, you can implement ETL (Extract, Transform, Load) processes using tools like Azure Data Factory or Azure Databricks. These tools provide more flexibility to handle schema drift and perform transformations on the data before loading it into the serverless SQL pool.
By following these steps, you can handle the dynamic structure of files in Azure Synapse serverless and read both old and new files present in Azure Data Lake. Remember to plan for schema drift, use flexible querying techniques, and consider implementing ETL processes if needed.