Search⌘ K

Running Our Dataflow

Explore how to run PowerShell scripts inside Azure Data Studio notebooks to implement dataflows. Understand setting parameters, executing scripts safely, and integrating extraction and loading with transformation to build ELT pipelines.

Running the PowerShell script in a notebook

Now, we should be all set to run the PowerShell script. We’ll start by creating a notebook (Alt+Windows+N) and selecting the PowerShell Kernel.

Note: If you need a refresher on using ADS Notebooks, please review Getting Things Done with Notebooks

Next, create a text cell and enter the following markdown:

Markdown
# Copy Table Example

Then, create a code cell and enter the following PowerShell script:

C++
$src_conn = "Server=localhost;Database=car_crash;Integrated Security=True;"
$dest_conn = "Server=localhost;Database=test;Integrated Security=True;"
$src_sql_command = "SELECT * FROM edw.D_TIME"
$dst_schema = "dbo"
$dst_table = "D_TIME"
$dest_truncate = "Y"
pwsh -file "c:\hands-on-ads\simple_dataflow.ps1" -src_conn $src_conn -dest_conn $des\
t_conn -src_sql_command $src_sql_command -dst_schema $dst_schema -dst_table $dst_tab\
le -dest_truncate $dest_truncate

If all has gone well, your notebook should look a lot like the one below:

The Notebook file can also be ...