Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Newbie question here, I have been learning Talend by process of trial-and-error, but part of a PoC is to generate an Excel output from a fancy template we've been using for a long time and I'm unable to figure out even how to go about solving the problem.
Basically I have an Excel template which is sectioned by Salesperson (vertically) with each month of the year on a separate vertical row and columns going across. (see template imag)
Attempt 1
============
SQL Query
\
tMaps (perform data validations, calculations and rollups)
\
Lookup (offset row number)
\
tSplitRows (handled breakdown of 1 SQL result into 12 monthly rows)
\
Excel (output standard Talend Excel control was perfectly organized table (but not gapped to template)
tExcelSheetOuput (gapped to template horizontally, but could not get it to skip from section to section vertically)
Outcome: Being a novice, I was very satisfied I got the tSplitRows producing the 12 rows for each salesperson vertically. However, could not figure out how to communicate to the tFileExcelSheetOutput to jump from one section to the next.
Attempt 2
============
SQL Query
\
tMaps (perform data validations, calculations and rollups)
\
tUniqRow (on salesperson)
\
tFlowToIterateLookup (offset row number, let me be honest I have no idea how this is supposed to work)
\
(missing something here to pass data for Row into Iterative subtask, tried HashOutput)
\
tSplitRows (handled breakdown of 1 SQL result into 12 monthly rows)
\
tExcelSheetOutput
Outcome: Exception in component tFileExcelSheetOutput_1 java.lang.NullPointerException and corrupt workbook.
I've tried several different combinations for "Row start Index" value like : ((Integer)globalMap.get("row6.workbook_offset"))
Can someone point me in the right direction to solve this type of challenge, and I'm happy to work through it?
Many Thanks.
Exception in component tFileExcelSheetOutput_1
java.lang.NullPointerException
at local_project.workbook__t2_0_1.Workbook__T2.tMSSqlInput_1Process(Workbook__T2.java:12851)
at local_project.workbook__t2_0_1.Workbook__T2.tFileExcelWorkbookOpen_1Process(Workbook__T2.java:507)
at local_project.workbook__t2_0_1.Workbook__T2.runJobInTOS(Workbook__T2.java:17872)
at local_project.workbook__t2_0_1.Workbook__T2.main(Workbook__T2.java:17729)
.---------------.
| tLogRow_1 |
|=-------------=|
|workbook_offset|
|=-------------=|
|4 |
|5 |
|6 |
|7 |
|8 |
|9 |
|10 |
|11 |
|12 |
|13 |
|14 |
|15 |
|25 |
|26 |
...
|328 |
|329 |
|330 |
|331 |
'---------------'