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

[AIRFLOW-5816] S3 to snowflake operator #6469

Merged
merged 59 commits into from
Jan 21, 2020
Merged

[AIRFLOW-5816] S3 to snowflake operator #6469

merged 59 commits into from
Jan 21, 2020

Conversation

shaikshakeel
Copy link
Contributor

@shaikshakeel shaikshakeel commented Oct 30, 2019

Make sure you have checked all steps below.

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"
    • https://issues.apache.org/jira/browse/AIRFLOW-5816
    • In case you are fixing a typo in the documentation, you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.
    • In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal (AIP).
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

@codecov-io
Copy link

codecov-io commented Oct 30, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@bbe2f61). Click here to learn what that means.
The diff coverage is 93.4%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6469   +/-   ##
=========================================
  Coverage          ?   85.17%           
=========================================
  Files             ?      756           
  Lines             ?    39721           
  Branches          ?        0           
=========================================
  Hits              ?    33832           
  Misses            ?     5889           
  Partials          ?        0
Impacted Files Coverage Δ
airflow/providers/snowflake/operators/snowflake.py 0% <ø> (ø)
airflow/bin/cli.py 94.73% <ø> (ø)
airflow/gcp/hooks/bigquery.py 91.81% <ø> (ø)
airflow/utils/log/gcs_task_handler.py 0% <0%> (ø)
...ders/google/cloud/example_dags/example_dataproc.py 0% <0%> (ø)
airflow/providers/snowflake/hooks/snowflake.py 0% <0%> (ø)
airflow/operators/cassandra_to_gcs.py 64.91% <100%> (ø)
airflow/contrib/hooks/gcs_hook.py 100% <100%> (ø)
airflow/gcp/hooks/gcs.py 84.98% <100%> (ø)
airflow/operators/gcs_to_gcs.py 95.65% <100%> (ø)
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbe2f61...ce62aa1. Read the comment docs.

@mik-laj mik-laj added the provider:amazon-aws AWS/Amazon - related issues label Oct 31, 2019
@OmerJog
Copy link
Contributor

OmerJog commented Nov 5, 2019

FYI duplicated Jira https://issues.apache.org/jira/browse/AIRFLOW-3031

@shaikshakeel
Copy link
Contributor Author

@OmerJog can you give a pull request for this?

@OmerJog
Copy link
Contributor

OmerJog commented Nov 12, 2019

@shaikshakeel it's just a note for committers to close handle the duplicate jira.

@feluelle can you review?

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.

I think for new modules we should directly follow AIP-21 and place the operator directly into the providers package providers/snowflake.

In case of transfer operators where two providers are involved, the transfer operators will be moved to "source" (NOTE it's been changed to "target" in subsequent Update) of the transfer. When there is only one provider as target but source is a database or another non-provider source, the operator is put to the target provider.

@mik-laj @potiuk am I correct?

@shaikshakeel
Copy link
Contributor Author

shaikshakeel commented Nov 25, 2019

Hi @feluelle

Is the below path is okay?

providers/snowflake/operators/s3_to_snowflake ?
providers/snowflake/hooks/snowflake ?
providers/snowflake/operators/snowflake ?

@OmerJog
Copy link
Contributor

OmerJog commented Nov 25, 2019

@feluelle This is S3 to snowflake so it should be
/providers/amazon/aws/operators
isn't it?

@shaikshakeel
Copy link
Contributor Author

@feluelle can you confirm this?

@feluelle
Copy link
Member

feluelle commented Dec 2, 2019

I think it belongs to the snowflake provider because..

In case of transfer operators where two providers are involved, the transfer operators will be moved to "source" (NOTE it's been changed to "target" in subsequent Update) of the transfer. When there is only one provider as target but source is a database or another non-provider source, the operator is put to the target provider.

So

providers/snowflake/operators/s3_to_snowflake
providers/snowflake/hooks/snowflake
providers/snowflake/operators/snowflake

is correct imo.

@feluelle
Copy link
Member

feluelle commented Dec 2, 2019

@mik-laj @potiuk please correct me if I am wrong.

@shaikshakeel
Copy link
Contributor Author

@mik-laj @potiuk can you confirm this. I will change accordingly

@potiuk
Copy link
Member

potiuk commented Dec 9, 2019

Hello. I missed that one. Sorry. Yes it should be snowflake ( the operator) hooks should be in s3/snowflake.

Co-Authored-By: Felix Uellendall <feluelle@users.noreply.github.com>
@feluelle feluelle merged commit 17af3be into apache:master Jan 21, 2020
galuszkak pushed a commit to FlyrInc/apache-airflow that referenced this pull request Mar 5, 2020
- move Snowflake from contrib to providers
- fix pylint issues

Co-authored-by: Felix Uellendall <feluelle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools provider:amazon-aws AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants