Float and Double mismatch

Highlighted
Seven Stars

Float and Double mismatch

I have a csv with large number of columns that I am trying to upload to Snowflake.

 

However the problem that I am running into is that when create metadata for the csv, the column data type for all my columns is inferred as FLOAT.

The columns in Snowflake in the destination table, are defined as FLOAT as well.

 

When I create a tDBoutput Snowflake for this destination table, the data type is inferred as double within Talend.

 

So within tMap source file has FLOAT as datatype for the columns and destination table columns have Double data type. Talend doesn't like this and will not run my job.

 

Since the number of columns are around 700, I really would like to find a way if there is a way where I can modify either all  of 700 data type for source within Talend metadata or the data type for the destination table. So both Source and Destination data type defined in Talend match.

 

thoughts?

 

thanks

Moderator

Re: Float and Double mismatch

Hello,

In Talend; the Mapping between DataType from the Database and TalendType can be customize to fit and match with your need.

For more information, please have a look at this article:https://community.talend.com/t5/Migration-Configuration-and/Changing-the-default-data-type-mapping/t... 

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seventeen Stars

Re: Float and Double mismatch

First of all, the database type float does not mean necessarily the Java Float type. Example: PostgreSQL FLOAT8 is meant as Double.

If Talend takes the values as Double and write them with this type, this should always work.

What kind of problems do you get while running this job?

A way to automatically convert the types (I would not do that but if you think you should) is using the component tConvertType.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog