Closed dmcmtntp closed 3 weeks ago
Thanks @dmcmtntp for raising this! I took a look at our connector notes and it seems that adding contact_lookup_id
to the unique test should do the trick. I'll loop my team in and work on getting a fix out in the coming weeks.
Also, saw that you're opening up a PR! If you wish to continue, it will be adding contact_lookup_id
to the unique test here.
Sure thing I can open a pull request with that change. Quick question though - do you have any understanding of what the difference is between contact_id
vs. contact_lookup_id
?
Opened pull request here: https://github.com/fivetran/dbt_qualtrics_source/pull/8
Thanks @dmcmtntp!
Based on the Qualtrics docs, it looks like the below is the difference: Contact Id: The ID for the contact on a directory level, regardless of distribution list. Lookup Id: The ID of a specific contact in a specific list. It can be a unique identifier that is used to look up a contact across different systems or within a specific organization. It might be used for other integrations where a different ID is used to track the same person.
So the contact ID is probably 1 to 1 with a user, while many lookup IDs can belong to a single user.
I imagine only taking contact_id
+ distribution_id
as the unique parameter is not enough in the distribution_contact
table if there's several of those records for different lookup IDs
Hi @dmcmtntp ! I'll be taking on merging your changes into a new release of the dbt_qualtrics_source
package. I did a quick review and have a few notes you can view here; once those are addressed, this should be good to be merged in and we will kick off our release process!
Let me know if you have any questions!
Hey @dmcmtntp ! Hope you were able to get a chance to review the PR!
The changes are pretty small, so we will go ahead and merge them into our branch on Tuesday if we don't hear back.
Have a good weekend!
Hi @dmcmtntp your test should now be live in the latest version of qualtrics_source
.
Let us know if you have any questions or issues!
The updates removed the error in my dbt implementation, thank you!
Is there an existing issue for this?
Describe the issue
The Unique Rows test is failing for stg_qualtrics__distribution_contact https://github.com/fivetran/dbt_qualtrics_source/blob/36dfc658cee91975d66e38f33c6ad8dc6fecba1b/models/stg_qualtrics.yml#L559-L566
I'm not sure if this is due to an issue with the definition of the test, the stg_qualtrics__distribution_contact model, or the qualtrics connector.
Relevant error log or model output
Expected behavior
That the models and tests would run without failing, since they are running on the raw data from the fivetran connector.
dbt Project configurations
models: qualtrics: +schema: warehouse +tags: warehouse qualtrics_source: +schema: staging +tags: staging
vars: qualtrics_database: fivetran_db qualtrics_schema: qualtrics_v2 qualtrics__directory_contact_pass_through_columns:
Package versions
packages:
What database are you using dbt with?
snowflake
dbt Version
1.8.0
Additional Context
The test is looking for unique combinations of the fields
contact_id
,distribution_id
, andsource_relation
in thestg_qualtrics__directory_contact
model. One thing that jumped out to me when I looked at the compiled SQL for this model is that there doesn't seem to be any deduplication happening in the model.Here is an extract of the rows in
stg_qualtrics__directory_contact
which are failing the test: stg_qualtrics__distribution_contact - failed rows.csvThis extract was generated with the following SQL:
__
Are you willing to open a PR to help address this issue?