Skip to content

Commit

Permalink
Add medium job types to JSON to Parquet job
Browse files Browse the repository at this point in the history
  • Loading branch information
philerooski committed Nov 20, 2024
1 parent b18c586 commit 10ed80a
Showing 1 changed file with 30 additions and 10 deletions.
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

0 comments on commit 10ed80a

Please sign in to comment.