Skip to content

Commit 67003ec

Browse files
committed
source-apple-app-store: refactor and update analytics report cursor and processing strategy
Minor refactors to use the updated models, fields and report processing flow. Instead of a complicated paging strategy that waits X amount of days based on some completeness lag, the reports are processed as long as there is a report with a processing data <= `cutoff`.
1 parent ae2add6 commit 67003ec

10 files changed

+205
-424
lines changed

source-apple-app-store/acmeCo/app_crashes.schema.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,21 @@ properties:
2727
op: u
2828
row_id: -1
2929
description: Document metadata
30-
app_id:
31-
title: App Id
32-
type: string
3330
Date:
3431
format: date
3532
title: Date
3633
type: string
34+
filename:
35+
default: ""
36+
title: Filename
37+
type: string
3738
row_number:
3839
description: Row sequence number for deduplication
3940
title: Row Number
4041
type: integer
41-
App Apple Identifier:
42-
title: App Apple Identifier
43-
type: string
44-
App Version:
45-
title: App Version
46-
type: string
47-
Device:
48-
title: Device
49-
type: string
50-
Platform Version:
51-
title: Platform Version
52-
type: string
5342
required:
54-
- app_id
5543
- Date
5644
- row_number
57-
- App Apple Identifier
58-
- App Version
59-
- Device
60-
- Platform Version
6145
title: AppCrashesReportRow
6246
type: object
6347
x-infer-schema: true

source-apple-app-store/acmeCo/app_downloads.schema.yaml renamed to source-apple-app-store/acmeCo/app_downloads_detailed.schema.yaml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,21 @@ properties:
2727
op: u
2828
row_id: -1
2929
description: Document metadata
30-
app_id:
31-
title: App Id
32-
type: string
3330
Date:
3431
format: date
3532
title: Date
3633
type: string
34+
filename:
35+
default: ""
36+
title: Filename
37+
type: string
3738
row_number:
3839
description: Row sequence number for deduplication
3940
title: Row Number
4041
type: integer
41-
App Apple Identifier:
42-
title: App Apple Identifier
43-
type: string
44-
App Version:
45-
title: App Version
46-
type: string
47-
Device:
48-
title: Device
49-
type: string
50-
Platform Version:
51-
title: Platform Version
52-
type: string
5342
required:
54-
- app_id
5543
- Date
5644
- row_number
57-
- App Apple Identifier
58-
- App Version
59-
- Device
60-
- Platform Version
61-
title: AppDownloadsReportRow
45+
title: AppDownloadsDetailedReportRow
6246
type: object
6347
x-infer-schema: true

source-apple-app-store/acmeCo/app_sessions.schema.yaml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,21 @@ properties:
2727
op: u
2828
row_id: -1
2929
description: Document metadata
30-
app_id:
31-
title: App Id
32-
type: string
3330
Date:
3431
format: date
3532
title: Date
3633
type: string
34+
filename:
35+
title: Filename
36+
type: string
3737
row_number:
3838
description: Row sequence number for deduplication
3939
title: Row Number
4040
type: integer
41-
App Apple Identifier:
42-
title: App Apple Identifier
43-
type: string
44-
App Version:
45-
title: App Version
46-
type: string
47-
Device:
48-
title: Device
49-
type: string
5041
required:
51-
- app_id
5242
- Date
43+
- filename
5344
- row_number
54-
- App Apple Identifier
55-
- App Version
56-
- Device
57-
title: AppSessionsReportRow
45+
title: AppSessionsDetailedReportRow
5846
type: object
5947
x-infer-schema: true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
$defs:
3+
Meta:
4+
properties:
5+
op:
6+
default: u
7+
description: "Operation type (c: Create, u: Update, d: Delete)"
8+
enum:
9+
- c
10+
- u
11+
- d
12+
title: Op
13+
type: string
14+
row_id:
15+
default: -1
16+
description: "Row ID of the Document, counting up from zero, or -1 if not known"
17+
title: Row Id
18+
type: integer
19+
title: Meta
20+
type: object
21+
additionalProperties: true
22+
description: "References:\n - https://developer.apple.com/documentation/analytics-reports/app-sessions"
23+
properties:
24+
_meta:
25+
$ref: "#/$defs/Meta"
26+
default:
27+
op: u
28+
row_id: -1
29+
description: Document metadata
30+
Date:
31+
format: date
32+
title: Date
33+
type: string
34+
filename:
35+
default: ""
36+
title: Filename
37+
type: string
38+
row_number:
39+
description: Row sequence number for deduplication
40+
title: Row Number
41+
type: integer
42+
required:
43+
- Date
44+
- row_number
45+
title: AppSessionsDetailedReportRow
46+
type: object
47+
x-infer-schema: true

