I am discovering Pentaho DI and i am stuck with this problem :
I want to insert data from a csv file to a custom DB, which does not support the “insert table” step. So i would like to use the sql script step, with one request :
INSERT INTO myTable
SELECT * FROM myInput
And my transformation would like this :

I don’t know how to get all my data from the csv to be injected in the “myInput” field.
Could someone help me ?
Thanks a lot 🙂
When you first edit the SQL Script step, click ‘Get fields’ button. This is going to load the parameters(fields from your csv) into box on the bottom left corner. Delete the parameters(fields) you don’t want to insert.
In your sql script write your query something like this where the question marks are your parameters in order.
Mark the checkboxes
execute for each rowandexecute as a single statement. That’s really about it. Let me know if you have any more questions and if you provide sample data I’ll make you a sample ktr file to look at.