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 apache kylin conn type and kylin connection docs #36413

Merged
merged 2 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion airflow/providers/apache/kylin/hooks/kylin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ class KylinHook(BaseHook):
:param dsn: dsn
"""

conn_name_attr = "kylin_conn_id"
default_conn_name = "kylin_default"
conn_type = "kylin"
hook_name = "Apache Kylin"

def __init__(
self,
kylin_conn_id: str = "kylin_default",
kylin_conn_id: str = default_conn_name,
project: str | None = None,
dsn: str | None = None,
):
Expand Down
4 changes: 4 additions & 0 deletions airflow/providers/apache/kylin/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ hooks:
- integration-name: Apache Kylin
python-modules:
- airflow.providers.apache.kylin.hooks.kylin

connection-types:
- hook-class-name: airflow.providers.apache.kylin.hooks.kylin.KylinHook
connection-type: kylin
47 changes: 47 additions & 0 deletions docs/apache-airflow-providers-apache-kylin/connections.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

Apache Kylin Connection
=======================

The Apache Kylin connection type enables connection to Apache Kylin.

Default Connection IDs
----------------------

Kylin Hook uses parameter ``kylin_conn_id`` for Connection IDs and the value of the
parameter as ``kylin_default`` by default.

Configuring the Connection
--------------------------
Host
The host of the Kylin cluster (should be without scheme).

Port
Specify the port to use for connecting the Kylin cluster.

Schema
The default Kylin project that will be used, if not specified.

Login
The user that will be used for authentication against the Kylin cluster.

Password
The password of the user that will be used for authentication against the Kylin cluster.

Extra (optional, connection parameters)
Specify the extra parameters (as json dictionary) that can be used in Kylin connection.
7 changes: 7 additions & 0 deletions docs/apache-airflow-providers-apache-kylin/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
Changelog <changelog>
Security <security>

.. toctree::
:hidden:
:maxdepth: 1
:caption: Guides

Connection types <connections>

.. toctree::
:hidden:
:maxdepth: 1
Expand Down