dbt Core Part 4 - Run dbt Models and Exporting Documentation
In part 4 of the dbt Core guide, we will run the dbt model that was created in part 2. After the model completes its run, we will use Platform to upload the documentation to an Amazon S3 bucket. If you missed the first two installments of this guide, please go back and check them out:
Run dbt modelβ
- Navigate to the
Default
Project under Projects.
- Click the + New Fleet button in the top right corner of your page.
- Click the gear icon on the sidebar of the Fleet Builder to open Fleet Settings.
- Under Fleet Name, enter
dbt Run and Download Documents
. - Click the plus sign on the Fleet Builder sidebar to begin adding Vessels.
- Scroll to Org Blueprints and find the Blueprint that was created in part 2 of the guide called
dbt - Execute CLI Command
. Click the Blueprint to add it to the Fleet as a Vessel. - Under Vessel Name, enter
dbt Model Run
. Leave the dbt CLI Command as the default.
Generate Documentation on the dbt Runβ
- Click on the plus sign on the Fleet Builder sidebar.
- Click the
dbt - Execute CLI Command
Blueprint again to add it to the Fleet a second time. - Under Vessel Name, enter
Generate dbt Documentation
. - Under dbt CLI Command, enter
dbt docs generate
. - Connect the
dbt Model Run
anddbt docs generate
Vessels together.
Upload Documentation to Amazon S3 Bucketβ
- Click on the plus sign on the Fleet Builder sidebar.
- Click on Amazon S3 to expand the Blueprint options. Click the Blueprint titled
Upload Files
. A Vessel will be created and placed into the Fleet Builder. - Under Vessel Name, enter
Upload dbt Documentation to S3
. - Under Bucket Name, enter the bucket name inside of S3 in which you want the documentation to be placed.
- Under Local Folder Name, enter
target
. - Under Local File Name, enter
manifest.json
. - Under S3 Folder Name and S3 File Name, feel free to populate those fields as you see fit to keep your bucket organized.
- Under Access Key ID and Secret Access Key, enter those values from S3. See our documentation on authorization if you do not have those values readily available.
- Under Region, enter the region of your S3 bucket.
- Connect this Vessel to the
Generate dbt Documentation
Vessel. - Click Save & Finish on the bottom right of your page. This will redirect you to a page notifying you that your Fleet has been created successfully.
- Click Run your Fleet. This will take you to the Fleet Log page.
On the Fleet Log, you can see the status confirms that the Fleet completed successfully. You can click on any of the Log IDs or the green bars to see the output from the Vessel run. Here is the output from the Upload dbt Documentation to S3
Vessel: