Modification of Excel data using data flow - Azure Synapse Analytics

Kakehi Shunya (筧 隼弥) 201 Reputation points
2022-10-24T09:29:57.84+00:00

I want to use Azure Synapse Analytics to modify an externally imported excel file, how can I achieve this using data flow?

There is an ID for each item above each item in the header.
How can I add this ID to the header?
Please see the attached image.
Any help would be appreciated.
Thank you.

253496-image.png
253466-image.png

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.
4,917 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,679 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 32,906 Reputation points Microsoft Employee
    2022-10-26T10:59:53.773+00:00

    Hi @Kakehi Shunya (筧 隼弥) ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your question here.

    Since the above source data that you have shared is not having a proper schema, we have to look into various possibilities. You can try the following workaround, however, it is still not the optimal solution as I have hardcoded the ItemId values to achieve the requirement. Kindly look at the following steps we can take in mapping dataflow:

    1. Add the source transformation pointing your dataset to the .xls file and import schema.

    254219-image.png
    2. Use Conditional split transformation with the below conditions:
    source0: !isNull(Column_1) and source1:isNull(Column_1)
    254289-image.png

    254294-image.png

    254325-image.png

    3. Add sink transformation with .csv dataset to both the sources.

    Now, create another dataflow , having source as the first source0.csv file. Make sure to select first row as header.
    254326-image.png

    4. Add derived column transformation to add the required ItemID columns.

    254341-image.png

    254306-image.png

    5. Add select transformation to sort the columns in proper desired order. Add sink transformation to load this data in another .csv file.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

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.