Set Pentaho Spoon environment variables in a file - pentaho-spoon

I'd like to set database connections in a local Pentaho environment from a properties file so I can restart Spoon and keep the connection information. I'm sure there's some setting where I can do that, but I can't find it.

You can use the kettle.properties file.
It is located in $KETTLE_HOME/.kettle/kettle.properties, which is by default: ~/.kettle/kettle.properties
See also:
https://wiki.pentaho.com/display/EAI/.07+Variables
https://wiki.pentaho.com/display/COM/Using+Variables+in+Kettle
https://help.pentaho.com/Documentation/7.1/0L0/0Y0/030/050/020/000/010/010

Related

PSQL_HISTORY ignored by PyCharm

I have a Django project connecting to a PostgreSQL database which I develop in PyCharm, and I want to enable PostgreSQL history logging.
There is PSQL_HISTORY env variable set to /home/user/apps/postgres/logs/.pycharm_log, but when I start the project in PyCharm and update some data via the Django Admin (which certainly hits the database) -- nothing gets logged and the file is not created at all.
Is there a way to make PyCharm and PSQL_HISTORY work together as I expected?
'psql' is the name of a specific client tool. Why would a completely different tool use psql's configuration options? If you want to log every statement sent to the server, you could configure that in the server side with log_statement=all.

Connecting to DB2 HammerDB

I am using a Windows Machine to connect to a remote DB2 instance. Ran into this issue
SQL1531N The connection failed because the name specified with the DSN connection string keyword could not be found in either the db2dsdriver.cfg configuration file or the db2.cli.ini configuration file. Data source name specified in the connection string: <DSN>
I have configured ODBC Data source using ODBC Data Source Administrator it has connected successfully.
Upon further investigation, I am unable to locate db2dsdriver.cfg on IBM DATA SERVER DRIVER folder. I am able to find db2dsdriver.lvl and dbs2dsdriver.xds. Just not the .cfg file. I am also unsure where HammerDB looks for the config file.
I have looked at the configuration of DB2 from the website but I am unable to get any useful information from there. https://www.hammerdb.com/docs/ch04s02.html
For the tiny footprint ODBC and CLI driver (known as clidriver) from IBM, you are responsible for creating and editing the db2dsdriver.cfg configuration file. It is a small XML file documented here and in related linked pages. The hammerdb documentation also gives a minimal example and you linked to this page in your question.
You can create and edit this file either by command lines to the db2cli tool, or by directly editing with a text editor (or XML editor). It may be easier to use an editor than to learn the command lines, although command lines have the advantage that they lend themselves to scripting this activity for larger installations.
On Microsoft-Windows you can also use Notepad to create and edit the file db2dsdriver.cfg.
An important step is that following editing of the file you must first validate its contents before trying any database connections. Validation checks that the syntax of the XML in the file is correct. To validate, you use the db2cli validate command described here. It must show a successful result before you try to connect to any database. Once validation completes without errors, you can also use db2cli validate -connect -dsn XXX -user YYY -passwd ZZZ to test the connection independently of your application (in this case hammerdb). Once you get a successful connection with the db2cli validate -connect -dsn ... then your application (hammerdb) will connect correctly.
There are many examples of db2dsdriver.cfg contents online , but your first source should be the Db2 Knowledge Centre online, which details the command line options to the db2cli command, along with giving examples of db2dsdriver.cfg.
If you already have a working Db2 configuration with local and remote databases (but no db2dsdriver.cfg file), you can also use a tool db2dsdcfgfill to populate db2dsdriver.cfg from your existing Db2 configuration. See docs here.

Golden Gate ERROR OGG-05263 No GGSCHEMA clause

In OTN I am using these instructions to "try" and configure GoldenGate with a MSSQL Source DB to an Oracle12c Target DB
http://www.oracle.com/technetwork/articles/datawarehouse/oracle-sqlserver-goldengate-460262.html
Replicating Transactions Between Microsoft SQL Server and Oracle Database Using Oracle GoldenGate
Everything goes okay up till the command:
GGSCI (MSSQL) 2> ADD TRANDATA HRSCHEMA.EMP
Where I get the error:
ERROR OGG-05263 No GGSCHEMA clause was specified in the GLOBALS file. Please specify a GGSCHEMA shema name.
I searched and saw that currently there was no "GLOBALS" file. So I created one:
F:\GG\dirprm\globals.prm
And added one line:
GGSCHEMA hrschema
That did not help.
Still getting the same error.
Any suggestions?
Are there GoldenGate Environment variables that I need to have??
Thank-you in advace for your help.
I got the answer from Oracle Support:
The GLOBALS file should be in the main installation folder. Please remove the same from the dirprm file.
Also the GLOBALS file does not have extension. I could see that you have mentioned it as GLOBALS.prm
Made those changes and it works!

is there any way to create directory in data directory location of Amazon RDS PostgreSQL instance

AWS RDS PostgreSQL instance able to connect from another PostgreSQL client but not able to see data directory and configuration files .is there any way to edit/view data directory and configuration files
If you want to work with file system, use EC2 instances with postgres installed and configured as you wish. Neither postgres.conf, nor hba.conf cant be edited directly on file system.
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Parameters
Instead use amazon provided interface to change supported parameters or use SET command where possible...

Chef and PostgreSql

With amazon annoucing postgresql service in RDS, can we setup chef-server(11) with amazon rds postgresql database, rather than using the default databse that gets installed with the omnibus installer. I have read that we can achieve same by configuring chef-server.rb file and then reconfiguring the chef-server, but can't get what setttings to specify in the chef-server.rb file. Any help will be appreciated.
I did not try this, but it seems rather straightforward.
Check your chef-server-running.json, it should be in /etc/chef-server. The file has properties listed with which chef-server is running. Scroll down to "postgresql" - you will see some properties used for connecting to postgresql database.
Add the properties you would like to change (such as *listen_address* or *sql_password*) into chef-server.rb file like that:
postgresql['listen_address'] = 'new_host'
postgresql['sql_password'] = 'new_password'
and run
chef-server-ctl reconfigure
Then start chef-server and make sure that chef-server-running.json now has new values for postgresql.
Hopefully that helps.