-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dbt_dynamics_365_crm * add seeds * Update README.md * add workflows * update yml * update macro * update docs * update yml * update yml * remove staging * update yml * update yml * update yml * update yml * generate docs * Update readme * Update readme * Update readme * review updates & regen docs * update readme * update gitignore * update integration test * Apply suggestions from code review Co-authored-by: Joe Markiewicz <[email protected]> * update readme * Update CHANGELOG.md --------- Co-authored-by: Joe Markiewicz <[email protected]>
- Loading branch information
1 parent
f4fdd91
commit eb46020
Showing
42 changed files
with
957 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Export secrets for Docker containers. | ||
# Restrict exposing secrets only to the steps that need them | ||
export GCLOUD_SERVICE_KEY=$(gcloud secrets versions access latest --secret="GCLOUD_SERVICE_KEY" --project="dbt-package-testing-363917") | ||
export CI_POSTGRES_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_HOST" --project="dbt-package-testing-363917") | ||
export CI_POSTGRES_DBT_USER=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_USER" --project="dbt-package-testing-363917") | ||
export CI_POSTGRES_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_PASS" --project="dbt-package-testing-363917") | ||
export CI_POSTGRES_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_DBNAME" --project="dbt-package-testing-363917") | ||
export CI_REDSHIFT_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_DBNAME" --project="dbt-package-testing-363917") | ||
export CI_REDSHIFT_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_HOST" --project="dbt-package-testing-363917") | ||
export CI_REDSHIFT_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_PASS" --project="dbt-package-testing-363917") | ||
export CI_REDSHIFT_DBT_USER=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_USER" --project="dbt-package-testing-363917") | ||
export CI_SNOWFLAKE_DBT_ACCOUNT=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ACCOUNT" --project="dbt-package-testing-363917") | ||
export CI_SNOWFLAKE_DBT_DATABASE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_DATABASE" --project="dbt-package-testing-363917") | ||
export CI_SNOWFLAKE_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_PASS" --project="dbt-package-testing-363917") | ||
export CI_SNOWFLAKE_DBT_ROLE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ROLE" --project="dbt-package-testing-363917") | ||
export CI_SNOWFLAKE_DBT_USER=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_USER" --project="dbt-package-testing-363917") | ||
export CI_SNOWFLAKE_DBT_WAREHOUSE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_WAREHOUSE" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HOST" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HTTP_PATH" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_DBT_CATALOG=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_CATALOG" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_SQL_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_SQL_DBT_HTTP_PATH" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_SQL_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_SQL_DBT_TOKEN" --project="dbt-package-testing-363917") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
steps: | ||
- label: ":postgres: Run Tests - Postgres" | ||
key: "run-dbt-postgres" | ||
plugins: | ||
- docker#v3.13.0: | ||
image: "python:3.8" | ||
shell: [ "/bin/bash", "-e", "-c" ] | ||
environment: | ||
- "BASH_ENV=/tmp/.bashrc" | ||
- "CI_POSTGRES_DBT_DBNAME" | ||
- "CI_POSTGRES_DBT_HOST" | ||
- "CI_POSTGRES_DBT_PASS" | ||
- "CI_POSTGRES_DBT_USER" | ||
commands: | | ||
bash .buildkite/scripts/run_models.sh postgres | ||
- label: ":snowflake-db: Run Tests - Snowflake" | ||
key: "run_dbt_snowflake" | ||
plugins: | ||
- docker#v3.13.0: | ||
image: "python:3.8" | ||
shell: [ "/bin/bash", "-e", "-c" ] | ||
environment: | ||
- "BASH_ENV=/tmp/.bashrc" | ||
- "CI_SNOWFLAKE_DBT_ACCOUNT" | ||
- "CI_SNOWFLAKE_DBT_DATABASE" | ||
- "CI_SNOWFLAKE_DBT_PASS" | ||
- "CI_SNOWFLAKE_DBT_ROLE" | ||
- "CI_SNOWFLAKE_DBT_USER" | ||
- "CI_SNOWFLAKE_DBT_WAREHOUSE" | ||
commands: | | ||
bash .buildkite/scripts/run_models.sh snowflake | ||
- label: ":gcloud: Run Tests - BigQuery" | ||
key: "run_dbt_bigquery" | ||
plugins: | ||
- docker#v3.13.0: | ||
image: "python:3.8" | ||
shell: [ "/bin/bash", "-e", "-c" ] | ||
environment: | ||
- "BASH_ENV=/tmp/.bashrc" | ||
- "GCLOUD_SERVICE_KEY" | ||
commands: | | ||
bash .buildkite/scripts/run_models.sh bigquery | ||
- label: ":amazon-redshift: Run Tests - Redshift" | ||
key: "run_dbt_redshift" | ||
plugins: | ||
- docker#v3.13.0: | ||
image: "python:3.8" | ||
shell: [ "/bin/bash", "-e", "-c" ] | ||
environment: | ||
- "BASH_ENV=/tmp/.bashrc" | ||
- "CI_REDSHIFT_DBT_DBNAME" | ||
- "CI_REDSHIFT_DBT_HOST" | ||
- "CI_REDSHIFT_DBT_PASS" | ||
- "CI_REDSHIFT_DBT_USER" | ||
commands: | | ||
bash .buildkite/scripts/run_models.sh redshift | ||
- label: ":databricks: Run Tests - Databricks" | ||
key: "run_dbt_databricks" | ||
plugins: | ||
- docker#v3.13.0: | ||
image: "python:3.8" | ||
shell: [ "/bin/bash", "-e", "-c" ] | ||
environment: | ||
- "BASH_ENV=/tmp/.bashrc" | ||
- "CI_DATABRICKS_DBT_HOST" | ||
- "CI_DATABRICKS_DBT_HTTP_PATH" | ||
- "CI_DATABRICKS_DBT_TOKEN" | ||
- "CI_DATABRICKS_DBT_CATALOG" | ||
commands: | | ||
bash .buildkite/scripts/run_models.sh databricks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
apt-get update | ||
apt-get install libsasl2-dev | ||
|
||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install --upgrade pip setuptools | ||
pip install -r integration_tests/requirements.txt | ||
mkdir -p ~/.dbt | ||
cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml | ||
|
||
db=$1 | ||
echo `pwd` | ||
cd integration_tests | ||
dbt deps | ||
dbt seed --target "$db" --full-refresh | ||
dbt run --target "$db" --full-refresh | ||
dbt test --target "$db" | ||
dbt run --vars '{dynamics_365_crm_using_contact: false, dynamics_365_crm_using_phonecall: false}' --full-refresh --target "$db" --full-refresh | ||
dbt test --target "$db" | ||
|
||
dbt run-operation fivetran_utils.drop_schemas_automation --target "$db" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: 🐞 Bug | ||
description: Report a bug or an issue you've found within the dbt package | ||
title: "[Bug] <title>" | ||
labels: ["type:bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for using the Fivetran dbt package and for taking the time to fill out this bug report. Your contributions help improve this package for the entire community of users! | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing issue for this? | ||
description: Please search to see if an issue already exists for the bug you encountered. | ||
options: | ||
- label: I have searched the existing issues | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the issue | ||
description: A concise description of the problem you're experiencing. Also, please provide the steps to reproduce the issue if applicable. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Relevant error log or model output | ||
description: | | ||
If applicable, provide the relevant error log or describe the problematic model output. | ||
render: shell | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: A concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Possible solution | ||
description: Were you able to investigate and/or discover a potential fix to this bug in your investigation? If so, it would be much appreciated if you could submit code samples to show us how your fix resolved this issue. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: dbt Project configurations | ||
description: Please provide the variables and any other project specific configurations from your `dbt_project.yml`. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Package versions | ||
description: Please provide the contents of your `packages.yml`. | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: database | ||
attributes: | ||
label: What database are you using dbt with? | ||
multiple: true | ||
options: | ||
- postgres | ||
- redshift | ||
- snowflake | ||
- bigquery | ||
- databricks | ||
- other (mention it in "Additional Context") | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: orchestration_type | ||
attributes: | ||
label: How are you running this dbt package? | ||
multiple: true | ||
options: | ||
- Fivetran Quickstart Data Model | ||
- Fivetran Transformations | ||
- dbt Core™ | ||
- dbt Cloud™ | ||
- other (mention it in "Additional Context") | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: dbt Version | ||
description: Run `dbt --version` in your CLI or dbt cloud environment and copy the contents. Additionally, if you are using Fivetran dbt Transformations, provide the contents of the `dbtVersion` configuration in your `deployment.yml`. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional Context | ||
description: | | ||
Links? References? Anything that will give us more context about the issue you are encountering! | ||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. | ||
validations: | ||
required: false | ||
- type: checkboxes | ||
id: pr | ||
attributes: | ||
label: Are you willing to open a PR to help address this issue? | ||
description: Our team will assess this issue and let you know if we will add it to a future sprint. However, if you would like to expedite the solution, we encourage you to contribute to the package via a PR. Our team will then work with you to approve and merge your contributions as soon as possible. | ||
options: | ||
- label: Yes. | ||
- label: Yes, but I will need assistance. | ||
- label: No. | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
contact_links: | ||
- name: Provide feedback to our dbt package team | ||
url: https://www.surveymonkey.com/r/DQ7K7WW | ||
about: Fill out our survey form to provide valuable feedback to the Fivetran team developing and maintaining the dbt packages. | ||
- name: Fivetran connector question | ||
url: https://support.fivetran.com/hc | ||
about: Have a question about your connector? Check out the Fivetran support portal for more details. | ||
- name: What is dbt | ||
url: https://docs.getdbt.com/docs/introduction | ||
about: Check out the dbt docs for all dbt related information | ||
- name: Hang out in dbt Slack | ||
url: https://www.getdbt.com/community/ | ||
about: Have a question or just want to chat with fellow data friends, join dbt Slack and hangout in the tools-fivetran channel with us! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: 🎉 Feature | ||
description: Suggest a new feature for the Fivetran dbt package | ||
title: "[Feature] <title>" | ||
labels: ["type:enhancement"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for using the Fivetran dbt package and for taking the time to fill out this feature request. Your contributions help improve this package for the entire community of users! | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing feature request for this? | ||
description: Please search to see if an issue already exists for the feature you would like. | ||
options: | ||
- label: I have searched the existing issues | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the Feature | ||
description: A clear and concise description of what you want to happen and why you want the new feature. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: How would you implement this feature? | ||
description: | | ||
How would you build out this feature with your existing data? Any code examples you can provide to help accelerate development on this issue? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: | | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
validations: | ||
required: false | ||
- type: checkboxes | ||
id: contributing | ||
attributes: | ||
label: Are you interested in contributing this feature? | ||
description: Our team will assess this feature and let you know if we will add it to a future sprint. However, if you would like to expedite the feature, we encourage you to contribute to the package via a PR. Our team will then work with you to approve and merge your contributions as soon as possible. | ||
options: | ||
- label: Yes. | ||
- label: Yes, but I will need assistance. | ||
- label: No. | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Anything else? | ||
description: | | ||
Links? References? Anything that will give us more context about the feature you are suggesting! | ||
validations: | ||
required: false |
29 changes: 29 additions & 0 deletions
29
.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## PR Overview | ||
**This PR will address the following Issue/Feature:** | ||
|
||
**This PR will result in the following new package version:** | ||
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? --> | ||
|
||
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:** | ||
<!--- Copy/paste the CHANGELOG for this version below. --> | ||
|
||
## PR Checklist | ||
### Basic Validation | ||
Please acknowledge that you have successfully performed the following commands locally: | ||
- [ ] dbt run –full-refresh && dbt test | ||
- [ ] dbt run (if incremental models are present) && dbt test | ||
|
||
Before marking this PR as "ready for review" the following have been applied: | ||
- [ ] The appropriate issue has been linked, tagged, and properly assigned | ||
- [ ] All necessary documentation and version upgrades have been applied | ||
- [ ] docs were regenerated (unless this PR does not include any code or yml updates) | ||
- [ ] BuildKite integration tests are passing | ||
- [ ] Detailed validation steps have been provided below | ||
|
||
### Detailed Validation | ||
Please share any and all of your validation steps: | ||
<!--- Provide the steps you took to validate your changes below. --> | ||
|
||
### If you had to summarize this PR in an emoji, which would it be? | ||
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) --> | ||
:dancer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
**Please provide your name and company** | ||
|
||
**Link the issue/feature request which this PR is meant to address** | ||
<!--- If an issue was not created, please create one first so we may discuss the PR prior to opening one. --> | ||
|
||
**Detail what changes this PR introduces and how this addresses the issue/feature request linked above.** | ||
|
||
**How did you validate the changes introduced within this PR?** | ||
|
||
**Which warehouse did you use to develop these changes?** | ||
|
||
**Did you update the CHANGELOG?** | ||
<!--- Please update the new package version’s CHANGELOG entry detailing the changes included in this PR. --> | ||
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). --> | ||
- [ ] Yes | ||
|
||
**Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)** | ||
<!--- The dbt_project.yml and the integration_tests/dbt_project.yml files contain the version number. Be sure to upgrade it accordingly --> | ||
<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). --> | ||
- [ ] Yes | ||
|
||
**Typically there are additional maintenance changes required before this will be ready for an upcoming release. Are you comfortable with the Fivetran team making a few commits directly to your branch?** | ||
<!--- If you select Yes this will help expedite your PR in case there are small changes required before approval. We encourage you not to use this branch in a production environment as we may make additional updates. --> | ||
<!--- If you select No, we will not make any changes directly to your branch and will either communicate any planned changes via the PR thread or will merge your PR into a separate branch so we may make changes without modifying your branch.. --> | ||
- [ ] Yes | ||
- [ ] No | ||
|
||
**If you had to summarize this PR in an emoji, which would it be?** | ||
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) --> | ||
:dancer: | ||
|
||
**Feedback** | ||
|
||
We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next. | ||
|
||
**PR Template** | ||
- [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default) | ||
|
||
- [Maintainer Pull Request Template](?expand=1&template=maintainer_pull_request_template.md) (to be used by maintainers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'auto release' | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-workflow-passing-data: | ||
if: github.event.pull_request.merged | ||
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main | ||
secrets: inherit |
Oops, something went wrong.