Package: tap-ibm-db2
Tap-DB2 👑Tap-DB2is a Singer tap for IBM DB2 data sources. Built with theMeltano Tap SDKfor Singer Taps.Installation ⚙️Install from PyPi:pipxinstalltap-ibm-db2Install from GitHub:pipxinstallgit+https://github.com/danielptv/tap-db2.git@mainConfiguration 📝SettingRequiredDefaultDescriptionhostTruelocalhostThe DB2 hostname.portTrue50000The DB2 port.databaseTrueNoneThe DB2 database.schemaFalseNoneThe DB2 schema.userTrueNoneThe DB2 username.passwordTrueNoneThe DB2 password.encryptionTrueNoneEncryption settings for the DB2 connection. Disabled if omitted.connection_parametersFalseNoneAdditional parameters to be appended to the connection string. This is an objects containing key-value pairs.sqlalchemy_execution_optionsFalseNoneAdditional execution options to be passed to SQLAlchemy. This is an objects containing key-value pairs.query_partitioningFalseNonePartition query into smaller subsets.filterFalseNoneApply a custom WHERE condition per stream. Unlike the filter available in stream_maps, this will be evaluated BEFORE extracting the data.ignore_supplied_tablesFalseTrueIgnore DB2-supplied user tables. For more info check outDb2-supplied user tables.ignore_viewsFalseFalseIgnore views.stream_mapsFalseNoneConfig object for stream maps capability. For more information check outStream Maps.stream_map_configFalseNoneUser-defined config values to be used within map expressions.A full list of supported settings and capabilities for this
tap is available by running:tap-db2--about--formatjsonConfigure using environment variables ✏️This Singer tap will automatically import any environment variables within the working directory's.envif the--config=ENVis provided, such that config values will be considered if a matching
environment variable is set either in the terminal context or in the.envfile.Configure encryption settings 🔒This Singer tap supports encrypted connection settings to DB2 according to thepython-ibmdb driver.SSL without additional options:...plugins:extractors:-name:tap-db2variant:danielptvpip_url:tap-ibm-db2config:...encryption:{}This will appendSECURITY=SSL;to the connection string.SSL using SSLServerCertificate keyword:...plugins:extractors:-name:tap-db2variant:danielptvpip_url:tap-ibm-db2config:...encryption:ssl_server_certificate:<Full path to the server certificate>This will appendSECURITY=SSL;SSLServerCertificate=<Full path to the server certificate>;to the connection string.SSL using SSLClientKeyStoreDB and SSLClientKeyStoreDBPassword keywords:...plugins:extractors:-name:tap-db2variant:danielptvpip_url:tap-ibm-db2config:...encryption:ssl_client_key_store_db:database:<Full path to the client keystore database>password:<Keystore password>This will appendSECURITY=SSL;SSLClientKeyStoreDB=<Full path to the client keystore database>;SSLClientKeyStoreDBPassword=<Keystore password>;to the connection string.SSL using SSLClientKeyStoreDB and SSLClientKeyStash keywords:...plugins:extractors:-name:tap-db2variant:danielptvpip_url:tap-ibm-db2config:...encryption:ssl_client_key_store_db:database:<Full path to the client keystore database>key_stash:<Full path to the client keystore stash>This will appendSECURITY=SSL;SSLClientKeyStoreDB=<Full path to the client keystore database>;SSLClientKeyStash=<Full path to the client keystore stash>;to the connection string.Configure query partitioning 🧩This Singer tap supports the partitioning of SQL queries into smaller sub-queries to reduce the CPU load on the database. This is particularly useful when working with large amounts of data and a DB2 that has set strict resource limits per query.Note: This only works for streams with a numeric primary key.The configuration for query partitioning should look as follows:...plugins:extractors:-name:tap-db2variant:danielptvpip_url:tap-ibm-db2config:...query_partitioning:<stream>:primary_key:<primary key>partition_size:1000Replace<stream>with the stream name and<primary key>with the stream's primary key. Use*to apply a query partitioning setting to all streams not explicitly declared.Usage 👷‍♀️You can easily runtap-db2by itself or in a pipeline usingMeltano.Executing the Tap Directly 🔨tap-db2--version
tap-db2--help
tap-db2--configCONFIG--discover>./catalog.jsonDeveloper Resources 👩🏼‍💻Follow these instructions to contribute to this project.Initialize your Development Environmentpipxinstallpoetry
poetryinstallCreate and Run Tests 🧪Create tests within thetestssubfolder and
then run:poetryrunpytestYou can also test thetap-db2CLI interface directly usingpoetry run:poetryruntap-db2--helpTesting withMeltanoNote:This tap will work in any Singer environment and does not require Meltano.
Examples here are for convenience and to streamline end-to-end orchestration scenarios.Next, install Meltano (if you haven't already) and any needed plugins:# Install meltanopipxinstallmeltano# Initialize meltano within this directorycdtap-db2
meltanoinstallNow you can test and orchestrate using Meltano:# Test invocation:meltanoinvoketap-db2--version# OR run a test `elt` pipeline:meltanoelttap-db2target-jsonlSDK Dev GuideSee thedev guidefor more instructions on how to use the SDK to
develop your own taps and targets.