dbt - Advanced Patterns
How can you combine JSON extraction and conditional filtering in dbt SQL to select users whose
data:profile:age is over 25 and data:profile:active is true?data:profile:age is over 25 and data:profile:active is true?WHERE CAST(json_extract_path_text(data, 'profile', 'age') AS INT) > 25 AND json_extract_path_text(data, 'profile', 'active') = 'true' correctly casts age and compares active as string. Others miss casting or use invalid syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions