-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Jdbc Operator How To #11472
Jdbc Operator How To #11472
Conversation
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
docs/howto/operator/jdbc.rst
Outdated
* Install the python module jaydebeapi: | ||
.. code-block:: bash | ||
|
||
pip install jaydebeapi |
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.
I think, we should use extra packages to manage dependencies for Airflow. WDYT?
See: https://airflow.readthedocs.io/en/latest/installation.html#extra-packages
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.
In the software section like for ODBC?
Should I add this as part of this PR?
docs/howto/operator/jdbc.rst
Outdated
The parameter ``autocommit`` if set to ``True`` will execute a commit after | ||
each command (default is ``False``) | ||
|
||
Prerequisite Tasks |
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 should be the second section in the document and the first should describe the JDBC.
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.
moved
docs/howto/operator/jdbc.rst
Outdated
|
||
pip install jaydebeapi | ||
|
||
* Install a JVM. |
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.
Can you add a link to external docs about it?
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.
I always found installing Java very platform specific, what do you think of https://adoptopenjdk.net/installation.html?
I guess it is missing the step about setting the JAVA_HOME folder like you do in your Dockerfile.
docs/howto/operator/jdbc.rst
Outdated
pip install jaydebeapi | ||
|
||
* Install a JVM. | ||
* Have the JDBC driver for your database installed. |
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.
Can you add a link to external docs about it? Ideally, you should include a simple command here to check if this condition is met.
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.
I have included a simple check, not sure if it is enough
@@ -0,0 +1,66 @@ | |||
# |
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 file should be in airflow.providers.jdbc.example_dags
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.
moved
|
||
# [START howto_operator_jdbc_template] | ||
delete_data = JdbcOperator( | ||
task_id='insert_data', |
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.
task_id='insert_data', | |
task_id='delete_data', |
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.
thanks, fixed
* Install the python module jaydebeapi: | ||
.. code-block:: bash | ||
|
||
pip install jaydebeapi |
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.
pip install jaydebeapi | |
pip install 'apache-airflow[jdbc]' |
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.
modified
docs/operators-and-hooks-ref.rst
Outdated
@@ -75,6 +75,8 @@ Fundamentals | |||
|
|||
* - :mod:`airflow.operators.latest_only` | |||
- | |||
* - :mod:`airflow.providers.jdbc.operators.jdbc` |
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 fundamentals section only includes operators that are in the Airflow core. Please look at the protocol section: https://airflow.readthedocs.io/en/latest/operators-and-hooks-ref.html#protocol-operators-and-hooks
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.
Thanks for pointing out this, I removed this and moved the link to the JDBC doc below
Good work @francescomucio 🎉 |
This, I think, has broken master and all open PRs
|
@potiuk Selective tests (? or something else) caused CI to not detect failing tests: https://github.com/apache/airflow/runs/1307780299
|
This was merged in apache#11472, but for some reason that didn't run tests so the failure wasn't noticed
This was merged in #11472, but for some reason that didn't run tests so the failure wasn't noticed
Sorry for the mess, not sure what I should keep an eye on next time |
This was merged in apache#11472, but for some reason that didn't run tests so the failure wasn't noticed
This was merged in apache#11472, but for some reason that didn't run tests so the failure wasn't noticed. a7ad204 fixed 1 error but the docs error was missed
This was merged in apache#11472, but for some reason that didn't run tests so the failure wasn't noticed
This was merged in apache#11472, but for some reason that didn't run tests so the failure wasn't noticed. a7ad204 fixed 1 error but the docs error was missed
Added an How To page for the Jdbc operator (and an example dag to get code snippet for the page)
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
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.