Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ZZ1655504362
Contributor
Contributor

Spaces on destination database's column names

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

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

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.

View solution in original post

2 Replies
Anonymous
Not applicable

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.

ZZ1655504362
Contributor
Contributor
Author

Thank you