-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable parsing of feature json columns #34
Conversation
…ture json keys into snake case
…or feature json columns
@tnightengale looking for the following feedback:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Makes sense to me!
|
||
{% set columns = dbt_activity_schema.columns() %} | ||
{%- if column not in columns.values() -%} | ||
{%- set parsed_column = dbt_activity_schema.json_unpack_key(table_alias ~ '.' ~ columns.feature_json, column) -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a nice convenience feature, and we may be able to extend it in the future if we formally define types of packed columns.
|
Thanks @tnightengale! I'm going to merge this then open a PR to bump the version to 0.4.0. This feature should provide a workaround to #26 and #33 until those bugs are explicitly resolved. |
This PR:
parse_column
which returnstable_alias.column
and extracts the column from the activity stream'sfeature_json
column if the column name is not identified as a standard column from the Activity Schema, then applies that function to all columns selected from all primary and appended columns in thedataset
macrofirst_ever_1
) to extract json features from the primary and appended activityexample__activity_stream
and relevantoutput__<dataset>
csv files so thatfeature_json
values aren't nested in an array and so thatfeature_json
keys use snake case formattingincluded_columns
argument in the Readme