Share via

How to add derived column using synapse dataflow where source is azure sql and sink is workspace db (synapse delta table)

Heta Desai 357 Reputation points
2022-08-08T17:15:02.687+00:00

I have created dataflow where source is Azure SQL Server. I need to add the derived column and load data into workspace DB. I am following metadata driven approach in which the select query for source to pull the data from data source, sink database name and sink table name is stored in azure sql table. Using pipeline lookup activity I am reading the metadata and inside for each loop the dataflow will be executed to which parameters are passed.

Here is the error :

Operation on target ForEach failed: Activity failed because an inner activity failed; Inner activity name: DataFlow_SourceToLanding, Error: {"StatusCode":"DFExecutorUserError","Message":"Job failed due to reason: at Sink 'sink1': org.apache.spark.sql.AnalysisException: The column number of the existing table default.phaseone(struct<>) doesn't match the data schema(struct<Id:int,Name:string,ETLId:string>);","Details":"org.apache.spark.sql.AnalysisException: The column number of the existing table default.phaseone(struct<>) doesn't match the data schema(struct<Id:int,Name:string,ETLId:string>);\n\tat

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.

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


1 answer

Sort by: Most helpful
  1. MarkKromer-MSFT 5,231 Reputation points Microsoft Employee Moderator
    2022-08-09T07:41:14.167+00:00

    When you've selected None for the table action, then the schemas must match. If the schema differs from the database you've already defined as the Workspace DB, you'll need to recreate the table or create a new table.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.