You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/30 19:25:01 UTC

[GitHub] [airflow] shahar1 opened a new pull request, #28653: Add guide for Apache Pinot operators

shahar1 opened a new pull request, #28653:
URL: https://github.com/apache/airflow/pull/28653

   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   closes: #8194
   related: #18930
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] shahar1 commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
shahar1 commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1059504410


##########
airflow/providers/apache/pinot/example_dags/example_pinot_dag.py:
##########
@@ -0,0 +1,44 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,
+    start_date=datetime(2021, 1, 1),  # Override to match your needs
+    tags=["example"],
+) as dag:
+    # [START howto_operator_pinot_admin_hook]
+    pinot_admin_hook = PinotAdminHook(
+        conn_id="pinot_admin_default", cmd_path="pinot-admin.sh", pinot_admin_system_exit=True

Review Comment:
   It is provided by [Apache Pinot binary distribution](https://docs.pinot.apache.org/operators/cli).
   @eladkal Should I add anything about it beyond what's already written?



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
eladkal commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1059518913


##########
airflow/providers/apache/pinot/example_dags/example_pinot_dag.py:
##########
@@ -0,0 +1,44 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,
+    start_date=datetime(2021, 1, 1),  # Override to match your needs
+    tags=["example"],
+) as dag:
+    # [START howto_operator_pinot_admin_hook]
+    pinot_admin_hook = PinotAdminHook(

Review Comment:
   Hooks should not be in top level code.
   If the provider doesn't have PinotOperator and we use only hooks then we should wrap the hook with python decorator



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] chethanuk-plutoflume commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
chethanuk-plutoflume commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1059501654


##########
airflow/providers/apache/pinot/example_dags/example_pinot_dag.py:
##########
@@ -0,0 +1,44 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,
+    start_date=datetime(2021, 1, 1),  # Override to match your needs
+    tags=["example"],
+) as dag:
+    # [START howto_operator_pinot_admin_hook]
+    pinot_admin_hook = PinotAdminHook(
+        conn_id="pinot_admin_default", cmd_path="pinot-admin.sh", pinot_admin_system_exit=True

Review Comment:
   Where is this file `pinot-admin.sh`?



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] shahar1 commented on pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
shahar1 commented on PR #28653:
URL: https://github.com/apache/airflow/pull/28653#issuecomment-1374483753

   > Just a few small suggestions. I agree with @eladkal that some context around the use of the `pinot-admin.sh` file in the task would be helpful.
   
   Thank you for all the suggestions, I committed them all.
   Working on the final touches for documenting `pinot-admin.sh` and I think that we're ready do go :)


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] shahar1 commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
shahar1 commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1065039050


##########
docs/apache-airflow-providers-apache-pinot/operators.rst:
##########
@@ -0,0 +1,73 @@
+ .. 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.
+
+
+Apache Pinot Hooks
+==================
+
+
+`Apache Pinot <https://pinot.apache.org/>`__ is a column-oriented, open-source, distributed data store written in Java. Pinot is designed to execute OLAP queries with low latency. It is suited in contexts where fast analytics, such as aggregations, are needed on immutable data, possibly, with real-time data ingestion.
+
+
+Prerequisite
+------------
+
+.. To use Pinot hooks, you must configure :doc:`Pinot Connection <connections/pinot>`.
+
+.. _howto/operator:PinotHooks:
+
+PinotAdminHook
+--------------
+
+This hook is a wrapper around the pinot-admin.sh script, which is used for administering a Pinot cluster and provided by Apache Pinot distribution. For now, only small subset of its subcommands are implemented, which are required to ingest offline data into Apache Pinot (i.e., AddSchema, AddTable, CreateSegment, and UploadSegment). Their command options are based on Pinot v0.1.0.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook`
+
+.. exampleinclude:: /../../tests/system/providers/apache/pinot/example_pinot_dag.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_pinot_admin_hook]
+    :end-before: [END howto_operator_pinot_admin_hook]
+
+Reference
+^^^^^^^^^
+
+For more information, please see the documentation at ``Apache Pinot improvements for PinotAdminHook<https://pinot.apache.org/>``
+
+PinotDbApiHook
+--------------
+
+This hook uses standard-SQL endpoint since PQL endpoint is soon to be deprecated.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~classairflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook`

Review Comment:
   Thanks, committed :)



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] josh-fell commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
josh-fell commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1064876791


