jroachgolf84 commented on code in PR #49516:
URL: https://github.com/apache/airflow/pull/49516#discussion_r2072116369
##########
providers/databricks/docs/operators/sql_statements.rst:
##########
@@ -55,3 +55,49 @@ An example usage of the ``DatabricksSQLStatementsOperator``
is as follows:
:language: python
:start-after: [START howto_operator_sql_statements]
:end-before: [END howto_operator_sql_statements]
+
+
+.. _howto/sensor:DatabricksSQLStatementsSensor:
+
+DatabricksSQLStatementsOperator
+===============================
+
+Use the
:class:`~airflow.providers.databricks.sensor.databricks.DatabricksSQLStatementsSensor`
to either submit a
+Databricks SQL Statement to Databricks using the
+`Databricks SQL Statement Execution API
<https://docs.databricks.com/api/workspace/statementexecution>`_, or pass
+a Statement ID to the Sensor and await for the query to terminate execution.
+
+
+Using the Operator
+------------------
+
+The ``DatabricksSQLStatementsSensor`` does one of two things. The Sensor can
submit SQL statements to Databricks using
+the `/api/2.0/sql/statements/
<https://docs.databricks.com/api/workspace/statementexecution/executestatement>`_
+endpoint. However, the Sensor can also take the Statement ID of an
already-submitted SQL Statement and handle the
+response to that execution.
+
+It supports configurable execution parameters such as warehouse selection,
catalog, schema, and parameterized queries.
+The operator can either synchronously poll for query completion or run in a
deferrable mode for improved efficiency.
+
+The only required parameters for using the Sensor are:
+
+* One of ``statement`` or ``statement_id`` - The SQL statement to execute. The
statement can optionally be
+ parameterized, see parameters.
+* ``warehouse_id`` - Warehouse upon which to execute a statement.
+
+All other parameters are optional and described in the documentation for
``DatabricksSQLStatementsSensor`` including
+but not limited to:
+
+* ``catalog``
+* ``schema``
+* ``parameters``
+
+Examples
+--------
+
+An example usage of the ``DatabricksSQLStatementsOperator`` is as follows:
Review Comment:
Changes added locally, thanks!
--
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]