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-2795] Oracle to Oracle Transfer Operator #3639
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3639 +/- ##
==========================================
- Coverage 77.51% 77.17% -0.35%
==========================================
Files 205 206 +1
Lines 15751 15769 +18
==========================================
- Hits 12210 12169 -41
- Misses 3541 3600 +59
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revise the docstring
@apply_defaults | ||
def __init__( | ||
self, | ||
oracle_destination_conn_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source and destination differ in order in the docstring/arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
oracle_destination_conn_id, | ||
destination_table, | ||
oracle_source_conn_id, | ||
source_sql, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called sql
in the docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done too.
cursor = src_conn.cursor() | ||
self.log.info("Querying data from source: {0}".format( | ||
self.oracle_source_conn_id)) | ||
cursor.execute(self.source_sql, self.source_sql_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would like to template the sql using the ninja2
templating engine. Why would we need the extra params? Note: I'm not an Oracle expert :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Fokko , both source_sql
and source_sql_params
are templated fields. The reason to use extra params is because in some DBAPI, special characters are only considered when passed using parameters.
81999b0
to
7971332
Compare
7971332
to
6c0720e
Compare
Just bumping up |
Make sure you have checked all steps below.
JIRA
Description
Tests
Commits
Documentation
Code Quality
git diff upstream/master -u -- "*.py" | flake8 --diff