PrestoToSlackOperator¶
Use the presto_to_slack
to post messages to predefined Slack
channels.
Using the Operator¶
This operator will execute a custom query in Presto and publish a Slack message that can be formatted and contain the resulting dataset (e.g. ASCII formatted dataframe).
An example usage of the PrestoToSlackOperator is as follows:
PrestoToSlackOperator(
task_id="presto_to_slack",
sql=f"SELECT col FROM {PRESTO_TABLE}",
slack_channel="my_channel",
slack_message="message: {{ ds }}, {{ results_df }}",
)