3
votes

I need to write a database table data to a text file with some transformation. There are two steps available to retrieve the data from the table, namely Table input and Database join. I don't see much difference between them except the "outer join?" option (correct me if I understood wrongly). So which would be better to use?

Environment:

Database : oracle

Pentaho Spoon : 5.3.* (Community edition)

Thanks in advance.

1

1 Answers

4
votes

Table Input step in PDI is used to read the data from your database tables. The query would be executed once and will return you the result set. Check the wiki.

Database Join works slightly different. It will allow you to execute your query based on the data received from the previous step. For every row coming in from the previous step, the query in this step will be substituted and is executed. Check the wiki.

The choice of using the above steps clearly depends on your requirement.

If you need to fetch the data set from a database table, you should use the Table Input Step - The best choice.

In case, you need to run the query in the database for every row to fetch the result, use Database Join - The best choice.

Hope it helps :)