Quentin Churet
02/20/2025, 10:29 AMMarvin
02/20/2025, 10:29 AMjob_configuration
section and a variables
section, where you can set placeholders for dynamic values.
Here's a minimal example of what this might look like in JSON:
json
{
"job_configuration": {
"cluster": "{{ cluster_value }}"
},
"variables": {
"cluster_value": {
"type": "string",
"description": "The cluster where the job will run."
}
}
}
In this setup:
- The job_configuration
section uses the placeholder {{ cluster_value }}
to reference the value provided in the variables
section.
- The variables
section defines cluster_value
, which can be customized per deployment or flow run.
You can find more details on configuring Prefect infrastructure in the Prefect documentation.Quentin Churet
02/20/2025, 10:52 AMMarvin
02/20/2025, 10:52 AMvariables
section. If you're looking to set a default value for the cluster
variable, you can do so by adding a default
field within the variable's definition.
Here's how you can modify the JSON to include a default value:
json
{
"job_configuration": {
"cluster": "{{ cluster_value }}"
},
"variables": {
"cluster_value": {
"type": "string",
"description": "The cluster where the job will run.",
"default": "default-cluster-name"
}
}
}
In this configuration:
- The default
field within cluster_value
is set to "default-cluster-name"
, which will be used if no other value is provided.
This approach ensures that a default cluster value is applied unless explicitly overridden in a specific deployment or flow run. For more detailed guidance, you can refer to the Prefect documentation.Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by