This package models Lever data from Fivetran’s Opportunity endpoint connector. It uses data in the format described by this ERD.
NOTE: If your Lever connector was created prior to July 2020 or still uses the Candidate endpoint, you must fully re-sync your connector or set up a new connector to use Fivetran’s Lever dbt packages.
This package enriches your Fivetran data by doing the following:
- Adds descriptions to tables and columns that are synced using Fivetran
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
- Models staging tables, which will be used in our transform package
Modelslink
This package contains staging models, designed to work simultaneously with our Lever transformation package. The staging models:
- Remove any rows that are soft-deleted
- Name columns consistently across all packages:
- Boolean fields are prefixed with
is_
orhas_
- Timestamps are appended with
_at
- ID primary keys are prefixed with the name of the table. For example, a user table’s ID column is renamed
user_id
. - Foreign keys include the table that they refer to. For example, a interview’s interview user ID column is renamed
interviewer_user_id
.
- Boolean fields are prefixed with
Installation Instructionslink
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/lever_source
version: [">=0.3.0", "<0.4.0"]
Configurationlink
By default, this package looks for your Lever data in the lever
schema of your target database. If this is not where your Lever data is, add the following configuration to your dbt_project.yml
file:
...
config-version: 2
vars:
lever_database: your_database_name
lever_schema: your_schema_name
Disabling Modelslink
Your Lever connector might not sync every table that this package expects. If your syncs exclude certain tables, it is because you either don’t use that functionality in Lever or have actively excluded some tables from your syncs. To disable the corresponding functionality in the package, you must set the relevant config variables to false
. By default, all variables are set to true
. Alter variables for only the tables you want to disable:
...
config-version: 2
vars:
lever_using_requisitions: false # Disable if you do not have the requisition table, or if you do not want requisition related metrics reported
lever_using_posting_tag: false # disable if you do not have (or want) the postings tag table
...
Passing Through Custom Columnslink
If you choose to include requisitions, the REQUISITION
table may also have custom columns (all prefixed by custom_field_
). To pass these columns through to the final requisition model, add the following variable to your dbt_project.yml
file:
...
config-version: 2
vars:
lever_requisition_passthrough_columns: ['the', 'list', 'of', 'fields']
Contributionslink
Don’t see a model or specific metric you would have liked to be included? Notice any bugs when installing
and running the package? If so, we highly encourage and welcome contributions to this package!
Please create issues or open PRs against main
. Check out this post on the best workflow for contributing to a package.
Database Supportlink
This package has been tested on BigQuery, Snowflake and Redshift.
Resources:link
- Provide feedback on our existing dbt packages or what you’d like to see next
- Have questions, feedback, or need help? Book a time during our office hours here or email us at solutions@fivetran.com
- Find all of Fivetran’s pre-built dbt packages in our dbt hub
- Learn how to orchestrate your models with Fivetran Transformations for dbt Core™
- Learn more about Fivetran overall in our docs
- Check out Fivetran’s blog
- Learn more about dbt in the dbt docs
- Check out Discourse for commonly asked questions and answers
- Join the chat on Slack for live discussions and support
- Find dbt events near you
- Check out the dbt blog for the latest news on dbt’s development and best practices