Open kennyning-current opened 1 year ago
I've set up my customer_stream according Activity Schema spec V2. I tried a basic funnel to start:
customer_stream
with dataset_cte as ( {{ dbt_activity_schema.dataset( activity_stream = ref("customer_stream"), primary_activity = dbt_activity_schema.activity( dbt_activity_schema.all_ever(), "opened_email"), appended_activities = [ dbt_activity_schema.activity( dbt_activity_schema.first_after(), "deposited_payroll"), dbt_activity_schema.activity( dbt_activity_schema.first_after(), "visited_points_tab"), ] ) }} ) select * from dataset_cte
And getting this error at this line in the compiled sql:
It looks like BigQuery's safe_cast function does not like casting json to string at all, so we might need a different approach:
safe_cast
@kennyning-current Would you mind taking a look at https://github.com/tnightengale/dbt-activity-schema/issues/26 for context, and perhaps open a PR to solve this for the BQ case?
I've set up my
customer_stream
according Activity Schema spec V2. I tried a basic funnel to start:And getting this error at this line in the compiled sql:![image](https://user-images.githubusercontent.com/116682766/230660500-bcd9f6bf-85f4-4117-8c52-09b7ce0664e6.png)
It looks like BigQuery's![image](https://user-images.githubusercontent.com/116682766/230660705-092ec027-4723-48e4-a277-5f5ad44c347f.png)
safe_cast
function does not like casting json to string at all, so we might need a different approach: