If the contents of a column in the data match a certain condition, copy the same row data and add it to the same table.

林 和行 20 Reputation points
2023-08-08T06:02:55.0066667+00:00

I would like to dividing a Annual Sales Amount to rows by month.
So if the word "Annual" be in a column , I would like to copy the low 12 times (some times 24 times but it is next step)
I thougt that could do that by "ADF AlterRow Insert Row", but could not that with AlterRow method.

How can I divid a row under a same condition?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,443 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amira Bedhiafi 31,391 Reputation points
    2023-08-08T08:36:01.2166667+00:00

    Unfortunately,the transformations don't include a straightforward way to duplicate rows in a dataset based on a specific condition. You would usually handle such a transformation in the source query (if dealing with a database) or use a compute service like Azure HDInsight or Azure Synapse.

    If you're working with a SQL-based source, you could write a query that performs this transformation at the query level. This could involve using a Common Table Expression (CTE) or a combination of UNION ALL statements.


0 additional answers

Sort by: Most helpful

Your answer

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