Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I want to import an excel file on an existing table of a MSSQL server; the job I have create it works perfectly if I use columns with no spaces in name; when I try to use
columns with spaces in their name (the destination table has this kind of columns too) it fails.
I've read that tmap cannot use spaces in column names, spaces are all converted to "_", and it seems the cause of the job's failure; is there any way to solve this (very strange) problem ?
Spaces in column names are commonly used, so I'm very surprised of such a limitation of Talend; I know I could create a temporary table on destination DB and a db query to transfer data from the temporary table to the real destination table but it's a bad workaround, also because I have 10 different tables to write to and all of them has spaces on column name
Thanks
Marco
This is due to the fact that Talend Studio is a Java generator. Java does not permit objects with names with spaces. It is considered bad practice to create DB columns with spaces in the names as this will always require special alterations (depending on the DB) to query. However, I do understand that this happens. In these cases the columns inside your job will need to be named without spaces, but you can create your insert/update statements using a tDBRow. Not ideal, but it can be done.
This is due to the fact that Talend Studio is a Java generator. Java does not permit objects with names with spaces. It is considered bad practice to create DB columns with spaces in the names as this will always require special alterations (depending on the DB) to query. However, I do understand that this happens. In these cases the columns inside your job will need to be named without spaces, but you can create your insert/update statements using a tDBRow. Not ideal, but it can be done.
Thank you