To solve for that, in stg_klaviyo__event, we cast property_value as a string, used a regex_replace function to retain only numerical values in these strings across all destinations (i.e. 0-9 values and .), then cast back to a numeric to ensure numeric_value was of that data type.
🚘 Under the Hood 🚘
Cast property_value in the integration_tests/dbt_project.yml to ensure the field was originally being cast as a string or varchar data type for testing purposes.
Updated the event seed file to test for values that aren't numerics.
Please acknowledge that you have successfully performed the following commands locally:
[x] dbt run –full-refresh && dbt test
[NA] dbt run (if incremental models are present)
Before marking this PR as "ready for review" the following have been applied:
[x] The appropriate issue has been linked, tagged, and properly assigned
[x] All necessary documentation and version upgrades have been applied
[x] docs were regenerated (unless this PR does not include any code or yml updates)
[x] BuildKite integration tests are passing
[x] Detailed validation steps have been provided below
Detailed Validation
Please share any and all of your validation steps:
We tested across all destinations that (1) the seed file is showing values of various types (normal numerical, numeric type with a $ type, null value), and then made sure that the regex_replace removed the $ expression and left only the numeric values.
PR Overview
This PR will address the following Issue/Feature: [#20]
This PR will result in the following new package version: 0.7.1
Not a breaking change--it should update field values but not the name itself.
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
🪲 Bug Fixes 🪛
property_value
, leading to database errors.stg_klaviyo__event
, we castproperty_value
as a string, used aregex_replace
function to retain only numerical values in these strings across all destinations (i.e. 0-9 values and .), then cast back to a numeric to ensurenumeric_value
was of that data type.🚘 Under the Hood 🚘
property_value
in theintegration_tests/dbt_project.yml
to ensure the field was originally being cast as a string or varchar data type for testing purposes.event
seed file to test for values that aren't numerics.Contributors
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
We tested across all destinations that (1) the seed file is showing values of various types (normal numerical, numeric type with a $ type, null value), and then made sure that the regex_replace removed the $ expression and left only the numeric values.