You are not logged in.
Hi I need help with a tRowGenerator job.
I have input table that looks like the following:
I would like to generate a row based on the NbrCars with a new field for CarID that is randomly generated
I have been using the following pattern
(A) tMySQLInput -> (B) tFlowToIterate -> (C)tRowGenerator -> (D) tIterateToFlow -> (E)tLogRow
(A) - reads a table and defines the schema
(B) - iterates based on NbrCars
use default (key, value_ in globl variables is checked
(C) - generates rows
Number of rows for RowGenerator = LocID = (Integer) globalMap.get("row1.nbrcars")
LocID = (Integer) globalMap.get("row1.location_id")
LocDec = (String) globalMap.get("row1.location_desc")
(D) - IterateToFLow
mapping fields location_id value = globalMap.get("CURRENT_FILE")
I get a type mismatch error: cannot convert Object to String in the tRowGenerator step
I think you need the (String) reference before globalMap.get("CURRENT_FILE") in tIterateToFLow. The best way to find these problems is to click on the code tab at the bottom left of your job design and then find the row marked with red (click on the red mark). That will tell you exactly what assign statement is the problem.