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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
aminegac
Creator
Creator

column type 'float' problem when creating new table in sql server DB flipped to real

hi , i am using tinputdb to extract data from sql server db and toutputdb to save all those data in the a new sql server db that still has no tables in it , so i create by the same output componenet the table if not exist ; the problem here is that all data goes well except for the column that have float type ; they are float in the input database and although i choose that same type in schema , i find it created in the new database wrongly ; it is created as 'real' and also it is half the length !!! so the numbers are trimmed:!! ! and all the data is gone !

please how to make sure i get the correct type of float with length 8 in output db ?? what to choose in the schema ??

Talend OS 4 yrs / Java 17 Web Dev
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Yes, I would always generate a DB schema with scripts. I might use Talend to help quickly build the tables, etc, while I am working. But I would always update them and perfect them before using them in a production system.

 

To solve your type issue here, it is just a case of modifying the metadata for MSSQL in your project properties. Open the project properties and then go to General ---> Metadata of TalendType....

 

0695b00000ODWyoAAH.png 

.....select mapping_MSSQL.xml.....

 

0695b00000ODWyAAAX.pngSee the red box? Look at that and change the default=true from REAL to FLOAT. Then when you create the table again, it will create the column as a FLOAT.

View solution in original post

4 Replies
Anonymous
Not applicable

Can you show us the schema of your output db component?

 

It should be pointed out that it is not the best idea to create your tables like this. This functionality is provided to help in some situations, but I would never advise a table is recreated like this. You could query your source DB for its DDL and then run that through a DBRow component if you want to recreate the schema exactly....but even that is not ideal. It is always best to create your schema using DDL scripts. That way you keys and any constraints can be handled as well.

aminegac
Creator
Creator
Author

thank you for replying .

so you meant i use database scripts for building the architecture first(so everything is created well : types and keys and stored procedures...) and than use talend component to pump all the records ?

 

here is a screen shot showing what is configured and what is the bug .

 

 

0695b00000ODVgQAAX.png 

 

Talend OS 4 yrs / Java 17 Web Dev
Anonymous
Not applicable

Yes, I would always generate a DB schema with scripts. I might use Talend to help quickly build the tables, etc, while I am working. But I would always update them and perfect them before using them in a production system.

 

To solve your type issue here, it is just a case of modifying the metadata for MSSQL in your project properties. Open the project properties and then go to General ---> Metadata of TalendType....

 

0695b00000ODWyoAAH.png 

.....select mapping_MSSQL.xml.....

 

0695b00000ODWyAAAX.pngSee the red box? Look at that and change the default=true from REAL to FLOAT. Then when you create the table again, it will create the column as a FLOAT.

aminegac
Creator
Creator
Author

okay , i will do so .

great trick .

thank you .

Talend OS 4 yrs / Java 17 Web Dev