question

khouloudBelhaj-1789 avatar image
0 Votes"
khouloudBelhaj-1789 asked IBNHADJKhouloudCOLASDIGITALSOLUTIO-3407 answered

Migrating jobs on Sql agent to azure data factory

Hello the community,
The goal is to migrate a project that runs in production through SQL AGENT sequences and power shell scripts. The Purpose is to recover elements and save them in blob storage. I have access to the power shell file locally in my computer, which I am looking to have run these files in azure data factory. Any suggestions please ?
96345-capture33.png


azure-data-factoryazure-migrate
capture33.png (226.8 KiB)
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.

NandanHegde-7720 avatar image
0 Votes"
NandanHegde-7720 answered

Hey,
In case if you need to execute powershell scripts in Azure, you can use the below components:
1) Azure automation : wherein you can schedule your powershell run book similar to SQL jobs
2) In case if you need to execute the powershell scripts via Azure data factory, there is no direct way.
You would need to create an Azure function for Powershell wherein you would host your scripts and trigger the Azure function via https trigger through Azure data factory

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.

khouloudBelhaj-1789 avatar image
0 Votes"
khouloudBelhaj-1789 answered khouloudBelhaj-1789 commented

Hey,
Thanks for you answer.
Do you have documentation for your second proposition ? This will help me a lot!

· 2
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.

IBNHADJKhouloudCOLASDIGITALSOLUTIO-3407 avatar image
0 Votes"
IBNHADJKhouloudCOLASDIGITALSOLUTIO-3407 answered

@NandanHegde-7720 hey Nadan , I have tried to execute my script powershell with both methods. In fact, there is an issue while authentication via runbook to powerful BI. The same when I have tried to work with functions. I created a service principal and tried the active directory approach to make it work but unfortunately it failed. The reason why is the incompatibility issue between ADAL and powerful core as you can see in this post <<https://github.com/PowerShell/PowerShell/issues/10473>>;

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.