Pentaho DB Changer
Change dynamically Pentaho database connections from kjb, ktr and xml files
Installation
pip install pentaho-db-changer
How to Use
Before execute the program you need to configure .ini file (config.ini) with your database settings.
You can follow this example:
First of all use a section ‘connect’ to select which database you will use.
[connect] connect = connect_local
Then, create a default section with the absolute path for pdi files.
[default] path = /home/pdi
At last, create a section for each connection that you want to use and change easily.
[conect_server] server = xxxxxx username = xxxxxx password = my_pass [conect_local] server = localhost username = root password = other_pass
Just execute __init__.py file as follow:
cd set_db_pdi python __init__.py
Using as a Module
Download this project with:
git clone https://github.com/kappius/pentaho-db-changer.git
All modules are in set_db_pdi folder and you can copy this folder and put inside your modules folder.
Then, import using:
from set_db_pdi import SetDB
You can set a custom configuration file name using:
SetDB('settings.ini').write_file_pdi()
If your password is encrypted (using right pdi format), then call:
SetDB().write_file_pdi(encrypt=False)
If not, then:
SetDB().write_file_pdi() # this is default call when you execute __init__.py file
You know if it is encrypted if password in config.ini is in format:
password = Encrypted 1ad32da2de2da7886
Using in reports
It works with Pentaho Report Designer’s files (.prpt) too, but only using encrypt=False since this issue was solved: http://jira.pentaho.com/browse/PRD-3608
Just unzip .prpt files and get file datasourcessql-ds.xml
This file (sql-ds.xml) is like .kjb and .ktr files and use same connection names.
Metadata
Release files for pentaho-db-changer 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pentaho-db-changer-0.0.3.tar.gz | 3.9 kB | Without provenance | Details |
Release files / pentaho-db-changer-0.0.3.tar.gz
| Download URL | pentaho-db-changer-0.0.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e7dfab6f43ac5dc43a37419248f19fc87d269f064a7483d2265d298ee632ecd
|
|
BLAKE2b-256 checksum How to use checksums |
482a46cb6696b438114b9d20f178a1b3022a2dc6ed3cf7f395c5fcc7c33a9ec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pentaho-db-changer 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.