##########
docs/apache-airflow-providers-apache-pinot/operators.rst:
##########
@@ -0,0 +1,73 @@
+ .. 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.
+
+
+Apache Pinot Hooks
+==================
+
+
+`Apache Pinot <https://pinot.apache.org/>`__ is a column-oriented, open-source, distributed data store written in Java. Pinot is designed to execute OLAP queries with low latency. It is suited in contexts where fast analytics, such as aggregations, are needed on immutable data, possibly, with real-time data ingestion.
+
+
+Prerequisite
+------------
+
+.. To use Pinot hooks, you must configure :doc:`Pinot Connection <connections/pinot>`.
+
+.. _howto/operator:PinotHooks:
+
+PinotAdminHook
+--------------
+
+This hook is a wrapper around the pinot-admin.sh script, which is used for administering a Pinot cluster and provided by Apache Pinot distribution. For now, only small subset of its subcommands are implemented, which are required to ingest offline data into Apache Pinot (i.e., AddSchema, AddTable, CreateSegment, and UploadSegment). Their command options are based on Pinot v0.1.0.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook`
+
+.. exampleinclude:: /../../tests/system/providers/apache/pinot/example_pinot_dag.py
+    :language: python
+    :dedent: 4
+    :start-after: [START howto_operator_pinot_admin_hook]
+    :end-before: [END howto_operator_pinot_admin_hook]
+
+Reference
+^^^^^^^^^
+
+For more information, please see the documentation at ``Apache Pinot improvements for PinotAdminHook<https://pinot.apache.org/>``
+
+PinotDbApiHook
+--------------
+
+This hook uses standard-SQL endpoint since PQL endpoint is soon to be deprecated.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~classairflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook`

Review Comment:
   ```suggestion
   For parameter definition, take a look at :class:`~airflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook`
   ```
   I don't _think_ the link the Python API doc would work here.



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal commented on pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
eladkal commented on PR #28653:
URL: https://github.com/apache/airflow/pull/28653#issuecomment-1374619587

   static checks are failing :(
   You can avoid it by enabling pre-commits


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal merged pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
eladkal merged PR #28653:
URL: https://github.com/apache/airflow/pull/28653


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] josh-fell commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
josh-fell commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1062562406


##########
docs/apache-airflow-providers-apache-pinot/operators.rst:
##########
@@ -0,0 +1,71 @@
+ .. 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.
+
+
+Apache Pinot Hooks
+==================
+
+
+`Apache Pinot <https://pinot.apache.org/>`__ is a column-oriented, open-source, distributed data store written in Java. Pinot is designed to execute OLAP queries with low latency. It is suited in contexts where fast analytics, such as aggregations, are needed on immutable data, possibly, with real-time data ingestion.
+
+
+Prerequisite
+------------
+
+.. To use Pinot hooks, you must configure :doc:`Pinot Connection <connections/pinot>`.
+
+.. _howto/operator:PinotHooks:
+
+PinotAdminHook
+--------------
+
+This hook is a wrapper around the pinot-admin.sh script. For now, only small subset of its subcommands are implemented, which are required to ingest offline data into Apache Pinot (i.e., AddSchema, AddTable, CreateSegment, and UploadSegment). Their command options are based on Pinot v0.1.0.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook`
+
+.. exampleinclude:: /../../tests/system/providers/apache/pinot/example_pinot_dag.py
+    :language: python
+    :start-after: [START howto_operator_pinot_admin_hook]
+    :end-before: [END howto_operator_pinot_admin_hook]
+
+Reference
+^^^^^^^^^
+
+For more information, please see the documentation at ``Apache Pinot improvements for PinotAdminHook<https://pinot.apache.org/>``
+
+PinotDbApiHook
+--------------
+
+This hook uses standard-SQL endpoint since PQL endpoint is soon to be deprecated.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~classairflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook`
+
+.. exampleinclude:: /../../tests/system/providers/apache/pinot/example_pinot_dag.py
+    :language: python
+    :start-after: [START howto_operator_pinot_dbapi_example]
+    :end-before: [END howto_operator_pinot_dbapi_example]

Review Comment:
   ```suggestion
       :language: python
       :dedent: 4
       :start-after: [START howto_operator_pinot_dbapi_example]
       :end-before: [END howto_operator_pinot_dbapi_example]
   ```
   Same idea here.



##########
tests/system/providers/apache/pinot/example_pinot_dag.py:
##########
@@ -0,0 +1,57 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.decorators import task
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,
+    start_date=datetime(2021, 1, 1),  # Override to match your needs
+    tags=["example"],

Review Comment:
   ```suggestion
       tags=["example"],
       catchup=False,
   ```
   We should add `catchup=False` so there aren't a year+ of DAG Runs that get created when this system test runs if the `start_date` isn't updated. This is typical in the example DAGs throughout the repo too.



