Trigger a Python Tool via Azure automation

Nandan Hegde 29,886 Reputation points MVP
2022-02-04T14:42:57.62+00:00

Hello All,

I have a below scenario which I am currently doing manually:

  1. Install DBT tool (python) in my system :
    https://www.getdbt.com/

2) Clone a repo in my system which contains the code that needs to be executed by the tool (DBT)
3) Trigger the tool via command line (CLI)
https://docs.getdbt.com/reference/dbt-commands

example : we have a command like dbt run -- model1

Now I need to automate it in Upper environments and able to parameterise certain aspects like be able to execute commands based on parameters :
dbt run -- <<Parametername>>

Is it possible to install the python package, clone Git Repo and execute CLI commands at run time via Azure automation or having some powershell code via VM

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,111 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 11,551 Reputation points
    2022-02-09T13:58:51.243+00:00

    @Nandan Hegde - Thanks for reaching out and for being patient.

    Hybrid workers would be the solution here. You can setup a machine which does the stuff and execute the commands using python or PowerShell runbook.

    For more information on

    1. How to install the Hybrid worker, please take a look at this document: automation-hybrid-runbook-worker
    2. Run automation runbook on hybrid worker: automation-hrw-run-runbooks

    Hope this helps.

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

    If the above response was helpful, please feel free to "Accept as Answer" so it can be beneficial to the community.

    0 comments No comments