Database Connection

Use this connection to access data in a database using JDBC. You can create a Database connection for the following databases:

  • Amazon Redshift

  • Google CloudSQL for PostgreSQL

  • Google CloudSQL for MySQL

  • Hiveserver 2 (unsecured HTTP)

  • Hiveserver 2 (unsecured Binary)

  • SAP Hana

Before you create a database connection, download the corresponding JDBC driver and upload it to CDAP. For more information, see JDBC Drivers.

Configuration

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Name

No

Required. Name of the connection. Connection names must be unique in a namespace. Connection names can only include letters, numbers, underscores, and hyphens.

Description

No

Optional. Description of the connection.

JDBC Driver name

No

Required. Select the JDBC driver name to use.

Connection String

Yes

Required. JDBC connection string including database name.

User Name

Yes

Optional. User identity for connecting to the specified database. Required for databases that need authentication. Optional for databases that do not require authentication.

Password

Yes

Optional. Password to use to connect to the specified database. Required for databases that need authentication. Optional for databases that do not require authentication.

Connection Arguments

Yes

Optional. A list of arbitrary string tag/value pairs as connection arguments. These arguments will be passed to the JDBC driver, as connection arguments, for JDBC drivers that may need additional configurations. This is a semicolon-separated list of key-value pairs, where each pair is separated by a equals ‘=’ and specifies the key and value for the argument. For example, ‘key1=value1;key2=value’ specifies that the connection will be given arguments ‘key1’ mapped to ‘value1’ and the argument ‘key2’ mapped to ‘value2’. 

Path of the connection

To browse, get a sample from, or get the specification for this connection through Pipeline Microservices, the path property is required in the request body. It can be in the following form :

  1. /{schema}/{table} This path indicates a table. A table is the only one that can be sampled. Browse on this path to return the specified table. If a database doesn’t support schema (for example, MySQL), you can omit the /{schema} part.

  2. /{schema} This path indicates a schema. A schema cannot be sampled. Browse on this path to get all the tables under this schema. Such path is only valid for those databases that support schema.

  3. / This path indicates the root. A root cannot be sampled. Browse on this path to get all the schemas visible through this connection. If a database doesn’t support schema (for example, MySQL), browse on this path will get all the tables visible through this connection.

 

Created in 2020 by Google Inc.