##########
docs/apache-airflow-providers-apache-pinot/operators.rst:
##########
@@ -0,0 +1,71 @@
+ .. 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.
+
+
+Apache Pinot Hooks
+==================
+
+
+`Apache Pinot <https://pinot.apache.org/>`__ is a column-oriented, open-source, distributed data store written in Java. Pinot is designed to execute OLAP queries with low latency. It is suited in contexts where fast analytics, such as aggregations, are needed on immutable data, possibly, with real-time data ingestion.
+
+
+Prerequisite
+------------
+
+.. To use Pinot hooks, you must configure :doc:`Pinot Connection <connections/pinot>`.
+
+.. _howto/operator:PinotHooks:
+
+PinotAdminHook
+--------------
+
+This hook is a wrapper around the pinot-admin.sh script. For now, only small subset of its subcommands are implemented, which are required to ingest offline data into Apache Pinot (i.e., AddSchema, AddTable, CreateSegment, and UploadSegment). Their command options are based on Pinot v0.1.0.
+
+Parameters
+----------
+
+For parameter definition, take a look at :class:`~airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook`
+
+.. exampleinclude:: /../../tests/system/providers/apache/pinot/example_pinot_dag.py
+    :language: python
+    :start-after: [START howto_operator_pinot_admin_hook]
+    :end-before: [END howto_operator_pinot_admin_hook]

Review Comment:
   ```suggestion
       :language: python
       :dedent: 4
       :start-after: [START howto_operator_pinot_admin_hook]
       :end-before: [END howto_operator_pinot_admin_hook]
   ```
   Adding the `dedent` directive will provide better formatting of the code snippet in the docs since the `START/END` tags are indented in the example DAG.



##########
tests/system/providers/apache/pinot/example_pinot_dag.py:
##########
@@ -0,0 +1,57 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.decorators import task
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,

Review Comment:
   ```suggestion
       schedule=None,
   ```
   As of 2.4., the `schedule_interval` has been deprecated for the more general `schedule` parameter. [Here are the release notes](https://airflow.apache.org/docs/apache-airflow/2.4.0/release_notes.html#deprecation-of-schedule-interval-and-timetable-arguments-25410) for reference.



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] shahar1 commented on pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
shahar1 commented on PR #28653:
URL: https://github.com/apache/airflow/pull/28653#issuecomment-1374484103

   > Just a few small suggestions. I agree with @eladkal that some context around the use of the `pinot-admin.sh` file in the task would be helpful.
   
   Thank you for all the suggestions, I committed them all to the PR.
   Working on the final touches for documenting `pinot-admin.sh` and I think that we're ready do go :)


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] shahar1 commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
shahar1 commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1059541237


##########
airflow/providers/apache/pinot/example_dags/example_pinot_dag.py:
##########
@@ -0,0 +1,44 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,
+    start_date=datetime(2021, 1, 1),  # Override to match your needs
+    tags=["example"],
+) as dag:
+    # [START howto_operator_pinot_admin_hook]
+    pinot_admin_hook = PinotAdminHook(

Review Comment:
   Fixed



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal commented on a diff in pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
eladkal commented on code in PR #28653:
URL: https://github.com/apache/airflow/pull/28653#discussion_r1059880837


##########
airflow/providers/apache/pinot/example_dags/example_pinot_dag.py:
##########
@@ -0,0 +1,44 @@
+# 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.
+
+"""Example DAG demonstrating the usage of the PinotAdminHook and PinotDbApiHook."""
+
+from __future__ import annotations
+
+from datetime import datetime
+
+from airflow import DAG
+from airflow.providers.apache.pinot.hooks.pinot import PinotAdminHook, PinotDbApiHook
+
+with DAG(
+    dag_id="example_pinot_hook",
+    schedule_interval=None,
+    start_date=datetime(2021, 1, 1),  # Override to match your needs
+    tags=["example"],
+) as dag:
+    # [START howto_operator_pinot_admin_hook]
+    pinot_admin_hook = PinotAdminHook(
+        conn_id="pinot_admin_default", cmd_path="pinot-admin.sh", pinot_admin_system_exit=True

Review Comment:
   You can add clarification in the docs, possibly also a link to official docs of Pinot explaining what this is.



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] shahar1 commented on pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
shahar1 commented on PR #28653:
URL: https://github.com/apache/airflow/pull/28653#issuecomment-1375924702

   @eladkal @josh-fell Thank you!
   I rebased upon the main branch and ran the static checks using Breeze, it should be ok now.


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] josh-fell commented on pull request #28653: Add guide for Apache Pinot operators

Posted by GitBox <gi...@apache.org>.
josh-fell commented on PR #28653:
URL: https://github.com/apache/airflow/pull/28653#issuecomment-1375848497

   > static checks are failing :( You can avoid it by enabling pre-commits
   
   @shahar1 [Here is some info on the static code checks](https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst) if you find it helpful.


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org