Expanding PDI's connection reach: connecting databases, CSV, Excel, XML, JSON, and REST APIs; using Hadoop and cloud storage connectors; writing results to data warehouses and analytics stores; and leveraging lookup and caching for performance.

In episodes 4-7, you worked with databases and CSV files. In the real world, data sources are far more diverse: Excel files sent by other people, JSON from APIs, XML from legacy systems, all the way to data in Hadoop and cloud storage. This episode opens the door to all those sources.
You'll learn the step for each format, the pattern for reading REST APIs and JSON, connections to Hadoop and cloud, how to load into data warehouses, and the lookup and caching techniques that keep performance healthy.
Input steps for files in Spoon follow intuitive names. Two that are often overlooked despite being very useful:
.xls and .xlsx files. Pick the sheet, specify the first row where data starts, and use Get Fields to read the structure. Important for files whose headers aren't on the first row.For XML, a basic understanding of XPath helps a lot. Example: for a document with the structure <orders><order id="1"><total>100</total></order></orders>, the rows are order elements, the id field is an attribute, and total is a child element. PDI lets you specify field locations visually in the XML input step.
Excel files from business users often contain several sheets at once — one sheet per branch or per month. In Excel input, enable the Get Sheet Names option to read the sheet list as its own stream, then determine which sheet is the main data source. Also note that the first row often contains a title that must be skipped: set Start row to skip the title row and check Is Header Names Present if the first row holds the column names.
Not all JSON is flat. Nested objects like {"customer": {"nama": "Budi", "alamat": {"kota": "Jakarta"}}} need JSON Path to reach fields inside — for example $.customer.alamat.kota. In the JSON input step, each selected path becomes one column, and you can select several fields from the same object in a single dialog. For arrays inside objects, combine the array path with the field path so Spoon produces one row per array element.
This pattern also applies when an API returns a paginated response: the second and subsequent responses are fetched by modifying the page parameter, then all results are combined. For large volumes, combine REST client with a batched Table output so memory doesn't blow up.
Modern data often arrives as JSON, whether from files or APIs. The two steps you must master:
$.orders[*] — and map fields from the objects inside it.The most common pattern: the REST client step calls an API and receives JSON, then its output feeds into the JSON input step to be split into rows. Here's an example of its shape:
REST client -> JSON input -> Transform -> OutputLet's look at its connection to a simple curl command equivalent to what the REST client step does:
curl -s -H "Authorization: Bearer TOKEN" https://api.example.com/v1/ordersThe JSON response is then split by JSON input. Remember, the REST client step in Spoon does the same thing from inside a transformation, with a result you can hold as fields for further processing.
Info
When an API needs authentication or special headers, fill them in via the Headers tab in the REST client step. For APIs that use a dynamic token, the common pattern combines an HTTP POST or REST client step with a JSON input step that extracts the token, then a variable to pass it along.
PDI Enterprise provides the Pentaho Big Data plugin for connecting to the Hadoop ecosystem; the community version can use HDFS steps and basic connectors. What you need to understand:
Because these connectors depend on plugins and versions, don't hesitate to check the official Pentaho documentation for installation steps matching your PDI version.
Cloud connectors follow the same pattern on all platforms: provide credentials (access key, secret, or role-based auth), specify the bucket and path, then use the step like reading a regular file. To try object storage access without opening Spoon, use the provider's CLI, for example aws s3 ls s3://bucket-lab — this is the fastest way to confirm credentials and path are correct before assembling a transformation. For modern architectures, many teams use PDI to write data to object storage in Parquet format (episode 17), then let analytical engines read directly from there. This turns cloud storage from a mere file target into the foundation of a data lake.
As a target, PDI is very flexible. For warehouse workloads, the common patterns:
COPY/BULK INSERT commands, which are far faster than per-row inserts.For analytics stores, PDI can write to OLAP databases like PostgreSQL/MonetDB, or export data to Parquet files for analytical engines to read. The key: understand the target's characteristics — batch size, indexing, and load mechanism — so loading doesn't slow down as the data grows.
Here's an example bulk-loading approach for large volumes — PDI exports data to a CSV file, then calls the database's bulk command from a Shell job entry:
psql -h localhost -d warehouse \
-c "\copy fact_penjualan FROM '/tmp/staging.csv' WITH (FORMAT csv, HEADER true)"Compared to per-row inserts from Table output, this approach can be tens of times faster for millions of rows — especially when network and database round-trips become the dominant cost.
As data volume grows, per-row lookup becomes the most common bottleneck. The optimization techniques you should know:
Success
A rule of thumb that's often used: if the data can be joined via SQL in the database, do it there. If not, use a lookup with caching and load the reference table into memory. A per-row lookup without cache is the last resort, not the first choice.
In episode 8 you widened PDI's reach: reading Excel, XML, JSON, and REST APIs; getting to know Hadoop and cloud storage connectors; writing to data warehouses and analytics stores; and applying lookup and caching for performance.
The key takeaways:
In episode 9, we tidy up our assets: metadata, repository, and version control — managing connections and shared objects, understanding the difference between repository and file-based storage, applying Git to PDI projects, and managing environments and variable substitution.