Skip to content

Commit 89aa437

Browse files
authored
Add apache kylin conn type and kylin connection docs (apache#36413)
* Add apache kylin conn type and kylin connection docs * Change default kylin_conn_id to the default_conn_name variable
1 parent 1ab7b08 commit 89aa437

4 files changed

Lines changed: 64 additions & 1 deletion

File tree

airflow/providers/apache/kylin/hooks/kylin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ class KylinHook(BaseHook):
3232
:param dsn: dsn
3333
"""
3434

35+
conn_name_attr = "kylin_conn_id"
36+
default_conn_name = "kylin_default"
37+
conn_type = "kylin"
38+
hook_name = "Apache Kylin"
39+
3540
def __init__(
3641
self,
37-
kylin_conn_id: str = "kylin_default",
42+
kylin_conn_id: str = default_conn_name,
3843
project: str | None = None,
3944
dsn: str | None = None,
4045
):

airflow/providers/apache/kylin/provider.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ hooks:
5757
- integration-name: Apache Kylin
5858
python-modules:
5959
- airflow.providers.apache.kylin.hooks.kylin
60+
61+
connection-types:
62+
- hook-class-name: airflow.providers.apache.kylin.hooks.kylin.KylinHook
63+
connection-type: kylin
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
Apache Kylin Connection
19+
=======================
20+
21+
The Apache Kylin connection type enables connection to Apache Kylin.
22+
23+
Default Connection IDs
24+
----------------------
25+
26+
Kylin Hook uses parameter ``kylin_conn_id`` for Connection IDs and the value of the
27+
parameter as ``kylin_default`` by default.
28+
29+
Configuring the Connection
30+
--------------------------
31+
Host
32+
The host of the Kylin cluster (should be without scheme).
33+
34+
Port
35+
Specify the port to use for connecting the Kylin cluster.
36+
37+
Schema
38+
The default Kylin project that will be used, if not specified.
39+
40+
Login
41+
The user that will be used for authentication against the Kylin cluster.
42+
43+
Password
44+
The password of the user that will be used for authentication against the Kylin cluster.
45+
46+
Extra (optional, connection parameters)
47+
Specify the extra parameters (as json dictionary) that can be used in Kylin connection.

docs/apache-airflow-providers-apache-kylin/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
Changelog <changelog>
3030
Security <security>
3131

32+
.. toctree::
33+
:hidden:
34+
:maxdepth: 1
35+
:caption: Guides
36+
37+
Connection types <connections>
38+
3239
.. toctree::
3340
:hidden:
3441
:maxdepth: 1

0 commit comments

Comments
 (0)