Inserting Floats or Doubles into a MySQL Table

One Star

Inserting Floats or Doubles into a MySQL Table

I'm trying to take a numerical value from an xml file and put it into a MySQL table. When I try and set the schemas (both for retrieving the value from the xml file and for putting it into the table) to use Float or Double values i get the error message:
Exception in component tMysqlOutput_1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Display width out of range for column 'Price' (max = 255)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
... etc.
and the price is definitely not that large a number.
Any ideas on what i'm doing wrong?
One Star

Re: Inserting Floats or Doubles into a MySQL Table

I'm having the same problem. I'm getting the same error when trying to read a price value from an XML file and insert it into MySQL as a float or double. Anyone know what's going on here?

Re: Inserting Floats or Doubles into a MySQL Table

Just define the length of your float (or double) by editing your MySQL Output Schema.
One Star

Re: Inserting Floats or Doubles into a MySQL Table

That worked - thanks for the tip.
One Star

Re: Inserting Floats or Doubles into a MySQL Table

Damien, please, how to edit the length of the float ? didn't find where this parameter is...

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download