josh-fell commented on a change in pull request #21704:
URL: https://github.com/apache/airflow/pull/21704#discussion_r813975757



##########
File path: airflow/providers/trino/transfers/gcs_to_trino.py
##########
@@ -0,0 +1,118 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""This module contains Google Cloud Storage to Trino operator."""
+
+import csv
+import json
+from tempfile import NamedTemporaryFile
+from typing import TYPE_CHECKING, Iterable, Optional, Sequence, Union
+
+from airflow.models import BaseOperator
+from airflow.providers.google.cloud.hooks.gcs import GCSHook
+from airflow.providers.trino.hooks.trino import TrinoHook
+
+if TYPE_CHECKING:
+    from airflow.utils.context import Context
+
+
+class GCSToTrinoOperator(BaseOperator):

Review comment:
       Within operators and sensors you can specify `template_fields` which 
allow the values for those args to be Jinja templated and unlock some 
functionality with TaskFlow API. The Concepts docs have some [information on 
Jinja templating in 
operators](https://airflow.apache.org/docs/apache-airflow/stable/concepts/operators.html#jinja-templating).
   
   So you'd want to think about how users might interact with this operator. 
Could they potentially use any of the [built-in Jinja 
templates](https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html)
 as part of the arg for certain parameters or even want to use an output from 
an upstream task as the value?
   
   Storage buckets/containers and object names are pretty classic examples 
where Jinja templating is used frequently.  Especially if you think about 
date-partitioned paths. This is why I was suggesting `source_bucket` and 
`source_object` as `template_fields`. But adding `trino_table` as an arg that 
can be templated can't hurt anything though.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to