Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETL-700] Add medium job types to JSON to Parquet job #155

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions templates/glue-job-JSONToParquet.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,43 @@ Parameters:
DefaultWorkerType:
Type: String
Description: >-
Which worker type to use for this job.
Which worker type to use for most data types
Default: 'Standard'

LargeJobWorkerType:
MediumJobWorkerType:
Type: String
Description: >-
Which worker type to use for this job.
Medium data types include: HealthKitV2Samples, HealthKitV2Electrocardiogram,
FitbitDailyData, FitbitSleepLogs
Default: 'G.4X'

LargeJobWorkerType:
Type: String
Description: >-
Which worker type to use for this job.
Large data types include: FitbitIntradayCombined
Default: 'G.8X'

DefaultNumberOfWorkers:
Type: Number
Description: >-
How many DPUs to allot to this job. This parameter is not used for types
FitbitIntradayCombined and HealthKitV2Samples.
How many DPUs to allot for most data types.
Default: 1

MediumJobNumberOfWorkers:
Type: Number
Description: >-
How many DPUs to allot to this job.
Medium data types include: HealthKitV2Samples, HealthKitV2Electrocardiogram,
FitbitDailyData, FitbitSleepLogs
Default: 4

LargeJobNumberOfWorkers:
Type: Number
Description: >-
How many DPUs to allot to this job. This parameter overrides `DefaultNumberOfWorkers`
for data types FitbitIntradayCombined and HealthKitV2Samples.
How many DPUs to allot to this job.
Large data types include: FitbitIntradayCombined
Default: 8

MaxRetries:
Expand Down Expand Up @@ -110,13 +126,17 @@ Resources:
GlueVersion: !Ref GlueVersion
MaxRetries: !Ref MaxRetries
Name: !Sub "${Namespace}-{{ dataset["stackname_prefix"] }}-Job"
{% if (
{% if dataset["type"] == "FitbitIntradayCombined" -%}
WorkerType: !Ref LargeJobWorkerType
NumberOfWorkers: !Ref LargeJobNumberOfWorkers
{% elif (
dataset["type"] == "HealthKitV2Samples"
or dataset["type"] == "FitbitIntradayCombined"
or dataset["type"] == "HealthKitV2Electrocardiogram"
or dataset["type"] == "FitbitDailyData"
or dataset["type"] == "FitbitSleepLogs"
) -%}
WorkerType: !Ref LargeJobWorkerType
NumberOfWorkers: !Ref LargeJobNumberOfWorkers
WorkerType: !Ref MediumJobWorkerType
NumberOfWorkers: !Ref MediumJobNumberOfWorkers
{% else -%}
WorkerType: !Ref DefaultWorkerType
NumberOfWorkers: !Ref DefaultNumberOfWorkers
Expand Down
Loading