Commit 7e2d0c8
## Summary
Replaces `language_id` / `userlanguage` with `locale_id` across the
Content Analytics pipeline to standardize language tracking using ISO
codes instead of internal numeric IDs.
### Changes include:
- ClickHouse Schema (`init.sql`): Adds a new column nsamed
`language_iso` to the `events` table; updates `session_states`,
`session_facts`, and `sessions_by_language_daily` tables to use
`locale_id` with `LowCardinality(String)` type. Unknown/missing values
now default to '' (undefined) instead of '0'.
- Materialized Views: Updates `session_states_mv` and
`sessions_by_language_daily` rollup to reference `locale_id` throughout
aggregation and grouping logic.
- Cube Schemas: Renames the `languageId` dimension to `localeId` (with
sql: `locale_id`) in both `Request.js` and `SessionsByLanguageDaily.js`.
- Analytics Payload Validator: Updates `pageview.json` to accept
`locale_id` instead of `language_id`.
## Test plan
- Verify `pageview` events are ingested with `locale_id` field populated
correctly (e.g., `en_en`, `es_es`, `fr_fr`)
- Confirm `session_facts` and `sessions_by_language_daily` tables
reflect the renamed column after re-materialization
- Validate Cube queries on languageIso dimension return expected results
Closes #34661
---------
Co-authored-by: Arcadio Quintero <oidacra@gmail.com>
Co-authored-by: erickgonzalez <erick.gonzalez@dotcms.com>
1 parent 6ea7cd4 commit 7e2d0c8
11 files changed
Lines changed: 2140 additions & 2104 deletions
File tree
- core-web/libs
- portlets/dot-analytics/data-access/src/lib/types
- docker/docker-compose-examples/analytics/setup
- config/dev/cube/schema
- db/clickhouse/init-scripts
- dotCMS/src/main/resources/analytics/validators
- dotcms-integration/src/test/java/com/dotcms/jitsu/validators
- dotcms-postman/src/main/resources/postman
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | | - | |
| 1047 | + | |
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
1074 | | - | |
1075 | | - | |
| 1074 | + | |
1076 | 1075 | | |
1077 | 1076 | | |
1078 | 1077 | | |
| |||
1081 | 1080 | | |
1082 | 1081 | | |
1083 | 1082 | | |
1084 | | - | |
| 1083 | + | |
1085 | 1084 | | |
1086 | 1085 | | |
1087 | 1086 | | |
| |||
1117 | 1116 | | |
1118 | 1117 | | |
1119 | 1118 | | |
1120 | | - | |
| 1119 | + | |
1121 | 1120 | | |
1122 | 1121 | | |
1123 | 1122 | | |
| |||
1129 | 1128 | | |
1130 | 1129 | | |
1131 | 1130 | | |
| 1131 | + | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
620 | 623 | | |
621 | 624 | | |
622 | 625 | | |
| |||
625 | 628 | | |
626 | 629 | | |
627 | 630 | | |
628 | | - | |
| 631 | + | |
| 632 | + | |
629 | 633 | | |
630 | 634 | | |
631 | 635 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
| 242 | + | |
| 243 | + | |
244 | 244 | | |
245 | | - | |
246 | | - | |
| 245 | + | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
Lines changed: 18 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
521 | | - | |
| 522 | + | |
522 | 523 | | |
523 | 524 | | |
524 | 525 | | |
| |||
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
659 | | - | |
660 | | - | |
| 660 | + | |
| 661 | + | |
661 | 662 | | |
662 | 663 | | |
663 | 664 | | |
| |||
666 | 667 | | |
667 | 668 | | |
668 | 669 | | |
669 | | - | |
670 | 670 | | |
| 671 | + | |
671 | 672 | | |
672 | | - | |
673 | | - | |
| 673 | + | |
| 674 | + | |
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
| |||
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
928 | | - | |
| 929 | + | |
929 | 930 | | |
930 | 931 | | |
931 | 932 | | |
| |||
949 | 950 | | |
950 | 951 | | |
951 | 952 | | |
952 | | - | |
| 953 | + | |
953 | 954 | | |
954 | 955 | | |
955 | 956 | | |
| |||
1015 | 1016 | | |
1016 | 1017 | | |
1017 | 1018 | | |
1018 | | - | |
1019 | | - | |
| 1019 | + | |
| 1020 | + | |
1020 | 1021 | | |
1021 | 1022 | | |
1022 | 1023 | | |
1023 | 1024 | | |
1024 | 1025 | | |
1025 | 1026 | | |
1026 | 1027 | | |
1027 | | - | |
| 1028 | + | |
1028 | 1029 | | |
1029 | 1030 | | |
1030 | 1031 | | |
| |||
1160 | 1161 | | |
1161 | 1162 | | |
1162 | 1163 | | |
1163 | | - | |
| 1164 | + | |
1164 | 1165 | | |
1165 | 1166 | | |
1166 | 1167 | | |
| |||
1198 | 1199 | | |
1199 | 1200 | | |
1200 | 1201 | | |
1201 | | - | |
| 1202 | + | |
1202 | 1203 | | |
1203 | 1204 | | |
1204 | 1205 | | |
| |||
1542 | 1543 | | |
1543 | 1544 | | |
1544 | 1545 | | |
1545 | | - | |
| 1546 | + | |
1546 | 1547 | | |
1547 | 1548 | | |
1548 | 1549 | | |
| |||
1557 | 1558 | | |
1558 | 1559 | | |
1559 | 1560 | | |
1560 | | - | |
| 1561 | + | |
1561 | 1562 | | |
1562 | 1563 | | |
1563 | 1564 | | |
| |||
1577 | 1578 | | |
1578 | 1579 | | |
1579 | 1580 | | |
1580 | | - | |
| 1581 | + | |
1581 | 1582 | | |
1582 | 1583 | | |
1583 | 1584 | | |
| |||
1591 | 1592 | | |
1592 | 1593 | | |
1593 | 1594 | | |
1594 | | - | |
| 1595 | + | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
835 | | - | |
| 835 | + | |
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
| 872 | + | |
872 | 873 | | |
873 | 874 | | |
874 | 875 | | |
| |||
889 | 890 | | |
890 | 891 | | |
891 | 892 | | |
| 893 | + | |
892 | 894 | | |
893 | 895 | | |
894 | 896 | | |
| |||
920 | 922 | | |
921 | 923 | | |
922 | 924 | | |
| 925 | + | |
923 | 926 | | |
924 | 927 | | |
925 | 928 | | |
| |||
961 | 964 | | |
962 | 965 | | |
963 | 966 | | |
| 967 | + | |
964 | 968 | | |
965 | 969 | | |
966 | 970 | | |
| |||
1006 | 1010 | | |
1007 | 1011 | | |
1008 | 1012 | | |
| 1013 | + | |
1009 | 1014 | | |
1010 | 1015 | | |
1011 | 1016 | | |
| |||
0 commit comments