[Bug] fivetran_log_json_parse.string_path
arg should be an array in fivetran_platform__audit_user_activity
model
#124
Labels
error:unforced
priority:p3
Affects many users; can wait
status:scoping
Currently being scoped
type:bug
Something is broken or incorrect
update_type:models
Primary focus requires model updates
Is there an existing issue for this?
Describe the issue
On line 5 we have
{{ fivetran_log.fivetran_log_json_parse(string='message_data', string_path='actor') }} as actor_email
But it should be
{{ fivetran_log.fivetran_log_json_parse(string='message_data', string_path=['actor']) }} as actor_email
This is how the macro is used everywhere else.
This causes the json parsing to not output anything and therefore limit the output of the
fivetran_platform__audit_user_activity
modelRelevant error log or model output
Expected behavior
I would expect the macro to compile to:
Snowflake
try_parse_json(message_data)['actor'] as actor_email
Postgres
case when message_data ~ '^\s*[\{].*[\}]?\s*$' -- Postgres has no native json check, so this will check the string for indicators of a JSON object then message_data::json #>> '{actor}' else null end
BQ
json_extract_scalar(message_data, '$.actor')
dbt Project configurations
na
Package versions
na
What database are you using dbt with?
snowflake
dbt Version
na
Additional Context
https://fivetran.slack.com/archives/C02919TN9AT/p1714746313138259
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: