narayave commented on code in PR #34896: URL: https://github.com/apache/airflow/pull/34896#discussion_r1358347543
########## airflow/providers/microsoft/azure/operators/synapse.py: ########## @@ -49,6 +49,7 @@ class AzureSynapseRunSparkBatchOperator(BaseOperator): template_fields: Sequence[str] = ( "azure_synapse_conn_id", "spark_pool", + "payload" Review Comment: I would essentially look something like this. The templating allows to pass execution and task instance related attributes to the job. In the following example I pass the logical execution datetime to the job using `{{ ts }}`. ``` payload_example = { "name": "synapse_spark_def", "file": "abfss://<container>@<azstorageaccount>.dfs.core.windows.net/entrypoints/<filename>.py", "args": [ "--exec_time", "{{ ts }}", # Trying to pass something like a timestamp to job is where rendering will happen ], "jars": [], "pyFiles": [], "files": [], "conf": { "spark.dynamicAllocation.enabled": "false", "spark.dynamicAllocation.minExecutors": "3", "spark.dynamicAllocation.maxExecutors": "4", }, "numExecutors": 3, "executorCores": 4, "executorMemory": "28g", "driverCores": 4, "driverMemory": "28g" } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org