A dbt package with macros for parsing User Agent strings
New to dbt packages? Read more about them here.
- Include this package in your
packages.yml
file — check here for the latest version number. - Run
dbt deps
to install the package.
This macro will define a UDF that parses UA strings. First you can use a run-operation
to create the UDF.
dbt run-operation create_f_parse_ua_string
Then you can use the UDF within your queries:
select
utils.parse_ua_string(ua_string)
from mydatabase.myschema.mytable