source-apple-app-store/acmeCo/app_store_discovery_and_engagement.schema.yaml renamed to source-apple-app-store/acmeCo/app_store_discovery_and_engagement_detailed.schema.yaml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,21 @@ properties:
2727
op: u
2828
row_id: -1
2929
description: Document metadata
30-
app_id:
31-
title: App Id
32-
type: string
3330
Date:
3431
format: date
3532
title: Date
3633
type: string
34+
filename:
35+
default: ""
36+
title: Filename
37+
type: string
3738
row_number:
3839
description: Row sequence number for deduplication
3940
title: Row Number
4041
type: integer
41-
App Apple Identifier:
42-
title: App Apple Identifier
43-
type: string
44-
Device:
45-
title: Device
46-
type: string
47-
Platform Version:
48-
title: Platform Version
49-
type: string
50-
Event Type:
51-
title: Event Type
52-
type: string
5342
required:
54-
- app_id
5543
- Date
5644
- row_number
57-
- App Apple Identifier
58-
- Device
59-
- Platform Version
60-
- Event Type
61-
title: AppStoreDiscoveryAndEngagementReportRow
45+
title: AppStoreDiscoveryAndEngagementDetailedReportRow
6246
type: object
6347
x-infer-schema: true

source-apple-app-store/acmeCo/app_store_installs_and_deletions.schema.yaml renamed to source-apple-app-store/acmeCo/app_store_installs_and_deletions_detailed.schema.yaml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,21 @@ properties:
2727
op: u
2828
row_id: -1
2929
description: Document metadata
30-
app_id:
31-
title: App Id
32-
type: string
3330
Date:
3431
format: date
3532
title: Date
3633
type: string
34+
filename:
35+
default: ""
36+
title: Filename
37+
type: string
3738
row_number:
3839
description: Row sequence number for deduplication
3940
title: Row Number
4041
type: integer
41-
App Apple Identifier:
42-
title: App Apple Identifier
43-
type: string
44-
App Version:
45-
title: App Version
46-
type: string
47-
Device:
48-
title: Device
49-
type: string
50-
Platform Version:
51-
title: Platform Version
52-
type: string
53-
Event Type:
54-
title: Event Type
55-
type: string
5642
required:
57-
- app_id
5843
- Date
5944
- row_number
60-
- App Apple Identifier
61-
- App Version
62-
- Device
63-
- Platform Version
64-
- Event Type
65-
title: AppStoreInstallsReportRow
45+
title: AppStoreInstallsDetailedReportRow
6646
type: object
6747
x-infer-schema: true

source-apple-app-store/acmeCo/flow.yaml

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,12 @@ collections:
33
acmeCo/app_crashes:
44
schema: app_crashes.schema.yaml
55
key:
6-
- /App Apple Identifier
7-
- /App Version
8-
- /Date
9-
- /Device
10-
- /Platform Version
11-
- /app_id
6+
- /filename
127
- /row_number
13-
acmeCo/app_downloads:
14-
schema: app_downloads.schema.yaml
8+
acmeCo/app_downloads_detailed:
9+
schema: app_downloads_detailed.schema.yaml
1510
key:
16-
- /App Apple Identifier
17-
- /App Version
18-
- /Date
19-
- /Device
20-
- /Platform Version
21-
- /app_id
11+
- /filename
2212
- /row_number
2313
acmeCo/app_reviews:
2414
schema: app_reviews.schema.yaml
@@ -28,28 +18,20 @@ collections:
2818
acmeCo/app_sessions:
2919
schema: app_sessions.schema.yaml
3020
key:
31-
- /App Apple Identifier
32-
- /App Version
33-
- /Date
34-
- /Device
35-
- /app_id
21+
- /filename
3622
- /row_number
37-
acmeCo/app_store_discovery_and_engagement:
38-
schema: app_store_discovery_and_engagement.schema.yaml
23+
acmeCo/app_sessions_detailed:
24+
schema: app_sessions_detailed.schema.yaml
3925
key:
40-
- /App Apple Identifier
41-
- /Date
42-
- /Event Type
43-
- /Platform Version
44-
- /app_id
26+
- /filename
4527
- /row_number
46-
acmeCo/app_store_installs_and_deletions:
47-
schema: app_store_installs_and_deletions.schema.yaml
28+
acmeCo/app_store_discovery_and_engagement_detailed:
29+
schema: app_store_discovery_and_engagement_detailed.schema.yaml
4830
key:
49-
- /App Apple Identifier
50-
- /App Version
51-
- /Date
52-
- /Event Type
53-
- /Platform Version
54-
- /app_id
31+
- /filename
32+
- /row_number
33+
acmeCo/app_store_installs_and_deletions_detailed:
34+
schema: app_store_installs_and_deletions_detailed.schema.yaml
35+
key:
36+
- /filename
5537
- /row_number

0 commit comments

Comments
 (0)