Search code examples
pentahokettlepentaho-spoonpentaho-data-integration

Pentaho metastore location when connecting to repository


I am configuring the repository to work with Pentaho. Currently I have a simple script that creates some Environmental variables (e.g. KETTLE_HOME) and then calls/opens the provided spoon client.

Here is how I am calling the spoon client:

set OPT="-DPENTAHO_METASTORE_FOLDER=%KETTLE_META_HOME%" %OPT%
call  %KETTLE_CLIENT_DIR%\Spoon.bat %OPT% %*

KETTLE_META_HOME is something like "PATH/TO/PROJECT/config/local-config" With this command, when spoon opens and I navigate to VSF Connections (for example) I can see the metastore files under PATH/TO/PROJECT/config/local-config/metastore, as desired.

The problem occurs when I connect to a repository (file based, not sure if relevant), as it creates a folder PATH/TO/PROJECT/.meta/metastore and simply reads/writes there instead...

The repository configuration is stored under PATH/TO/PROJECT/config/local-config/.kettle/repositories.xml and the base_directory is PATH/TO/PROJECT.

So my question is how can I keep using my PATH/TO/PROJECT/config/local-config/metastore even when connecting to the repository?

I tried setting the metastore folder in different ways, including within the kettle.properties file, however the problem still occurs.


Solution

  • Since the only reason to use Pentaho repository is to promote collaboration, I think it's better not to use Pentaho own repository and work with git or your source control system for collaboration.

    After all, PDI transformations and jobs are XML files so it's easy to use those version control systems. You have variables like ${Internal.Job.Filename.Directory} for relative paths, or you can use your own variable.

    You can also work with a couple of plugins available in Github to use environments so changing configurations is easier: http://diethardsteiner.github.io/pdi/2018/12/16/Kettle-Environment.html The plugins aren't maintained, they were developed for PDI 8.2, but I think they still work, since Hitachi Vantara hasn't been making major changes to the code base.