diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 17c2c54..38c56bc 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,7 +1,7 @@ name: 🐞 Bug description: Report a bug or an issue you've found within the dbt package title: "[Bug] " -labels: ["bug", "triage"] +labels: ["type:bug"] body: - type: markdown attributes: @@ -35,6 +35,12 @@ body: 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 @@ -61,6 +67,19 @@ body: - 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 @@ -83,6 +102,6 @@ body: 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 and will schedule time during our [office hours](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) for guidance + - label: Yes, but I will need assistance. - label: No. required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index a1d28bb..529e9bc 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,7 +1,7 @@ name: 🎉 Feature description: Suggest a new feature for the Fivetran dbt package title: "[Feature] <title>" -labels: ["enhancement"] +labels: ["type:enhancement"] body: - type: markdown attributes: @@ -20,6 +20,13 @@ body: 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 @@ -34,7 +41,7 @@ body: 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 and will schedule time during your [office hours](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) for guidance. + - label: Yes, but I will need assistance. - label: No. required: false - type: textarea diff --git a/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md index 45317d2..3220674 100644 --- a/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md @@ -11,15 +11,14 @@ ### 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 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. - <!--- Be sre to update the package version in the dbt_project.yml, integration_tests/dbt_project.yml, and README if necessary. --> -- [ ] 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. +- [ ] 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: @@ -27,4 +26,4 @@ Please share any and all of your validation steps: ### 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) --> -💃 \ No newline at end of file +:dancer: \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 50ee0df..30849fd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,52 +1,39 @@ -**Are you a current Fivetran customer?** -<!--- Please tell us your name, title and company --> +**Please provide your name and company** -**What change(s) does this PR introduce?** -<!--- Describe what changes your PR introduces to the package and how to leverage this new feature. --> +**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. --> -**Did you update the CHANGELOG?** +**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 -**Does this PR introduce a breaking change?** -<!--- Does this PR introduce changes that will cause current package users' jobs to fail or require a `--full-refresh`? --> -<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). --> -- [ ] Yes (please provide breaking change details below.) -- [ ] No (please provide an explanation as to how the change is non-breaking below.) - -**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)** +**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 -**Is this PR in response to a previously created Bug or Feature Request** -<!--- If an Issue was created it is helpful to track the progress by linking it in the PR. --> -<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). --> -- [ ] Yes, Issue/Feature [link bug/feature number here] -- [ ] No - -**How did you test the PR changes?** -<!--- Proof of testing is required in order for the PR to be approved. --> -<!--- To check a box, remove the space and insert an x in the box (eg. [x] Buildkite). --> -<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). --> -- [ ] Buildkite <!--- Buildkite testing is only applicable to Fivetran employees. --> -- [ ] Local (please provide additional testing details below) +**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 -**Select which warehouse(s) were used to test the PR** -<!--- To check a warehouse remove the space and insert an x in the box (eg. [x] Bigquery). --> -<!--- To select a checkbox you simply need to add an "x" with no spaces between the brackets (eg. [x] Yes). --> -- [ ] BigQuery -- [ ] Redshift -- [ ] Snowflake -- [ ] Postgres -- [ ] Databricks -- [ ] Other (provide details below) - -**Provide an emoji that best describes your current mood** +**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) diff --git a/.quickstart/quickstart.yml b/.quickstart/quickstart.yml index de47bb6..f5c7ef5 100644 --- a/.quickstart/quickstart.yml +++ b/.quickstart/quickstart.yml @@ -14,3 +14,12 @@ destination_configurations: dispatch: - macro_namespace: dbt_utils search_order: [ 'spark_utils', 'dbt_utils' ] + +public_models: [ + "qualtrics__directory", + "qualtrics__distribution", + "qualtrics__response", + "qualtrics__daily_breakdown", + "qualtrics__survey", + "qualtrics__contact" +] diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c3c334..e0fa8e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# v0.2.0 dbt_qualtrics +# dbt_qualtrics v0.2.0 [PR #8](https://github.com/fivetran/dbt_qualtrics/pull/8) includes the following updates: @@ -6,7 +6,7 @@ - This release includes an update to the upstream dbt_qualtrics_source dependency which includes breaking changes. These breaking changes included **all** staging model timestamps to be cast using the `dbt.type_timestamp()` macro in order to ensure datatype consistency with timestamp fields. - For an overview of all breaking changes in the dbt_qualtrics_source data model, please refer to the [respective release notes](https://github.com/fivetran/dbt_qualtrics_source/releases/tag/v0.2.0). -# v0.1.1 dbt_qualtrics +# dbt_qualtrics v0.1.1 [PR #6](https://github.com/fivetran/dbt_qualtrics/pull/6) applies the following changes: @@ -18,7 +18,7 @@ - Updated the pull request [templates](/.github). - Included auto-releaser GitHub Actions workflow to automate future releases. -# v0.1.0 dbt_qualtrics +# dbt_qualtrics v0.1.0 This is the initial release of the Qualtrics dbt package! # 📣 What does this dbt package do? @@ -28,4 +28,4 @@ This package models Qualtrics data from [Fivetran's connector](https://fivetran. The main focus of the package is to transform the core object tables into analytics-ready models, including: - A Response breakdown model which consolidates all survey responses joined with users, questions, and survey details. - Overview models for Surveys, Contacts, Directories, and Distributions which help to understand the nuances of each and how they affect key survey aggregations. -- A daily breakdown model which provides a high level view of a variety of Qualtrics account metrics at a daily level. \ No newline at end of file +- A daily breakdown model which provides a high level view of a variety of Qualtrics account metrics at a daily level. diff --git a/README.md b/README.md index 828949a..fc73625 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # Qualtrics Transformation dbt Package ([Docs](https://fivetran.github.io/dbt_qualtrics/)) -# 📣 What does this dbt package do? +## What does this dbt package do? This package models Qualtrics data from [Fivetran's connector](https://fivetran.com/docs/applications/qualtrics). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/qualtrics#schemainformation) and builds off the output of our [Qualtrics source package](https://github.com/fivetran/dbt_qualtrics_source). @@ -22,10 +22,10 @@ The main focus of the package is to transform the core object tables into analyt - A daily breakdown model which provides a high level view of a variety of Qualtrics account metrics at a daily level. <!--section="qualtrics_transformation_model"--> -The following table provides a detailed list of all models materialized within this package by default. -> TIP: See more details about these models in the package's [dbt docs site](https://fivetran.github.io/dbt_qualtrics/#!/overview/qualtrics). +The following table provides a detailed list of all tables materialized within this package by default. +> TIP: See more details about these tables in the package's [dbt docs site](https://fivetran.github.io/dbt_qualtrics/#!/overview/qualtrics). -| **model** | **description** | +| **Table** | **Description** | | ------------------------- | ------------------------------------------------------------------------------------------------------------------ | | [qualtrics__contact](https://fivetran.github.io/dbt_qualtrics/#!/model/model.qualtrics.qualtrics__contact) | Detailed view of all contacts (from both the XM Directory and Research Core contact endpoints), ehanced with response and mailing list metrics. | | [qualtrics__daily_breakdown](https://fivetran.github.io/dbt_qualtrics/#!/model/model.qualtrics.qualtrics__daily_breakdown) | Daily breakdown of activities related to surveys and distribution in your Qualtrics instance. | @@ -35,15 +35,15 @@ The following table provides a detailed list of all models materialized within t | [qualtrics__survey](https://fivetran.github.io/dbt_qualtrics/#!/model/model.qualtrics.qualtrics__survey) | Detailed view of all surveys created, enhanced with distribution and response metrics. | <!--section-end--> -# 🎯 How do I use the dbt package? +## How do I use the dbt package? -## Step 1: Prerequisites +### Step 1: Prerequisites To use this dbt package, you must have the following: - At least one Fivetran Qualtrics connector syncing data into your destination. - A **BigQuery**, **Snowflake**, **Redshift**, **Databricks**, or **PostgreSQL** destination. -### Databricks dispatch configuration +#### Databricks dispatch configuration If you are using a Databricks destination with this package, you must add the following (or a variation of the following) dispatch configuration within your `dbt_project.yml`. This is required in order for the package to accurately search for macros within the `dbt-labs/spark_utils` then the `dbt-labs/dbt_utils` packages respectively. ```yml dispatch: @@ -51,7 +51,7 @@ dispatch: search_order: ['spark_utils', 'dbt_utils'] ``` -## Step 2: Install the package +### Step 2: Install the package Include the following qualtrics package version in your `packages.yml` file: > TIP: Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages. ```yml @@ -60,10 +60,10 @@ packages: version: [">=0.2.0", "<0.3.0"] # we recommend using ranges to capture non-breaking changes automatically ``` -Do **NOT** include the `qualtrics_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well. +Do **NOT** include the `qualtrics_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well. -## Step 3: Define database and schema variables -### Single connector +### Step 3: Define database and schema variables +#### Single connector By default, this package runs using your destination and the `qualtrics` schema. If this is not where your qualtrics data is (for example, if your qualtrics schema is named `qualtrics_fivetran`), add the following configuration to your root `dbt_project.yml` file: ```yml @@ -73,7 +73,7 @@ vars: qualtrics_database: your_database_name qualtrics_schema: your_schema_name ``` -### Union multiple connectors +#### Union multiple connectors If you have multiple Qualtrics connectors in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. The package will union all of the data together and pass the unioned table into the transformations. You will be able to see which source it came from in the `source_relation` column of each model. To use this functionality, you will need to set either the `qualtrics_union_schemas` OR `qualtrics_union_databases` variables (cannot do both) in your root `dbt_project.yml` file: ```yml @@ -84,12 +84,12 @@ vars: qualtrics_union_databases: ['qualtrics_usa','qualtrics_canada'] # use this if the data is in different databases/projects but uses the same schema name ``` -Please be aware that the native `source.yml` connection set up in the package will not function when the union schema/database feature is utilized. Although the data will be correctly combined, you will not observe the sources linked to the package models in the Directed Acyclic Graph (DAG). This happens because the package includes only one defined `source.yml`. +> NOTE: The native `source.yml` connection set up in the package will not function when the union schema/database feature is utilized. Although the data will be correctly combined, you will not observe the sources linked to the package models in the Directed Acyclic Graph (DAG). This happens because the package includes only one defined `source.yml`. To connect your multiple schema/database sources to the package models, follow the steps outlined in the [Union Data Defined Sources Configuration](https://github.com/fivetran/dbt_fivetran_utils/tree/releases/v0.4.latest#union_data-source) section of the Fivetran Utils documentation for the union_data macro. This will ensure a proper configuration and correct visualization of connections in the DAG. -## Step 4: Enable Research Core Contacts API +### Step 4: Enable Research Core Contacts API By default, this package does not bring in data from the Qualtrics Research Core Contacts [Endpoint](https://api.qualtrics.com/10b9ce5afbf17-research-core-contacts), as this API is set to be [deprecated](https://api.qualtrics.com/10b9ce5afbf17-research-core-contacts#deprecation-notice) by Qualtrics. However, if you would like the package to bring in Core **contacts** and **mailing lists** in addition to XM Directory data, add the following configuration to your `dbt_project.yml`: ```yml @@ -98,9 +98,9 @@ vars: qualtrics__using_core_mailing_lists: True # default = False ``` -## (Optional) Step 5: Additional configurations +### (Optional) Step 5: Additional configurations -### Passing Through Additional Fields +#### Passing Through Additional Fields This package includes all source columns defined in the macros folder. You can add more columns using our pass-through column variables. These variables allow for the pass-through fields to be aliased (`alias`) and casted (`transform_sql`) if desired, but not required. Datatype casting is configured via a sql snippet within the `transform_sql` key. You may add the desired sql while omitting the `as field_name` at the end and your custom pass-though fields will be casted accordingly. Use the below format for declaring the respective pass-through variables: ```yml @@ -125,7 +125,7 @@ vars: > Please create an [issue](https://github.com/fivetran/dbt_qualtrics_source/issues) if you'd like to see passthrough column support for other tables in the Qualtrics schema. -### Changing the Build Schema +#### Changing the Build Schema By default this package will build the Qualtrics staging models within a schema titled (<target_schema> + `_stg_qualtrics`) and the qualtrics final models within a schema titled (<target_schema> + `_qualtrics`) in your target database. If this is not where you would like your modeled qualtrics data to be written to, add the following configuration to your `dbt_project.yml` file: ```yml @@ -138,7 +138,7 @@ models: +schema: my_new_schema_name # leave blank for just the target_schema ``` -### Change the source table references +#### Change the source table references If an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable: > IMPORTANT: See this project's [`dbt_project.yml`](https://github.com/fivetran/dbt_qualtrics_source/blob/main/dbt_project.yml) variable declarations to see the expected names. @@ -151,7 +151,7 @@ vars: ``` -## (Optional) Step 6: Orchestrate your models with Fivetran Transformations for dbt Core™ +### (Optional) Step 6: Orchestrate your models with Fivetran Transformations for dbt Core™ <details><summary>Expand for details</summary> <br> @@ -159,8 +159,8 @@ Fivetran offers the ability for you to orchestrate your dbt project through [Fiv </details> -# 🔍 Does this package have dependencies? -This dbt package is dependent on the following dbt packages. Please be aware that these dependencies are installed by default within this package. For more information on the following packages, refer to the [dbt hub](https://hub.getdbt.com/) site. +## Does this package have dependencies? +This dbt package is dependent on the following dbt packages. These dependencies are installed by default within this package. For more information on the following packages, refer to the [dbt hub](https://hub.getdbt.com/) site. > IMPORTANT: If you have any of these dependent packages in your own `packages.yml` file, we highly recommend that you remove them from your root `packages.yml` to avoid package version conflicts. ```yml @@ -177,16 +177,15 @@ packages: - package: dbt-labs/spark_utils version: [">=0.3.0", "<0.4.0"] ``` -# 🙌 How is this package maintained and can I contribute? -## Package Maintenance +## How is this package maintained and can I contribute? +### Package Maintenance The Fivetran team maintaining this package _only_ maintains the latest version of the package. We highly recommend you stay consistent with the [latest version](https://hub.getdbt.com/fivetran/qualtrics/latest/) of the package and refer to the [CHANGELOG](https://github.com/fivetran/dbt_qualtrics/blob/main/CHANGELOG.md) and release notes for more information on changes across versions. -## Contributions -A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions! +### Contributions +A small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions. -We highly encourage and welcome contributions to this package. Check out [this dbt Discourse article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657) on the best workflow for contributing to a package! +We highly encourage and welcome contributions to this package. Check out [this dbt Discourse article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657) on the best workflow for contributing to a package. -# 🏪 Are there any resources available? -- If you have questions or want to reach out for help, please refer to the [GitHub Issue](https://github.com/fivetran/dbt_qualtrics/issues/new/choose) section to find the right avenue of support for you. -- If you would like to provide feedback to the dbt package team at Fivetran or would like to request a new dbt package, fill out our [Feedback Form](https://www.surveymonkey.com/r/DQ7K7WW). -- Have questions or want to be part of the community discourse? Create a post in the [Fivetran community](https://community.fivetran.com/t5/user-group-for-dbt/gh-p/dbt-user-group) and our team along with the community can join in on the discussion! \ No newline at end of file +## Are there any resources available? +- If you have questions or want to reach out for help, see the [GitHub Issue](https://github.com/fivetran/dbt_qualtrics/issues/new/choose) section to find the right avenue of support for you. +- If you would like to provide feedback to the dbt package team at Fivetran or would like to request a new dbt package, fill out our [Feedback Form](https://www.surveymonkey.com/r/DQ7K7WW). \ No newline at end of file