question

JeffvG-0844 avatar image
0 Votes"
JeffvG-0844 asked PRADEEPCHEEKATLA-MSFT commented

Viewing Dataflow Script in Visual Studio 2019

When opening large dataflows' JSON files in Visual Studio 2019, the script field is a long string with \n and \t characters, and very difficult to edit in an efficient way. How does the Azure team suggest people use Azure DevOps Repos and VS to view and edit these dataflow scripts?

https://docs.microsoft.com/en-us/azure/data-factory/data-flow-script

vs-generalazure-synapse-analytics
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PRADEEPCHEEKATLA-MSFT avatar image
0 Votes"
PRADEEPCHEEKATLA-MSFT answered PRADEEPCHEEKATLA-MSFT commented

Hello @JeffvG-0844,

Thanks for the question and using MS Q&A platform.

Generally we do view Dataflow script in Azure Data Factory portal. It is not recommended to use Azure DevOps Repos and VS to view and edit these dataflow scripts directly.

Note: Script snippets are shareable code of Data Flow Script that you can use to share across data flows.

An eight minute video on usage of Data Flow Scripts in ADF: https://www.microsoft.com/en-us/videoplayer/embed/RE4tA9b

When you build a data flow script to use with PowerShell or an API, you must collapse the formatted text into a single line. You can keep tabs and newlines as escape characters. But the text must be formatted to fit inside a JSON property. There is a button on the script editor UI at the bottom that will format the script as a single line for you.

110271-adf-dfs.gif

If you want to view the Dataflow script in Visual Studio 2019:

Step1: Open DataFlow Script and copy the JSON content.

Step2: Open Visual Studio 2019 and create a new JSON file and paste the DataFlow script.

110236-adf-dfsvs.gif

Hope this helps. Do let us know if you any further queries.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


adf-dfs.gif (1.9 MiB)
adf-dfsvs.gif (1.2 MiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@PRADEEPCHEEKATLA-MSFT thanks for your response. if you don't recommend viewing the scripts directly in VS, and the video you reference shows manual extension (copy and paste in the UI) of a data flow, does that mean there is not currently a way to think about writing these data flows programmatically in an editor? I am hoping to extend the logic in a fairly large script - including mapping column names based on the type of file the script is used for - and use DevOps to deploy these data flows to Data Factory. Is there a recommended templating work flow or method that I can use? The most time consuming task I am hoping to save myself is renaming those columns and using the cumbersome drag-and-drop dots on the column ordering in the Projection transform settings.

0 Votes 0 ·

Hello @JeffvG-0844,

As you are looking for viewing and editing Dataflow Script in Visual Studio 2019, that's the reason - I had provided the above method to copy and paste in the UI.

Unfortunately, there is no specific tool to view or edit DFS.

Note: We do view Dataflow script in Azure Data Factory portal and Script snippets are shareable code of Data Flow Script that you can use to share across data flows in ADF portal.

Hope this helps. Do let us know if you any further queries.

0 Votes 0 ·

Hello @JeffvG-0844,

Just checking in to see if the above answer helped. If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·