ga4-export-fixer 0.9.0-dev.12 → 0.9.0-dev.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -357,14 +357,17 @@ ${excludedEventsSQL}`,
|
|
|
357
357
|
// items_unnested. When itemListAttribution is configured, override the three
|
|
358
358
|
// attribution entries with their package-generated coalesce-with-passthrough
|
|
359
359
|
// expressions. Item-level enrichment columns layer on top via the spread below.
|
|
360
|
+
// References are qualified with `items_unnested.` so that overlapping item-level
|
|
361
|
+
// enrichments (which JOIN against enrich_<name> CTEs that may share column names)
|
|
362
|
+
// do not produce ambiguous bare-column references.
|
|
360
363
|
const preItemExpressions = {};
|
|
361
364
|
for (const f of helpers.ga4ItemStructFields) {
|
|
362
|
-
preItemExpressions[f] = f
|
|
365
|
+
preItemExpressions[f] = `items_unnested.${f}`;
|
|
363
366
|
}
|
|
364
367
|
if (itemListAttribution) {
|
|
365
|
-
preItemExpressions.item_list_name = `coalesce(if(${passthroughEvents}, item_list_name, _item_list_attr.item_list_name), '(not set)')`;
|
|
366
|
-
preItemExpressions.item_list_id = `coalesce(if(${passthroughEvents}, item_list_id, _item_list_attr.item_list_id), '(not set)')`;
|
|
367
|
-
preItemExpressions.item_list_index = `coalesce(if(${passthroughEvents}, item_list_index, _item_list_attr.item_list_index))`;
|
|
368
|
+
preItemExpressions.item_list_name = `coalesce(if(${passthroughEvents}, items_unnested.item_list_name, _item_list_attr.item_list_name), '(not set)')`;
|
|
369
|
+
preItemExpressions.item_list_id = `coalesce(if(${passthroughEvents}, items_unnested.item_list_id, _item_list_attr.item_list_id), '(not set)')`;
|
|
370
|
+
preItemExpressions.item_list_index = `coalesce(if(${passthroughEvents}, items_unnested.item_list_index, _item_list_attr.item_list_index))`;
|
|
368
371
|
}
|
|
369
372
|
|
|
370
373
|
// Wrap overlapping item-level enrichment columns in coalesce(<enrichExpr>, <originalExpr>)
|