You are not logged in.
Announcement
Unanswered posts
|
Thanks for the suggestion.
The metadata is not in the repository because this is a query in the metadata repository. The metadata is built-in to the MSSQLInput component. I have manually set the metadata to the correct types.
Hi,
try to change the type of that column in the metadata repository directly and force the one you want
pedro,
You misunderstand. This is happening in the generated code of the MSSqlInput component where it stores data in the output row. I can not change it. The error occurs where it is trying to convert character data into numeric data, I suspect because the getMetaData function is returning incorrect metadata. I am not a java expert so I dont know how to proceed to find the problem.
Hi
It's a compatibility error with SQLServer.
Don't convert data in tMSSQLinput automatically. Use tMap to do this convertion.
Hope this will help you.
Best regards!
Pedro
The MSSqlInput component is trying to convert character data into numeric data. My guess is because the getMetaData() function is returning an incorrect value for the column in question. The column is type nchar.
the generated code looks like this
...
java.sql.ResultSetMetaData rsmd_tMSSqlInput_1 = rs_tMSSqlInput_1.getMetaData();
...
if (talendToDBList_tMSSqlInput_1 .contains(rsmd_tMSSqlInput_1.getColumnTypeName(6).toUpperCase(java.util.Locale.ENGLISH)))
{
row4.SoldToPartyID = FormatterUtils.formatUnwithE(Double.valueOf(tmpContent_tMSSqlInput_1));
} else {
row4.SoldToPartyID = tmpContent_tMSSqlInput_1.trim();
}
...
I get a java.lang.NullPointerException on the line
row4.SoldToPartyID = FormatterUtils.formatUnwithE(Double.valueOf(tmpContent_tMSSqlInput_1));
The db table rows have some character data in that column. I do not think it should be executing that line since the column is of character type.
The MSSQLInput component is executing a query that returns part of a table.
"select filename, BillingDate, PlanShipStartDate, ShipToParty, Shipment,
SoldToPartyID, SoldToParty, Street, City, Region, PostalCode,
SalesDoc, Contact_name, Contact_phone, Hdr_cmnt, Delivery
from dbo.NT_Ord
where outorder_status is null
group by filename, BillingDate, PlanShipStartDate, ShipToParty, Shipment,
SoldToPartyID, SoldToParty, Street, City, Region, PostalCode,
SalesDoc, Contact_name, Contact_phone, Hdr_cmnt, Delivery
order by filename, BillingDate, PlanShipStartDate, Shipment, ShipToParty,
SoldToPartyID, SoldToParty, Street, City, Region, PostalCode,
SalesDoc"
The strange thing is it works OK on my development machine, but fails on the production machine. The database schema are identical. The production server is Windows server 2003 with SQLServer 2005. The dev machine is WIndows 7 with SQlServer 2008.
Any help is appreciated.