CData Python Connector for Presto

Build 24.0.9060

Establishing a Connection

The objects available within our connector are accessible from the "cdata.presto" module. To use the module's objects directly:

  1. Import the module as follows:
    import cdata.presto as mod
  2. To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
    mod.connect("Server=127.0.0.1;Port=8080;")

Connecting to Presto

Set the Server and Port connection properties to connect, in addition to any authentication properties that may be required.

Securing Presto Connections

To enable TLS/SSL in the connector, set UseSSL to true.

Authenticating to Presto

Presto supports authentication via either LDAP or Kerberos. If the Presto server does not have authentication set up, leave AuthScheme set to NONE (default).

The following subsections describe the requirements for authenticating with either LDAP or Kerberos.

LDAP

To authenticate with LDAP, set these connection properties:

  • AuthScheme: LDAP.
  • User: The authenticating user.
  • Password: The authenticating user's password.

Kerberos

For details on authenticating with Kerberos, see Using Kerberos.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060