Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ??
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....
.....select mapping_MSSQL.xml.....
See 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.
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.
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 .
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....
.....select mapping_MSSQL.xml.....
See 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.
okay , i will do so .
great trick .
thank you .