@ken-e/dataform-youtube 0.0.6 → 0.0.8

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.
Files changed (37) hide show
  1. package/includes/definitions/sources/stg_ytc_annotation.js +2 -0
  2. package/includes/definitions/sources/stg_ytc_basic.js +2 -0
  3. package/includes/definitions/sources/stg_ytc_cards.js +2 -0
  4. package/includes/definitions/sources/stg_ytc_combined.js +2 -0
  5. package/includes/definitions/sources/stg_ytc_demographics.js +2 -0
  6. package/includes/definitions/sources/stg_ytc_device_os.js +2 -0
  7. package/includes/definitions/sources/stg_ytc_list_basic.js +2 -0
  8. package/includes/definitions/sources/stg_ytc_list_combined.js +2 -0
  9. package/includes/definitions/sources/stg_ytc_list_device_os.js +2 -0
  10. package/includes/definitions/sources/stg_ytc_list_playback.js +2 -0
  11. package/includes/definitions/sources/stg_ytc_list_province.js +2 -0
  12. package/includes/definitions/sources/stg_ytc_list_traffic_source.js +2 -0
  13. package/includes/definitions/sources/stg_ytc_playback.js +2 -0
  14. package/includes/definitions/sources/stg_ytc_province.js +2 -0
  15. package/includes/definitions/sources/stg_ytc_share_platform.js +2 -0
  16. package/includes/definitions/sources/stg_ytc_subtitles.js +2 -0
  17. package/includes/definitions/sources/stg_ytc_traffic_source.js +2 -0
  18. package/includes/definitions/ytc_annotation.js +3 -0
  19. package/includes/definitions/ytc_basic.js +2 -0
  20. package/includes/definitions/ytc_cards.js +2 -0
  21. package/includes/definitions/ytc_combined.js +2 -0
  22. package/includes/definitions/ytc_demographics.js +2 -0
  23. package/includes/definitions/ytc_demographics_views.js +2 -0
  24. package/includes/definitions/ytc_device_os.js +2 -0
  25. package/includes/definitions/ytc_end_screens.js +2 -0
  26. package/includes/definitions/ytc_list_basic.js +2 -0
  27. package/includes/definitions/ytc_list_combined.js +2 -0
  28. package/includes/definitions/ytc_list_device_os.js +2 -0
  29. package/includes/definitions/ytc_list_playback.js +2 -0
  30. package/includes/definitions/ytc_list_province.js +2 -0
  31. package/includes/definitions/ytc_list_traffic_source.js +2 -0
  32. package/includes/definitions/ytc_playback.js +2 -0
  33. package/includes/definitions/ytc_province.js +2 -0
  34. package/includes/definitions/ytc_share_platform.js +2 -0
  35. package/includes/definitions/ytc_subtitles.js +2 -0
  36. package/includes/definitions/ytc_traffic_source.js +2 -0
  37. package/package.json +2 -2
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -22,6 +22,8 @@ module.exports = (config) => {
22
22
  uniqueKeys: [
23
23
  [
24
24
  "data_date",
25
+ "site_nm",
26
+ "updated_at",
25
27
  "channel_id",
26
28
  "video_id",
27
29
  "live_or_on_demand",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -22,6 +22,8 @@ module.exports = (config) => {
22
22
  uniqueKeys: [
23
23
  [
24
24
  "data_date",
25
+ "site_nm",
26
+ "updated_at",
25
27
  "channel_id",
26
28
  "video_id",
27
29
  "live_or_on_demand",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -22,6 +22,8 @@ module.exports = (config) => {
22
22
  uniqueKeys: [
23
23
  [
24
24
  "data_date",
25
+ "site_nm",
26
+ "updated_at",
25
27
  "channel_id",
26
28
  "playlist_id",
27
29
  "video_id",
@@ -20,6 +20,8 @@ module.exports = (config) => {
20
20
  uniqueKeys: [
21
21
  [
22
22
  "data_date",
23
+ "site_nm",
24
+ "updated_at",
23
25
  "channel_id",
24
26
  "playlist_id",
25
27
  "video_id",
@@ -20,6 +20,8 @@ module.exports = (config) => {
20
20
  uniqueKeys: [
21
21
  [
22
22
  "data_date",
23
+ "site_nm",
24
+ "updated_at",
23
25
  "channel_id",
24
26
  "playlist_id",
25
27
  "video_id",
@@ -20,6 +20,8 @@ module.exports = (config) => {
20
20
  uniqueKeys: [
21
21
  [
22
22
  "data_date",
23
+ "site_nm",
24
+ "updated_at",
23
25
  "channel_id",
24
26
  "playlist_id",
25
27
  "video_id",
@@ -22,6 +22,8 @@ module.exports = (config) => {
22
22
  uniqueKeys: [
23
23
  [
24
24
  "data_date",
25
+ "site_nm",
26
+ "updated_at",
25
27
  "channel_id",
26
28
  "playlist_id",
27
29
  "video_id",
@@ -20,6 +20,8 @@ module.exports = (config) => {
20
20
  uniqueKeys: [
21
21
  [
22
22
  "data_date",
23
+ "site_nm",
24
+ "updated_at",
23
25
  "channel_id",
24
26
  "playlist_id",
25
27
  "video_id",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -22,6 +22,8 @@ module.exports = (config) => {
22
22
  uniqueKeys: [
23
23
  [
24
24
  "data_date",
25
+ "site_nm",
26
+ "updated_at",
25
27
  "channel_id",
26
28
  "video_id",
27
29
  "live_or_on_demand",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -21,6 +21,8 @@ module.exports = (config) => {
21
21
  uniqueKeys: [
22
22
  [
23
23
  "data_date",
24
+ "site_nm",
25
+ "updated_at",
24
26
  "channel_id",
25
27
  "video_id",
26
28
  "live_or_on_demand",
@@ -45,6 +45,9 @@ ${ctx.when(
45
45
  `where
46
46
  data_date > date '${config.startDate}'`,
47
47
  )}
48
+
49
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
50
+
48
51
  `,
49
52
  );
50
53
  };
@@ -39,6 +39,8 @@ with int_ex_titles as (
39
39
  `where
40
40
  data_date > date '${config.startDate}'`,
41
41
  )}
42
+
43
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
42
44
  )
43
45
 
44
46
  select
@@ -46,6 +46,8 @@ ${ctx.when(
46
46
  data_date > date '${config.startDate}'`,
47
47
  )}
48
48
 
49
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
50
+
49
51
  `,
50
52
  );
51
53
  };
@@ -37,6 +37,8 @@ with int_ex_titles as (
37
37
  `where
38
38
  data_date > date '${config.startDate}'`,
39
39
  )}
40
+
41
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
40
42
  ),
41
43
 
42
44
  int_with_titles as (
@@ -37,6 +37,8 @@ with int_ex_titles as (
37
37
  `where
38
38
  data_date > date '${config.startDate}'`,
39
39
  )}
40
+
41
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
40
42
  )
41
43
 
42
44
  select
@@ -48,6 +48,8 @@ with int_ex_titles as (
48
48
  `where
49
49
  data_date > date '${config.startDate}'`,
50
50
  )}
51
+
52
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
51
53
  )
52
54
 
53
55
  select
@@ -42,6 +42,8 @@ with int_ex_titles as (
42
42
  `where
43
43
  data_date > date '${config.startDate}'`,
44
44
  )}
45
+
46
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
45
47
  )
46
48
 
47
49
  select
@@ -45,6 +45,8 @@ ${ctx.when(
45
45
  `where
46
46
  data_date > date '${config.startDate}'`,
47
47
  )}
48
+
49
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
48
50
 
49
51
  `,
50
52
  );
@@ -51,6 +51,8 @@ int_with_video_titles as (
51
51
  config.titlesTable,
52
52
  )} as titles
53
53
  using (video_id)
54
+
55
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
54
56
  )
55
57
 
56
58
  select
@@ -53,6 +53,8 @@ with int_with_lookup_names as (
53
53
  `where
54
54
  data_date > date '${config.startDate}'`,
55
55
  )}
56
+
57
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
56
58
  ),
57
59
 
58
60
  int_with_video_titles as (
@@ -46,6 +46,8 @@ with int_with_device_os_names as (
46
46
  `where
47
47
  data_date > date '${config.startDate}'`,
48
48
  )}
49
+
50
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
49
51
  ),
50
52
 
51
53
  int_with_video_titles as (
@@ -42,6 +42,8 @@ with int_with_playback_names as (
42
42
  `where
43
43
  data_date > date '${config.startDate}'`,
44
44
  )}
45
+
46
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
45
47
  ),
46
48
 
47
49
  int_with_video_titles as (
@@ -38,6 +38,8 @@ with int_ex_titles as (
38
38
  `where
39
39
  data_date > date '${config.startDate}'`,
40
40
  )}
41
+
42
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
41
43
  ),
42
44
 
43
45
  int_with_video_titles as (
@@ -38,6 +38,8 @@ with int_ex_titles as (
38
38
  `where
39
39
  data_date > date '${config.startDate}'`,
40
40
  )}
41
+
42
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
41
43
  ),
42
44
 
43
45
  int_with_traffic_source as (
@@ -38,6 +38,8 @@ with int_ex_titles as (
38
38
  `where
39
39
  data_date > date '${config.startDate}'`,
40
40
  )}
41
+
42
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
41
43
  )
42
44
 
43
45
  select
@@ -38,6 +38,8 @@ with int_ex_titles as (
38
38
  `where
39
39
  data_date > date '${config.startDate}'`,
40
40
  )}
41
+
42
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
41
43
  )
42
44
 
43
45
  select
@@ -41,6 +41,8 @@ with int_ex_titles as (
41
41
  `where
42
42
  data_date > date '${config.startDate}'`,
43
43
  )}
44
+
45
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
44
46
  )
45
47
 
46
48
  select
@@ -37,6 +37,8 @@ with int_ex_titles as (
37
37
  `where
38
38
  data_date > date '${config.startDate}'`,
39
39
  )}
40
+
41
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
40
42
  )
41
43
 
42
44
  select
@@ -38,6 +38,8 @@ with int_ex_titles as (
38
38
  `where
39
39
  data_date > date '${config.startDate}'`,
40
40
  )}
41
+
42
+ qualify rank() over (partition by data_date, site_nm order by updated_at desc) = 1
41
43
  )
42
44
 
43
45
  select
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ken-e/dataform-youtube",
3
3
  "dependencies": {
4
4
  "@dataform/core": "3.0.9",
5
- "@ken-e/dataform-helpers": "0.0.7"
5
+ "@ken-e/dataform-helpers": "0.0.8"
6
6
  },
7
7
  "devDependencies": {
8
8
  "@eslint/js": "^9.18.0",
@@ -11,7 +11,7 @@
11
11
  "globals": "^15.14.0",
12
12
  "prettier": "3.4.2"
13
13
  },
14
- "version": "0.0.6",
14
+ "version": "0.0.8",
15
15
  "description": "A dataform package to process Youtube data from the BQ Data Transfer.",
16
16
  "main": "index.js",
17
17
  "scripts": {