Hi @Raj Yalaka,
if I understand correctly, you just need to take the first data line (or 2nd line if we include the header line) of your input table (values that look like years) and transpose it to a 3 column output with column names: Period, Pilot, Vermont.
I suggest you build the following step composition in your plan/component:
- Text File Reader to read your CSV
- Alter Format to “add_output_columns” with the relevant output names and data types (add Period, Pilot, Vermont)
- Multiplicator step (name it e.g. “fork_periods”)
- set of Column Assigner steps for each mapping of the input column (name it e.g. map_yr1, map_yr2, map_yr3, ...) - add as many Column Assigners as you need to map the triplets of your output attributes inside each Column Assigner step using the following 3 assignments:
- map Pilot_Yr1 attribute to output attribute called Pilot
- map Vermont_Yr1 attribute to output attribute called Vermont
- map a respective string constant “Yr1” to output attribute called Period (don’t forget to adjust the constant when copy&pasting the CA Steps, and check the same for Pilot and Vermont mapping)
- Union Same - merge all the flows from your Column Assigners to a UnionSame step (not just plain Union) and name it e.g. sink_periods
- Use the union flow as you need / e.g. Text File Writer
This way you “generate” the additional lines you need from your “single” line input. What is not entirely clear to me is the first data line in the output table with
SI | Since Inception 1/1/91 | Since Inception 1/1/91 |
Maybe you will need another specific Column Assigner step to map it with this content as a static text (similar to Period mapping above).
Hope this helps.
Regards,
Petr
Hi @Raj Yalaka - I’m closing this thread for now. If you have any questions please feel free to follow up here or create a new post ♀️