From 8868c9c87dddac82fe7c91d0b05708e40607b662 Mon Sep 17 00:00:00 2001 From: agnessnowplow <95634439+agnessnowplow@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:14:27 +0000 Subject: [PATCH 1/2] [create-pull-request] automated change --- src/componentVersions.js | 2 +- .../Schemas/dbtAttribution_0.2.1.json | 377 ++++++++++++++++++ 2 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json diff --git a/src/componentVersions.js b/src/componentVersions.js index 2d523a57cb..7d38fbfb8a 100644 --- a/src/componentVersions.js +++ b/src/componentVersions.js @@ -41,7 +41,7 @@ export const versions = { // Data Modelling // dbt - dbtSnowplowAttribution: '0.2.0', + dbtSnowplowAttribution: '0.2.1', dbtSnowplowUnified: '0.4.1', dbtSnowplowWeb: '1.0.1', dbtSnowplowMobile: '1.0.0', diff --git a/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json b/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json new file mode 100644 index 0000000000..760d16dc01 --- /dev/null +++ b/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json @@ -0,0 +1,377 @@ +{ + "definitions": { + "passthrough_vars": { + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "items": { + "title": "Type", + "oneOf": [ + { + "type": "string", + "title": "Column Name" + }, + { + "type": "object", + "title": "SQL & Alias", + "properties": { + "sql": { + "type": "string" + }, + "alias": { + "type": "string" + } + }, + "required": [ + "sql", + "alias" + ], + "additionalProperties": false + } + ] + }, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "snowplow__conversions_source": { + "recommendFullRefresh": true, + "order": 81, + "consoleGroup": "advanced", + "type": "string", + "title": "Conversions Source", + "description": "Source of conversion events", + "longDescription": "The source (schema and table) of your conversion events, likely the conversions table generated by the Unified package.", + "packageDefault": "{{ source('derived', 'snowplow_unified_conversions') }}", + "group": "Warehouse and Tracker" + }, + "snowplow__conversion_path_source": { + "recommendFullRefresh": true, + "order": 76, + "consoleGroup": "advanced", + "type": "string", + "title": "Conversion Path Source", + "description": "Source of paths (touchpoints) table", + "longDescription": "The source (schema and table) of the paths (touchpoints). By default it is the derived `snowplow_unified_views` table.", + "packageDefault": "{{ source('derived', 'snowplow_unified_views') }}", + "group": "Warehouse and Tracker" + }, + "snowplow__conversion_window_start_date": { + "recommendFullRefresh": true, + "order": 80, + "consoleGroup": "advanced", + "type": "string", + "format": "date", + "title": "Conversion Window Start Date", + "group": "Operation and Logic", + "longDescription": "The start date in UTC for the window of conversions to include. It is only used for the drop and recompute report tables/views.", + "packageDefault": "current_date()-31" + }, + "snowplow__conversion_window_end_date": { + "recommendFullRefresh": true, + "order": 79, + "consoleGroup": "advanced", + "type": "string", + "format": "date", + "title": "Conversion Window End Date", + "group": "Operation and Logic", + "longDescription": "The end date in UTC for the window of conversions to include. It is only used for the drop and recompute report tables/views.", + "packageDefault": "" + }, + "snowplow__conversion_window_days": { + "recommendFullRefresh": true, + "order": 78, + "consoleGroup": "advanced", + "type": "number", + "minimum": 0, + "title": "Conversion Window Days", + "group": "Operation and Logic", + "longDescription": "The last complete nth number of days (calculated from the last processed pageview within page_views_source) to dynamically update the conversion_window_start_date and end_date with. Will only apply if both variables are left as an empty string.", + "packageDefault": "30" + }, + "snowplow__path_lookback_days": { + "recommendFullRefresh": true, + "order": 18, + "consoleGroup": "basic", + "type": "number", + "minimum": 0, + "title": "Path Lookback Days", + "group": "Operation and Logic", + "longDescription": "Restricts the model to marketing channels within this many days of the conversion (values of 30, 14 or 7 are recommended).", + "packageDefault": "30" + }, + "snowplow__path_lookback_steps": { + "recommendFullRefresh": true, + "order": 19, + "consoleGroup": "basic", + "type": "number", + "minimum": 0, + "title": "Path Lookback Steps", + "group": "Operation and Logic", + "longDescription": "The limit for the number of marketing channels to look at before the conversion.", + "packageDefault": "0 (unlimited)" + }, + "snowplow__path_transforms": { + "recommendFullRefresh": false, + "order": 116, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "title": "Path Transforms", + "longDescription": "Dictionary of path transforms (and their argument, `null` if none) to perform on the full conversion path (see the transform path options in our [model docs](/docs/modeling-your-data/modeling-your-data-with-dbt/dbt-models/dbt-attribution-data-model/)).", + "packageDefault": "{'exposure_path': null}", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "object", + "title": "Path transform", + "oneOf": [ + { + "title": "exposure", + "required": [ + "exposure" + ], + "properties": { + "exposure": { + "type": "string", + "default": "null" + } + } + }, + { + "title": "first", + "required": [ + "first" + ], + "properties": { + "first": { + "type": "string", + "default": "null" + } + } + }, + { + "title": "unique", + "required": [ + "unique" + ], + "properties": { + "unique": { + "type": "string", + "default": "null" + } + } + }, + { + "title": "remove if last and not all", + "required": [ + "remove_if_last_and_not_all" + ], + "properties": { + "remove_if_last_and_not_all": { + "type": "string" + } + } + }, + { + "title": "remove if not all", + "required": [ + "remove_if_not_all" + ], + "properties": { + "remove_if_not_all": { + "type": "string" + } + } + } + ] + }, + "uniqueItems": true + }, + "snowplow__channels_to_exclude": { + "recommendFullRefresh": true, + "order": 68, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "title": "Channels to Exclude", + "longDescription": "List of channels to exclude from analysis (empty to keep all channels). For example, users may want to exclude the `Direct` channel from the analysis.", + "packageDefault": "[ ] (no filter applied)", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "string" + } + }, + "snowplow__channels_to_include": { + "recommendFullRefresh": true, + "order": 69, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "title": "Channels to Include", + "longDescription": "List of channels to include in the analysis (empty to keep all channels). For example, users may want to include the `Direct` channel only in the analysis.", + "packageDefault": "[ ] (no filter applied)", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "string" + } + }, + "snowplow__campaigns_to_exclude": { + "recommendFullRefresh": true, + "order": 64, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "title": "Campaigns to Exclude", + "longDescription": "List of campaigns to exclude from analysis (empty to keep all campaigns).", + "packageDefault": "[ ] (no filter applied)", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "string" + } + }, + "snowplow__campaigns_to_include": { + "recommendFullRefresh": true, + "order": 65, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "title": "Campaigns to Include", + "longDescription": "List of campaigns to include in the analysis (empty to keep all campaigns).", + "packageDefault": "[ ] (no filter applied)", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "string" + } + }, + "snowplow__conversion_hosts": { + "recommendFullRefresh": true, + "order": 74, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 0, + "title": "URL Hosts", + "longDescription": "`url_hosts` to filter to in the data processing", + "packageDefault": "[] (no filter applied)", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "string" + } + }, + "snowplow__consider_intrasession_channels": { + "recommendFullRefresh": true, + "order": 72, + "consoleGroup": "advanced", + "type": "boolean", + "group": "Contexts, Filters, and Logs", + "longDescription": "If `false`, only considers the channel at the start of the session (i.e. first page view). If `true`, considers multiple channels in the conversion session as well as historically.", + "packageDefault": "true", + "title": "Consider Intrasession Channels" + }, + "snowplow__spend_source": { + "recommendFullRefresh": true, + "order": 124, + "consoleGroup": "advanced", + "title": "Spend Source", + "description": "Source of marketing spend table", + "longDescription": "The source (schema and table) of your marketing spend source. Optional, needed for the ROAS calculation of the snowplow_attribution_overview. Should be changed to a table reference with `spend` by `channel` and/or `campaign` by `spend_tstamp` (which denotes a timestamp field) information.", + "type": "string", + "packageDefault": "not defined", + "group": "Warehouse and Tracker" + }, + "snowplow__conversion_stitching": { + "recommendFullRefresh": true, + "order": 77, + "consoleGroup": "advanced", + "type": "boolean", + "group": "Contexts, Filters, and Logs", + "longDescription": "This should align with the variable of the same name inside the unified package. If allowed it will consider the stitched_user_id field, not the user_identifier in the source data for more accurate results.", + "packageDefault": "false", + "title": "Conversion Stitching" + }, + "snowplow__conversion_clause": { + "recommendFullRefresh": true, + "order": 73, + "consoleGroup": "advanced", + "type": "string", + "title": "Conversions Clause", + "group": "Operation and Logic", + "longDescription": "A string of sql to filter on certain conversion events.", + "packageDefault": "cv_value > 0" + }, + "snowplow__attribution_list": { + "recommendFullRefresh": false, + "order": 61, + "consoleGroup": "advanced", + "type": "array", + "description": "> Click the plus sign to add a new entry", + "minItems": 1, + "title": "Attribution List", + "longDescription": "List of attribution types to use for reporting. Can be at least one of: first_touch, last_touch, linear, position_based).", + "packageDefault": "['first_touch', 'last_touch', 'linear', 'position_based']", + "group": "Contexts, Filters, and Logs", + "items": { + "type": "string" + } + }, + "snowplow__attribution_start_date": { + "recommendFullRefresh": true, + "order": 7, + "consoleGroup": "required", + "type": "string", + "format": "date", + "title": "Attribution Start Date", + "group": "Operation and Logic", + "longDescription": "The date to start processing events from in the package on first run or a full refresh, based on the cv_tstamp (conversion timestamp).", + "packageDefault": "2023-01-01", + "description": "The date to start processing events from in the package on first run or a full refresh, based on `cv_tstamp`" + }, + "snowplow__enable_paths_to_non_conversion": { + "recommendFullRefresh": false, + "order": 101, + "consoleGroup": "advanced", + "type": "boolean", + "group": "Contexts, Filters, and Logs", + "longDescription": "If `true`, enable the paths_to_non_conversion model, which is a drop and recompute table that may be needed for more in-depth attribution analysis (used in the `path_summary` table as well)", + "packageDefault": "false", + "title": "Enable Paths To Non Conversion" + }, + "snowplow__enable_attribution_overview": { + "recommendFullRefresh": false, + "order": 102, + "consoleGroup": "advanced", + "type": "boolean", + "group": "Contexts, Filters, and Logs", + "longDescription": "If `true`, enable the attribution_overview model, which is a view that creates a great source for BI tools to use for reporting", + "packageDefault": "true", + "title": "Enable Attribution Overview" + }, + "snowplow__dev_target_name": { + "recommendFullRefresh": false, + "order": 87, + "consoleGroup": "advanced", + "type": "string", + "title": "Dev Target", + "description": "Target name of your development environment as defined in your `profiles.yml` file", + "longDescription": "The [target name](https://docs.getdbt.com/docs/core/connect-data-platform/profiles.yml) of your development environment as defined in your `profiles.yml` file. See the [Manifest Tables](/docs/modeling-your-data/modeling-your-data-with-dbt/package-mechanics/manifest-tables/) section for more details.", + "packageDefault": "dev", + "group": "Warehouse and Tracker" + }, + "snowplow__allow_refresh": { + "recommendFullRefresh": true, + "order": 39, + "consoleGroup": "advanced", + "type": "boolean", + "title": "Allow Refresh", + "group": "Operation and Logic", + "longDescription": "Used as the default value to return from the `allow_refresh()` macro. This macro determines whether the manifest tables can be refreshed or not, depending on your environment. See the [Manifest Tables](/docs/modeling-your-data/modeling-your-data-with-dbt/package-mechanics/manifest-tables/) section for more details.", + "packageDefault": "false" + } + } +} From ba3bc57e951ce2404a507110d0dec3695c029b61 Mon Sep 17 00:00:00 2001 From: Agnes Kiss Date: Tue, 11 Jun 2024 15:43:56 +0100 Subject: [PATCH 2/2] Add default to conv clause --- .../JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json b/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json index 760d16dc01..48ad701934 100644 --- a/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json +++ b/src/components/JsonSchemaValidator/Schemas/dbtAttribution_0.2.1.json @@ -303,7 +303,7 @@ "title": "Conversions Clause", "group": "Operation and Logic", "longDescription": "A string of sql to filter on certain conversion events.", - "packageDefault": "cv_value > 0" + "packageDefault": "cv_value > 0 and user_identifier is not null" }, "snowplow__attribution_list": { "recommendFullRefresh": false,