Excerpt |
---|
May 25, 2006 |
This technical tip shows how to configure Kettle so that input files such as XML, CSV and Excel files can be loaded from a Pentaho solution folder.
...
As always, you will want to gather the necessary resources before you start the hands on part of this article. This article's tip will NOT work with PCI (the Pentaho demo) versions PRIOR to release milestone 1.1.6.
- Pentaho Pre-Configured Install, version 1.1.6 build 279 or later
- Pentaho Getting Started Guide, version 1.1.6 build 279 or later
- Kettle, version 2.2.2 or later
- Our sample XML file, the CD collection (cdcollection.xml) - you can download that file here. Use your browser's right-click | Save As... option to right-click on the link and save the this file to your hard drive in a spot you will remember.
In order to keep this tip short and to the point, I'll assume you have a working knowledge of Kettle. It is an intuitive application to use, so if you are not familiar with it, you can get up to speed rather quickly.
...
- To finish this thing up, we will reuse the sample etl action sequence that comes with the PCI.
- Make a copy of the SampleTransformation.xaction file and name that copy xml_input.xaction. You can find the SampleTransformation.xaction file in <pentaho-demo>/pentaho-solutions/sampes/etl directory.
- Make a copy of the SampleTransformation.properties file and name that copy xml_input.properties. You can find the SampleTransformation.properties file in <pentaho-demo>/pentaho-solutions/sampes/etl directory.
- Open the xml_input.properties file in your favorite text editor.
- At the top of the file, change the value of the <name> node to be xml_input.xaction. It should look like this:
Code Block <name>xml_input.xaction</name>
- Under the resources/transformation-file/solution-file nodes, change the value of the location node to cdcollection_transform.xml. It should look like this:
Code Block <location>cdcollection_transform.xml</location>
- Under the component-definition node, change the value of the importstep node to "XML Input", without the quotes. This is the name of the step we created in our transformation. If you changed the step name in the transformation, then also change it here. It should look similar to this:
...
- First, make sure your PCI is up and running. If you don't know how to get it started, or are unsure as to whether it's already running, see the Pentaho Getting Started Guide for how to successfully start the server.
- Next make sure that the solution folders you are using in the PCI contains your xml_input.xaction!!
- Navigate through the sample pages to the ETL samples. From the Samples home page, go to "A Collection of Samples and Examples" | "Extraction, Transformation and Loading with Kettle".
- You should see the link to your new action sequence, labeled "XML Input Example". If you don't, try refreshing your solution repository by navigating to Content and Settings, and clicking the Publish link for the Solution Repository.
- Click the "XML Input Example" link. You should see your CD collection data in a new browser window.
Our example deployment of this solution is just one way you could deploy it. You can execute this action sequence in this PCI or any other Pentaho server using the web service, Java API or user interface. The Pentaho server automatically sets the 'pentaho.solutionpath', so no configuration is necessary on the server.
...