Giter Club home page Giter Club logo

presto-db2's Introduction

Presto DB2 connector Actions Status Build Status

This is a plugin for Presto that allow you to use IBM DB2 Jdbc Connection

Connection Configuration

Create new properties file like <catalog-name>.properties inside etc/catalog dir:

connector.name=db2
connection-url=jdbc:db2://ip:port/database
connection-user=myuser
connection-password=mypassword

For a connection with SSL, uses following JDBC URL strings as connection-url:

connection-url=jdbc:db2://ip:port/database:sslConnection=true;

Notices:

  • the trailing semi-colon is required. Or it will thrown SQLException Invalid database URL syntax.
  • You can use db2.iam-api-key to specify API Key instead of user/password if IAM authentication is supported.

See official document of DB2 JDBC details from the article Connecting programmatically with JDBC.

Configuration Properties

Property Name Description
db2.varchar-max-length max length of VARCHAR type in a CREATE TABLE or ALTER TABLE command. default is 32672
db2.iam-api-key API Key of IBM Cloud IAM. Use this when choosing IAM authentication instead of user/password

Notice: you may need to customize value of db2.varchar-max-length to 32592 when using Db2 warehouse.

Extra credentials Support

Since release 324, it starts to support the idea of extra credentials where it allows prestosql client user to provide DB2 username and password as extra credentials that are passed directly to the backend DB2 server when running a Presto query.

  1. configure this for the DB2 connector catalog properties file:
user-credential-name=db2_user
password-credential-name=db2_password
  1. passing credentials directly to DB2 server:
presto --extra-credential db2_user=user1 --extra-credential db2_password=secret

See details from this answer.

Building Presto DB2 JDBC Plugin

mvn clean install

presto-db2's People

Contributors

kant avatar shawnzhu avatar stevemart avatar youngwookim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.