How do you access the Airflow CLI/API/DB in Workflow Orchestration Manager?

aeteq 0 Reputation points
2024-07-03T10:33:38.4866667+00:00

Working with Airflow, one often requires access to the Airflow CLI/API or even access to the underlying meta database. For example:

  • to import or export connections
  • start backfills
  • manage Variables (using scripts)
  • manage DB items that are not accessible from the UI

How would you go about doing that in WOM?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,681 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Smaran Thoomu 15,765 Reputation points Microsoft Vendor
    2024-07-11T07:46:02.18+00:00

    Hi @aeteq

    Thank you for providing more context on what you're trying to achieve with the Airflow CLI, API, or database access in WOM. I understand that you need to perform various operations such as importing/exporting connections, starting backfills, managing variables, and accessing the database.

    Unfortunately, WOM doesn't provide direct shell access to the Airflow instance, and the Airflow CLI is not directly accessible. Additionally, the Airflow API is not openly available for authentication.

    However, I'd like to explore alternative solutions with you. Since WOM is a managed service, we can look into using WOM's built-in features or APIs to achieve your goals. Regarding database access, WOM provides a managed database service, and direct database access is not possible. However, you can use WOM's built-in features to export and import database data.

    If there are specific use cases that are not covered by WOM's built-in features, you can also share the feedback on our feedback channelWhich would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

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


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


  3. aeteq 0 Reputation points
    2024-07-17T14:05:59.9+00:00

    I found a workaround for the CLI part: You can use a specialized DAG with a BashOperator to execute airflow CLI commands. You can find an example backfill DAG here: https://github.com/mozilla/telemetry-airflow/blob/main/dags/backfill.py


  4. Smaran Thoomu 15,765 Reputation points Microsoft Vendor
    2024-07-17T14:34:16.23+00:00

    Hi @aeteq

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: Working with Airflow, one often requires access to the Airflow CLI/API or even access to the underlying meta database. For example:

    • to import or export connections
    • start backfills
    • manage Variables (using scripts)
    • manage DB items that are not accessible from the UI

    How would you go about doing that in WOM?

    Solution: I found a workaround for the CLI part: You can use a specialized DAG with a BashOperator to execute airflow CLI commands. You can find an example backfill DAG here: https://github.com/mozilla/telemetry-airflow/blob/main/dags/backfill.py

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    I hope this helps!

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.