Skip to content

Commit

Permalink
Update airflow-and-dbt-cloud to new repo (#6064)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

* Updating to our own dbt maintained repo.

Note that Leah will update the videos next week.

## Checklist
- [ ] I have reviewed the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] The topic I'm writing about is for specific dbt version(s) and I
have versioned it according to the [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and/or [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content)
guidelines.
- [ ] I have added checklist item(s) to this list for anything anything
that needs to happen before this PR is merged, such as "needs technical
review" or "change base branch."
<!--
PRE-RELEASE VERSION OF dbt (if so, uncomment):
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
<!-- 
ADDING OR REMOVING PAGES (if so, uncomment):
- [ ] Add/remove page in `website/sidebars.js`
- [ ] Provide a unique filename for new pages
- [ ] Add an entry for deleted pages in `website/vercel.json`
- [ ] Run link testing locally with `npm run build` to update the links
that point to deleted pages
-->
  • Loading branch information
runleonarun authored Sep 13, 2024
1 parent cac766a commit b3405a7
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions website/docs/guides/airflow-and-dbt-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Follow the instructions [here](https://docs.docker.com/desktop/) to install Dock

## Clone the airflow-dbt-cloud repository

Open your terminal and clone the [airflow-dbt-cloud repository](https://github.com/sungchun12/airflow-dbt-cloud). This contains example Airflow DAGs that you’ll use to orchestrate your dbt Cloud job. Once cloned, navigate into the `airflow-dbt-cloud` project.
Open your terminal and clone the [airflow-dbt-cloud repository](https://github.com/dbt-labs/airflow-dbt-cloud). This contains example Airflow DAGs that you’ll use to orchestrate your dbt Cloud job. Once cloned, navigate into the `airflow-dbt-cloud` project.

```bash
git clone https://github.com/sungchun12/airflow-dbt-cloud.git
git clone https://github.com/dbt-labs/airflow-dbt-cloud.git
cd airflow-dbt-cloud
```

<WistiaVideo id="oo1yel115i" paddingTweak="62.25%" />
For more information about cloning GitHub repositories, refer to "[Cloning a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)" in the GitHub documentation.

## Start the Docker container

Expand Down Expand Up @@ -140,29 +140,16 @@ Now you have all the working pieces to get up and running with Airflow + dbt Clo
## Update the placeholders in the sample code
Add your `account_id` and `job_id` to the python file [dbt_cloud_provider_eltml.py](https://github.com/sungchun12/airflow-dbt-cloud/blob/main/dags/dbt_cloud_provider_eltml.py).
Add your `account_id` and `job_id` to the python file [dbt_cloud_run_job.py](https://github.com/dbt-labs/airflow-dbt-cloud/blob/main/dags/dbt_cloud_run_job.py).
Both IDs are included inside of the dbt Cloud job URL as shown in the following snippets:
```python
# For the dbt Cloud Job URL https://YOUR_ACCESS_URL/#/accounts/16173/projects/36467/jobs/65767/
# The account_id is 16173
# Update line 28
default_args={"dbt_cloud_conn_id": "dbt_cloud", "account_id": 16173},
```
```python
# For the dbt Cloud Job URL https://YOUR_ACCESS_URL/#/accounts/16173/projects/36467/jobs/65767/
# The job_id is 65767
# Update line 39
trigger_dbt_cloud_job_run = DbtCloudRunJobOperator(
task_id="trigger_dbt_cloud_job_run",
job_id=65767,
check_interval=10,
timeout=300,
)
# The account_id is 16173 and the job_id is 65767
# Update lines 34 and 35
ACCOUNT_ID = "16173"
JOB_ID = "65767"
```
<WistiaVideo id="wgy7wvgqof" paddingTweak="62.25%" />
Expand Down Expand Up @@ -247,4 +234,4 @@ Yes, either through [Airflow's email/slack](https://www.astronomer.io/guides/err

Check out [this recording](https://www.youtube.com/watch?v=n7IIThR8hGk) of a dbt meetup for some tips.

</div>
</div>

0 comments on commit b3405a7

Please sign in to comment.