Skip to content

Commit

Permalink
GCSFileTransformOperator: New templated fields source_object, `de…
Browse files Browse the repository at this point in the history
…stination_object` (#23328)

* `GCSFileTransformOperator`: New templated fields `source_object`, `destination_object`
* Add `source_object`, `destination_object` as templated fields
* fix docstring
closes: #23327
  • Loading branch information
eladkal committed Apr 28, 2022
1 parent 505af06 commit c82b3b9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions airflow/providers/google/cloud/operators/gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,12 @@ class GCSFileTransformOperator(BaseOperator):
data from source, transform it and write the output to the local
destination file.
:param source_bucket: The key to be retrieved from GCS. (templated)
:param destination_bucket: The key to be written from GCS. (templated)
:param source_bucket: The bucket to locate the source_object. (templated)
:param source_object: The key to be retrieved from GCS. (templated)
:param destination_bucket: The bucket to upload the key after transformation.
If not provided, source_bucket will be used. (templated)
:param destination_object: The key to be written in GCS.
If not provided, source_object will be used. (templated)
:param transform_script: location of the executable transformation script or list of arguments
passed to subprocess ex. `['python', 'script.py', 10]`. (templated)
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
Expand All @@ -553,7 +557,9 @@ class GCSFileTransformOperator(BaseOperator):

template_fields: Sequence[str] = (
'source_bucket',
'source_object',
'destination_bucket',
'destination_object',
'transform_script',
'impersonation_chain',
)
Expand Down

0 comments on commit c82b3b9

Please sign in to comment.