I am having an issue whereby when using a target Unstructured File Stage to write to an Excel file, with RCP enabled on all stages, that the target stage is renaming the column names.
The job itself is quite simple:
Code: Select all
DB -----> TFM ------> EXCEL
The TFM is a placeholder incase we need to do anything on common fields
The EXCEL stage writes the excel file.
The job is fully parameterised, ie the SQL statement and target filenames / directories.
The issue is as follows: Where the SQL output column name is something like "Overdue_1-3_Month" the column is output in the Excel file as "CC_27_Overdue_1__3_Month".
It would seem that the stage does not like the hyphen (assuming that it is getting interpreted as a minus operator?) and as such renames the column (CC_27 seems to be column number 27 of the output then it has replaced the hyphen with a double underscore).
I have tried enabling quoted identifiers, and have checked the output from the SQL and it is passing the expected value "Overdue_1-3_Month", so its definitely occurring internally within the Excel file creation.
So my question is two fold:
Does anybody know if there is a way to override this auto renaming (or if indeed that is what is actually happening)?
Can anybody point me in the direction of some documentation which details in what circumstances this renaming can occur?
PS: I have checked with the target audience about changing the target column name - turns out the spreadsheet is used downstream by other external processes which rely on the column name being correct. Not saying that it cannot happen, but they would rather we try and fix it first.