How to update CSV file placed at Blob Storage in Azure.

amit srivastava 21 Reputation points
2021-11-22T08:39:23.543+00:00

Hi Folks!!

I have Blob Storage in Azure that holding CSV file, structure of CSV is ColA, ColB , ColC.

Requirement is to update all the value of ColB of CSV file to NULL which is placed at storage account (Blob Storage).

Please assist how to do that.

ADF will be my preference.

Thanks & Regards
Amit

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,449 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,651 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,381 Reputation points Microsoft Employee
    2021-11-22T23:17:13.207+00:00

    Hello @amit srivastava ,
    Thanks for the ask and using Microsoft Q&A platform .
    I think mapping data flow is the ideal for this use case . Anyways I think we can achieve this using ADF also , but then you will have to make some sacrifices , the column which needs to be set will show at the end .

    Here is the logic .

    1. Use copy activity and copy all the records from say main.csv to staging to csv and exclude the column( lets say col2 ) which needs to be set to NULL .
    2. Use one more copy activity and now set the source as staging .csv as source and in the source tab set the additional column and set it as shown below .

    151584-image.png

    The output should be something like

    151623-image.png

    Please do let me know how it goes .
    Thanks
    Himanshu

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

    • 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