{"id":13756612,"url":"https://github.com/IBM/trino-db2","last_synced_at":"2025-05-10T03:32:44.141Z","repository":{"id":43188253,"uuid":"162074010","full_name":"IBM/trino-db2","owner":"IBM","description":"Db2 JDBC connector for Trino","archived":true,"fork":false,"pushed_at":"2023-01-06T08:34:57.000Z","size":131,"stargazers_count":18,"open_issues_count":7,"forks_count":30,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-08-03T11:02:31.605Z","etag":null,"topics":["db2","presto","prestosql","trino","trino-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IBM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-17T04:21:58.000Z","updated_at":"2023-07-25T13:08:25.000Z","dependencies_parsed_at":"2023-02-05T17:32:00.742Z","dependency_job_id":null,"html_url":"https://github.com/IBM/trino-db2","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftrino-db2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftrino-db2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftrino-db2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftrino-db2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBM","download_url":"https://codeload.github.com/IBM/trino-db2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224911621,"owners_count":17390840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["db2","presto","prestosql","trino","trino-plugin"],"created_at":"2024-08-03T11:00:48.887Z","updated_at":"2024-11-16T11:32:00.534Z","avatar_url":"https://github.com/IBM.png","language":"Java","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Trino Db2 connector [![Actions Status](https://github.com/IBM/trino-db2/workflows/Java%20CI/badge.svg)](https://github.com/IBM/trino-db2/actions)\n\nThis is a plugin for [Trino](https://trino.io/) that allow you to use IBM Db2 Jdbc Connection\n\nNotice that it requires the connected database to be Db2 10 or Db2 LUW 9.7+ or greater versions to meet the precision need of the timestamp data type.\n\nSee [DEVELOPMENT](DEVELOPMENT.md) for information on development process.\n\n**Limitation**\n\nIt supports read/write Timestamp data type up to precision `9` while\nhigher precision will not be preserved. \n\n## Connection Configuration\n\nCreate new properties file like `\u003ccatalog-name\u003e.properties` inside `etc/catalog` dir:\n\n    connector.name=db2\n    connection-url=jdbc:db2://ip:port/database\n    connection-user=myuser\n    connection-password=mypassword\n\nFor a connection with SSL, uses following JDBC URL strings as `connection-url`:\n\n    connection-url=jdbc:db2://ip:port/database:sslConnection=true;\n\n**Notices**:\n* the trailing semi-colon is required. Or it will throw SQLException `Invalid database URL syntax`.\n* You can use `db2.iam-api-key` to specify API Key instead of user/password if IAM authentication is supported.\n\nSee the official document of Db2 JDBC details from the article [Connecting programmatically with JDBC](https://www.ibm.com/support/knowledgecenter/en/SS6NHC/com.ibm.swg.im.dashdb.doc/connecting/connect_connecting_jdbc_applications.html).\n\n## Configuration Properties\n\n| Property Name | Description |\n|---------------|-------------|\n|`db2.varchar-max-length` | max length of VARCHAR type in a CREATE TABLE or ALTER TABLE command. default is `32672`|\n|`db2.iam-api-key` | API Key of IBM Cloud IAM. Use this when choosing IAM authentication instead of user/password |\n\n**Notice**: you may need to customize value of `db2.varchar-max-length` to `32592` when using Db2 warehouse.\n\n## _Extra credentials_ Support\n\nSince release `324`, it starts to support the idea of _extra credentials_ where it allows trino client user to provide Db2 username and password as extra credentials that are passed directly to the backend Db2 server when running a query.\n\n1. configure this for the Db2 connector catalog properties file:\n```\nuser-credential-name=db2_user\npassword-credential-name=db2_password\n```\n2. passing credentials directly to Db2 server:\n```\ntrino --extra-credential db2_user=user1 --extra-credential db2_password=secret\n```\n\nSee details from [this answer](https://stackoverflow.com/a/58634432/914967).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIBM%2Ftrino-db2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIBM%2Ftrino-db2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIBM%2Ftrino-db2/lists"}