Skip to content
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

normalized table filters #43

Open
bassrock opened this issue Jul 12, 2024 · 0 comments
Open

normalized table filters #43

bassrock opened this issue Jul 12, 2024 · 0 comments
Labels
status:needs_triage Needs maintainer triage. type:enhancement New features or improvements to existing features.

Comments

@bassrock
Copy link

Is your feature request related to a problem? Please describe.

Right now it is not possible to filter on anything other then event_name in the normalize_config.

Given the following

 "events":[
        {
            "event_names": ["object_update"],
            "event_columns": ["derived_tstamp"],
            "self_describing_event_schemas": [
                "iglu:com.acme/object_update/jsonschema/1-0-20"
            ],
            "self_describing_event_aliases": ["object_update"],
            "table_name": "snowplow_acme_object_updates",
            "context_schemas":[
                "iglu:com.acme/some_object/jsonschema/1-0-3"
            ],
            "filter":
            "context_aliases": ["some_object"]
        }
    ]

I always have to add something like this in the generated model, to do a filter statement.

{{ snowplow_normalize.normalize_events(
    event_names,
    flat_cols,
    sde_cols,
    sde_keys,
    sde_types,
    sde_aliases,
    context_cols,
    context_keys,
    context_types,
    context_alias
) }} 

-- The following is a custom change, the rest is generated. Always ensure this is re-added.
and object_update_object_type = 'a_custom_object'

Describe the solution you'd like

 "events":[
        {
            "event_names": ["object_update"],
            "event_columns": ["derived_tstamp"],
            "self_describing_event_schemas": [
                "iglu:com.acme/object_update/jsonschema/1-0-20"
            ],
           "self_describing_event_schemas_filters": [
                   {"object": "a_custom_object"}
            ],
            "self_describing_event_aliases": ["object_update"],
            "table_name": "snowplow_acme_object_updates",
            "context_schemas":[
                "iglu:com.acme/some_object/jsonschema/1-0-3"
            ],
            "filter":
            "context_aliases": ["some_object"]
        }
    ]

Are you interested in contributing towards this feature?

Happy to help contribute if pointed in the right directions.

@bassrock bassrock added the type:enhancement New features or improvements to existing features. label Jul 12, 2024
@github-actions github-actions bot added the status:needs_triage Needs maintainer triage. label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs_triage Needs maintainer triage. type:enhancement New features or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

1 participant