Skip to content

jlmendgom5TRAN/dbt_pardot

 
 

Repository files navigation

Apache License

Pardot (docs)

This package models Pardot data from Fivetran's connector. It uses data in the format described by the Pardot ERD.

This package enables you to better understand your Pardot prospects, opportunities, lists, and campaign performance. It includes analysis-ready models, enriched with relevant metrics.

Models

This package contains transformation models, designed to work simultaneously with our Pardot source package. A dependency on the source package is declared in this package's packages.yml file, so it will automatically download when you run dbt deps. The primary outputs of this package are described below. Intermediate models are used to create these output models.

model description
pardot__campaigns Each record represents a campaign in Pardot, enriched with metrics about associated prospects.
pardot__lists Each record represents a list in Pardot, enriched with metrics about associated prospect activity.
pardot__opportunities Each record represents an opportunity in Pardot, enriched with metrics about associated prospects.
pardot__prospects Each record represents a prospect in Pardot, enriched with metrics about associated prospect activity.

Installation Instructions

Check dbt Hub for the latest installation instructions, or read the dbt docs for more information on installing packages.

Include in your packages.yml

packages:
  - package: fivetran/pardot
    version: [">=0.4.0", "<0.5.0"]

Configuration

Source data location

By default, this package will look for your Pardot data in the pardot schema of your target database. If this is not where your Pardot data is, add the following configuration to your dbt_project.yml file:

# dbt_project.yml

...
config-version: 2

vars:
  pardot_source:
    pardot_database: your_database_name
    pardot_schema: your_schema_name 

Passthrough Columns

By default, the package includes all of the standard columns in the stg_pardot__prospect model. If you want to include custom columns, configure them using the prospect_passthrough_columns variable:

# dbt_project.yml

...
vars:
  pardot_source:
    prospect_passthrough_columns: ["custom_creative","custom_contact_state"]

Additional metrics

By default, this package aggregates and joins activity data onto the prospect model for email and visit events. If you want to have aggregates for other events in the visitor_activity table, use prospect_metrics_activity_types variable to generate these aggregates. Use the type_name column value:

# dbt_project.yml

...
vars:
  pardot:
    prospect_metrics_activity_types: ["form handler","webinar"]  

Changing the Build Schema

By default this package will build the Pardot staging models within a schema titled (<target_schema> + _stg_pardot) and Pardot final models within a schema titled (<target_schema> + pardot) in your target database. If this is not where you would like your modeled Pardot data to be written to, add the following configuration to your dbt_project.yml file:

# dbt_project.yml

...
models:
    pardot:
      +schema: my_new_schema_name # leave blank for just the target_schema
    pardot_source:
      +schema: my_new_schema_name # leave blank for just the target_schema

Database Support

This package has been tested on BigQuery, Snowflake, Redshift, and Postgres.

Contributions

Additional contributions to this package are very welcome! Please create issues or open PRs against master. Check out this post on the best workflow for contributing to a package.

Resources:

Packages

No packages published