-
Notifications
You must be signed in to change notification settings - Fork 16.3k
enhance druid connection parameters #35244
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
Conversation
docs/apache-airflow-providers-apache-druid/connections/druid.rst
Outdated
Show resolved
Hide resolved
docs/apache-airflow-providers-apache-druid/connections/index.rst
Outdated
Show resolved
Hide resolved
| Apache Airflow implemented connection to Apache Druid in different ways that listed here: | ||
| * Connection that uses the druid ingestion type that makes it possible to submit index/ingestion jobs. | ||
| To use the ingestion job, choose ``Druid Ingest Connection`` | ||
| * Connection that uses to Query data using SQL. | ||
| To Query data use ``Druid Broker Connection`` | ||
|
|
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.
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.
Since the page would be empty, I believe it it good to be for the context and reduce the risk of confusion
| default_conn_name = "druid_broker_default" | ||
| conn_type = "druid" | ||
| hook_name = "Druid" | ||
| conn_type = "druid_broker" |
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 assume that this might be a breaking changes. Because if you rename conn_type then previously created connection IDs will keep conn_type=druid as result Airflow UI have no idea how to deal with this connection type
And fallback to the first available Connection type into the list
So we need to write down information into the change log how to resolve this situation.
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.
That makes sense. How about writing a alembic migration for that?
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.
We do not have mechanism to run alembic when upgrading provider version.
I think noting it the changelog and making it a major release with breaking change should be enough.
cc @potiuk WDYT?
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.
Or adding backwards compatibility to handle both cases - I think it should be possible.
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 problem that DruidDbApiHook use DbApiHook and this might be the single place outside of the UI where conn_type also matter. And it could be hard, but not impossible to make it by backward compatible. Better just keep conn_type="druid" since it required almost zero effort.
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.
Indeed the easiest way would be switch to druid. how about also adding a warning that the name would be change in the next major release?
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.
We can decide on deprecating first or on cutting major release immediately.
We always prefer to deprecate first if we can.
| Connection( | ||
| conn_id="druid_broker_default", | ||
| conn_type="druid", | ||
| conn_type="druid_broker", |
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.
Unfortunetly this not affect already existed connection ID
| Connection( | ||
| conn_id="druid_ingest_default", | ||
| conn_type="druid", | ||
| conn_type="druid_ingest", |
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.
Unfortunetly this not affect already existed connection ID
|
@blcksrx are you planning completing this PR? |
|
Yeah, I do! Actually i asked a question but didn’t got any answers On Sun, Jan 7, 2024 at 07:47, Elad Kalif ***@***.***> wrote:
@blcksrx are you planning completing this PR?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Which question? |
|
About warning or decision about deprecation on the Major release On Sun, Jan 7, 2024 at 12:39, Elad Kalif ***@***.***> wrote:
Actually i asked a question but didn’t got any answers
Which question?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I answered about it in #35244 (comment) |
|
I see, Im gonna fix it this week. On Sun, Jan 7, 2024 at 12:47, Elad Kalif ***@***.***> wrote:
About warning or decision about deprecation on the Major release
I answered about it in #35244 (comment)
Is there a followup question?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |



closes: #35012
Enhancement on this PR:
pydruid.connectin theget_connmethod.Note:
The issue mentions about
get_pandas_dfmethod also. Since this is a DBAPIHook and the connection uses PEP8 DB API, there should be no problem to not override it from theDBAPIHook.In addition, back in 2019 I wrote a test function for this specific method:
airflow/tests/providers/apache/druid/hooks/test_druid.py
Lines 292 to 305 in 3d7c8f7
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.