You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2022/07/01 19:03:01 UTC
[airflow] branch main updated: Update docstring in `SqlToSlackOperator` (#24759)
This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 69565ddfa0 Update docstring in `SqlToSlackOperator` (#24759)
69565ddfa0 is described below
commit 69565ddfa0371d83596b295e9c711074dd273f5f
Author: Alex Kruchkov <36...@users.noreply.github.com>
AuthorDate: Fri Jul 1 22:02:51 2022 +0300
Update docstring in `SqlToSlackOperator` (#24759)
---
airflow/providers/slack/transfers/sql_to_slack.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/airflow/providers/slack/transfers/sql_to_slack.py b/airflow/providers/slack/transfers/sql_to_slack.py
index 24a3ed93c6..8b9ff04af3 100644
--- a/airflow/providers/slack/transfers/sql_to_slack.py
+++ b/airflow/providers/slack/transfers/sql_to_slack.py
@@ -70,12 +70,11 @@ class SqlToSlackOperator(BaseOperator):
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SqlToSlackOperator`
- :param sql: The SQL statement to execute on Snowflake (templated)
- :param slack_message: The templated Slack message to send with the data returned from Snowflake.
+ :param sql: The SQL query to be executed (templated)
+ :param slack_message: The templated Slack message to send with the data returned from the SQL connection.
You can use the default JINJA variable {{ results_df }} to access the pandas dataframe containing the
SQL results
- :param sql_conn_id: Reference to
- :ref:`Snowflake connection id<howto/connection:snowflake>`
+ :param sql_conn_id: reference to a specific database.
:param sql_hook_params: Extra config params to be passed to the underlying hook.
Should match the desired hook constructor params.
:param slack_conn_id: The connection id for Slack.
@@ -166,7 +165,7 @@ class SqlToSlackOperator(BaseOperator):
def render_template_fields(self, context, jinja_env=None) -> None:
# If this is the first render of the template fields, exclude slack_message from rendering since
- # the snowflake results haven't been retrieved yet.
+ # the SQL results haven't been retrieved yet.
if self.times_rendered == 0:
fields_to_render: Iterable[str] = filter(lambda x: x != 'slack_message', self.template_fields)
else: