-
Notifications
You must be signed in to change notification settings - Fork 0
🚧 D3B-2193 set up GHA to export repo to airflow #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚧 D3B-2193 set up GHA to export repo to airflow #7
Conversation
🔒️ 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
77c6046 to
8f41d7c
Compare
|
|
||
| # Controls when the workflow will run | ||
| on: | ||
| # Triggers the workflow on push events but only for the "main" branch |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 %}
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.
to not work as expected)
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.
the start of each script
works
sqlfluff fixon 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.