Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snowflake to slack operator #9023

Merged
merged 7 commits into from
Jun 3, 2020
Merged

Add snowflake to slack operator #9023

merged 7 commits into from
Jun 3, 2020

Conversation

simond
Copy link
Contributor

@simond simond commented May 26, 2020

Addition of a new operator (snowflake_to_slack), the operator allows users to execute an SQL query in Snowflake and render the results into Slack. This operator renders the results of the SQL query as a Pandas Dataframe into the slack_message JINJA template variable.


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

Addition of a new `snowflake_to_slack` operator. The operator
allows you to run a SQL statement against Snowflake and render
the results into a Slack message.
@boring-cyborg
Copy link

boring-cyborg bot commented May 26, 2020

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://apache-airflow-slack.herokuapp.com/

@ad-m
Copy link
Contributor

ad-m commented May 27, 2020

@potiuk , could you confirm that TravisCI fail is not related to that PR?

@mik-laj
Copy link
Member

mik-laj commented May 27, 2020

@ad-m We have temporary problems with Kubernetes tests running on Travis Ci. This change does not apply to Kubernetes, so it is safe. @dimberman is working on improvements for Kubernetes tests.

@simond
Copy link
Contributor Author

simond commented May 28, 2020

Thanks for the review @turbaszek , just updated the PR with the changes you've suggested.

@simond
Copy link
Contributor Author

simond commented May 29, 2020

@feluelle Thanks for the review. I've made your suggested changes and ready for another look when you get a chance!

Copy link
Member

@feluelle feluelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you only want to init the hooks once not multiple times accidently :)

@JeffryMAC
Copy link

Can the result be sent as attachment file to the message?

@turbaszek turbaszek requested a review from feluelle June 3, 2020 13:49
@feluelle feluelle merged commit 1c9374d into apache:master Jun 3, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 3, 2020

Awesome work, congrats on your first merged pull request!

@feluelle
Copy link
Member

feluelle commented Jun 3, 2020

@JeffryMAC this can be added as feature request :)

@JeffryMAC
Copy link

@feluelle @simond submitted followup #9145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants