View a markdown version of this page

Reading from dbt Cloud entities - AWS Glue

Reading from dbt Cloud entities

Prerequisites

A dbt Cloud object you want to read from. For the available entities, see the following supported entities table.

Every dbt Cloud entity belongs to a dbt Cloud account. Set ENTITY_NAME to the full entity path that AWS Glue returns when it lists the entities for your connection, for example accounts-runs/accountId.

Supported entities for source

EntityCan be filteredSupports limitSupports select *Supports order bySupports partitioning
accounts-connectionsNoYesYesNoNo
accounts-environmentsNoYesYesNoNo
accounts-jobsNoYesYesNoNo
accounts-projectsNoYesYesNoNo
accounts-repositoriesNoYesYesNoNo
accounts-runsNoYesYesNoNo
groupsYesYesYesNoNo
notificationsNoYesYesNoNo
projectsNoYesYesNoNo
service-tokensNoYesYesNoNo
usersNoYesYesNoNo
webhooks-subscriptionsNoYesYesNoNo
Example – Reading from a dbt Cloud entity

The following Python example reads from the accounts-connections entity. Replace connectionName with the name of your dbt Cloud connection and accountId with your dbt Cloud account ID:

read_df = glueContext.create_dynamic_frame.from_options( connection_type="dbt", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "accounts-connections/accountId" } )