Skip to content

Conversation

@chris-s-friedman
Copy link
Collaborator

@chris-s-friedman chris-s-friedman commented Dec 10, 2025

Set up GitHub Action to Export Repository Contents to MWAA S3 Bucket

Adds github action to trigger this action.

Also adds a tutorial DAG taken from the airflow documentation as a placeholder to show that a DAG can be deployed from the repo.

Closes D3B-2193

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality
    to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Ran this workflow and tested that it successfully triggers the indicated workflow.

Checklist

Please check all of the items below before merging this pull request. If an
item in the list below does not need to be completed, please indicate the
reason why.

  • I ensured that all tables have proper source and ref definitions
  • I Defined {{ config(schema=[schema name], tags = [list, of, tags]) }} at
    the start of each script
  • I have performed a self-review of my own code
  • I have checked my code and corrected any misspellings
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature
    works
  • My code follows the style guidelines of this project
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have committed any related changes to the PR
  • Run sqlfluff fix on tables that are created or modified in this PR.

Note that the dbt-related checks above are not relevant for this change because this is a change to a github action.

@chris-s-friedman chris-s-friedman changed the title 🚧 Testing the github action 🚧 D3B-2193 set up GHA to export repo to airflow Dec 10, 2025
🔒️ Add read permission to gha

🚧 Test another command

✨ Update sync to airflow

🚧 Testing to see if push of test dag works

✏️ Fix typo

🚧 Try now with an actual sectret

🚧 Testing blank bearwer token

🔐 Use include airflow pat

🧱 Don't trigger on pull request, only on push to main
@chris-s-friedman chris-s-friedman force-pushed the infra/cf/dbt-airflow-connection-d3b-2193 branch from 77c6046 to 8f41d7c Compare December 19, 2025 18:05

# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "main" branch

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove these comments

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed! good catch!

bash_command=templated_command,
)

t1 >> [t2, t3]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe comment what this does

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a docstring at the top of the script indicating what it does. Good idea!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this syntax of BashOperators do?

Copy link
Collaborator Author

@chris-s-friedman chris-s-friedman Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - are you asking about t1 >> [t2, t3]? That just says that t2 and t3 are both dependent on t1 running.

otherwise, that bashoperator:

t3 = BashOperator(
        task_id="templated",
        depends_on_past=False,
        bash_command=templated_command,
    )

instructs airflow to run the commands in templated_command, in this case

    {% for i in range(5) %}
        echo "{{ ds }}"
        echo "{{ macros.ds_add(ds, 7)}}"
    {% endfor %}

@chris-s-friedman chris-s-friedman marked this pull request as ready for review January 5, 2026 18:56
@chris-s-friedman chris-s-friedman merged commit d3604cc into main Jan 5, 2026
@chris-s-friedman chris-s-friedman deleted the infra/cf/dbt-airflow-connection-d3b-2193 branch January 5, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants