Back to transformation list
AWS Asset Inventory (Free)
dbt AWS Asset Inventory pack (free version)
Need Help? Book a call
Feb 15, 2024
CloudQuery × dbt: AWS Asset Inventory Package
This package contains dbt models (views) that aggregates AWS Resources for AWS Asset Inventory. This currently only supports PostgreSQL as a destination.
One of the below databases:
An example of how to install dbt to work with the destination of your choice.
dbt for the destination of your choice:
An example installation of dbt-postgres:
pip install dbt-postgres
These commands will also install install dbt-core and any other dependencies.
Create the profile directory:
mkdir -p ~/.dbt
profiles.yml file in your profile directory (e.g.
aws_asset_inventory: # This should match the name in your dbt_project.yml
schema: public # default schema where dbt will build the models
threads: 1 # number of threads to use when running in parallel
Test the Connection:
After setting up your
profiles.yml, you should test the connection to ensure everything is configured correctly:
This command will tell you if dbt can successfully connect to your destination database.
Running Your dbt Project
Navigate to your dbt project directory, where your
Before executing the
dbt run command, it might be useful to check for any potential issues:
If everything compiles without errors, you can then execute:
This command will run your
dbt models and create tables/views in your destination database as defined in your models.
To run specific models and the models in the dependency graph, the following
dbt run commands can be used:
For a specific model and the models in the dependency graph:
dbt run --select +<model_name>
For a specific folder and the models in the dependency graph:
dbt run --models +<model_name>
- aws_resources: AWS Resources View, available for PostgreSQL.
- Required tables: This model has no specific table dependencies, other than requiring a single CloudQuery table from the AWS plugin that has an ARN.