Skip to content

Commit de4502f

Browse files
authored
Add presto/trino connection documentation (#37536)
1 parent 08bc0f4 commit de4502f

3 files changed

Lines changed: 58 additions & 1 deletion

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
Presto Connection
19+
=================
20+
21+
The Presto connection type enables connection to Presto which is an open-source distributed SQL query engine designed for fast analytics on large-scale data sources, enabling interactive querying across multiple data platforms.
22+
23+
24+
Default Connection IDs
25+
----------------------
26+
27+
Presto Hook uses the parameter ``presto_conn_id`` for Connection IDs and the value of the parameter as ``presto_default`` by default.
28+
Presto Hook supports multiple authentication types to ensure all users of the system are authenticated, the parameter ``auth`` can be set to enable authentication. The value of the parameter is ``None`` by default.
29+
30+
Configuring the Connection
31+
--------------------------
32+
Host
33+
The host to connect to.
34+
35+
Port
36+
The port to connect to the host. Presto will use 8080 as default.
37+
38+
Login
39+
Effective user for connection.
40+
41+
Password
42+
This can be to pass to enable Basic Authentication. This is an optional parameter and is not required if a different authentication mechanism is used.
43+
44+
Extra (optional, connection parameters)
45+
Specify the extra parameters (as json dictionary) that can be used in Presto connection. The following parameters out of the standard python parameters are supported:
46+
47+
* ``auth`` - Specifies which type of authentication needs to be enabled. The value can be ``kerberos``.
48+
* ``source`` - Specifies source to connect to. Default value is ``airflow``.
49+
* ``protocol`` - Specifies port to connect with. Default value is ``http``.
50+
* ``catalog`` - Specifies which catalog to use. Default value is ``hive``.
51+
* ``verify`` - Client certificate path to connect with SSL/TLS.
52+
53+
54+
The following extra parameters can be used to configure authentication:
55+
56+
* ``kerberos__service_name``, ``kerberos__config``, ``kerberos__mutual_authentication``, ``kerberos__force_preemptive``, ``kerberos__hostname_override``, ``kerberos__sanitize_mutual_error_response``, ``kerberos__principal``, ``kerberos__delegate``, ``kerberos__ca_bundle`` - These parameters can be set when enabling ``kerberos`` authentication.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
:caption: Guides
3636

3737
PrestoTransferOperator types <operators/transfer/gcs_to_presto>
38+
Connection types <connections>
3839

3940
.. toctree::
4041
:hidden:

docs/apache-airflow-providers-trino/connections.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Extra (optional, connection parameters)
5151
* ``jwt__token`` - If jwt authentication should be used, the value of token is given via this parameter.
5252
* ``jwt__file`` - If jwt authentication should be used, the location on disk for the file containing the jwt token.
5353
* ``certs__client_cert_path``, ``certs__client_key_path``- If certificate authentication should be used, the path to the client certificate and key is given via these parameters.
54-
* ``kerberos__service_name``, ``kerberos__config``, ``kerberos__mutual_authentication``, ``kerberos__force_preemptive``, ``kerberos__hostname_override``, ``kerberos__sanitize_mutual_error_response``, ``kerberos__principal``,``kerberos__delegate``, ``kerberos__ca_bundle`` - These parameters can be set when enabling ``kerberos`` authentication.
54+
* ``kerberos__service_name``, ``kerberos__config``, ``kerberos__mutual_authentication``, ``kerberos__force_preemptive``, ``kerberos__hostname_override``, ``kerberos__sanitize_mutual_error_response``, ``kerberos__principal``, ``kerberos__delegate``, ``kerberos__ca_bundle`` - These parameters can be set when enabling ``kerberos`` authentication.
5555
* ``session_properties`` - JSON dictionary which allows to set session_properties. Example: ``{'session_properties':{'scale_writers':true,'task_writer_count:1'}}``
5656
* ``client_tags`` - List of comma separated tags. Example ``{'client_tags':['sales','cluster1']}```
5757
* ``timezone`` - The time zone for the session can be explicitly set using the IANA time zone name. Example: ``{'timezone':'Asia/Jerusalem'}``.

0 commit comments

Comments
 (0)