User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Add a JDBC Driver to DPE

To configure a new JDBC driver for DPE, follow this guide. To learn how to configure other data source supported in DPE, refer to Data Sources Configuration.

  1. Download and copy the files related to JDBC drivers and its dependencies to appropriate subfolders. Make sure you have a separate folder for each driver.

    In the example of a BigQuery JDBC driver configuration given here, the JDBC driver and related files are put into the /dpe/lib/jdbc/bq folder.

  2. In on-premise deployments, edit the /dpe/etc/application.properties file.

    1. Add a custom JDBC driver configuration to the file using the following properties as a template. Make sure to modify the values accordingly.

      In the example, you can see a BigQuery JDBC driver configuration.

      When editing the template, keep in mind the following:

      • Replace the identifier of the driver (<driverId>) in all properties. The identifier needs to be unique and, ideally, should match the identifier of the database, for example, postgresql. However, you can set it to any alphanumeric value.

      • The values for driver-class and *-pattern properties can be found in the driver’s official documentation. If your driver is not stored in the default location, as described in step 2, include the absolute path to the driver in the property plugin.jdbcdatasource.ataccama.one.driver.<driverId>.driver-class-path. For example, C:\\drivers\\postgresql-*.jar.

        To provide multiple locations, use a semicolon (;) as a separator, for example:

        plugin.jdbcdatasource.ataccama.one.driver.bq.driver-class-path=GoogleBigQueryJDBC42.jar;bigQueryLibs/*.jar
      • In SQL query patterns, you can use placeholders for database objects:

        • full-select-query-pattern: Used for loading full data. Allowed placeholders: {columns}, {table}, {simpleTable}, {schema}, {database}.

        • preview-query-pattern: Used for loading data preview. Allowed placeholders: {columns}, {table}, {previewLimit}, {simpleTable}, {schema}, {database}.

        • row-count-query-pattern: Used for counting the number of rows in a catalog item. If the database-specific pattern is missing, the pattern SELECT {columns} FROM {table} is used instead. Allowed placeholders: {table}, {simpleTable}, {schema}, {database}.

        • sampling-query-pattern: Used for retrieving sample data from a catalog item. Allowed placeholders: {table}, {columns}, {limit}, {percentageLimit}, {simpleTable}, {schema}, {database}.

      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.name=<datasource_display_name>
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.connection-pattern=<JDBC_connection_string>
      # The following two properties include examples for driver-class-path and driver-class properties for BigQuery
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.driver-class-path=bq/GoogleBigQueryJDBC42.jar
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.driver-class=com.simba.googlebigquery.jdbc42.Driver
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.pooling-enabled=true
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.connection-timeout=20000
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.idle-timeout=300000
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.max-lifetime=900000
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.minimum-idle=1
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.maximum-pool-size=5
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.full-select-query-pattern=SELECT {columns} FROM {table}
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.preview-query-pattern=SELECT {columns} FROM {table} LIMIT {previewLimit}
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.dsl-query-preview-query-pattern=SELECT * FROM ({dslQuery}) dslQuery LIMIT {previewLimit}
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.dsl-query-import-metadata-query-pattern=SELECT * FROM ({dslQuery}) dslQuery LIMIT 0
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.row-count-query-pattern=SELECT COUNT(*) FROM {table}
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.sampling-query-pattern=SELECT {columns} FROM {table} WHERE RANDOM() < {percentageLimit} limit {limit}
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.query-quotation-mark=\"
      plugin.jdbcdatasource.ataccama.one.driver.<driverId>.disallowed-indexes-table-types=SYNONYM
    2. Save your changes.

  3. Restart your DPE. The new data source type is included as one of the options listed when creating a new data source connection in the web application. For more detailed instructions, see Connect to a Source.

If you want to use post-processing plans to write into the JDBC source you are connecting, it is also necessary to add the source to the global runtime configuration (the JDBC data source should be specified in DPM even if it is already declared in DPE).

Was this page useful?