[resolved] How to set Float default values in the schema.

One Star

[resolved] How to set Float default values in the schema.

Hi Frds,
How to set default Float values in the schema of tOracleOutput component to replace null values retrieved from the data source.
I have tried for Integer and String, it is working fine.
FYI,
https://help.talend.com/search/all?query=How+to+set+default+values+in+the+schema+of+an+component&con...
But unable to set for Float data type.
Can someone suggest me how to do it.
Thanks
KK

Accepted Solutions
One Star

Re: [resolved] How to set Float default values in the schema.

Thanks Sabrina,
But I have found another way to do it.
Now it is working for tOracleOutput component. I have used SQL DEFAULT Constraint.
Thanks
KK 

View solution in original post


All Replies
Moderator

Re: [resolved] How to set Float default values in the schema.

Hi,
At present, only tFileInputDelimitedtFileInputExcel, and tFixedFlowInput support default values in the schema.

Have you tried to use tFileInputDelimited to set float default vaules in the schema to see if it works?
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.
One Star

Re: [resolved] How to set Float default values in the schema.

I have tried tFileInputDelimited and it is working fine.
But I want this feature for tOracleOutput component, 
where we need to Insert default values(like 0) for FLOAT column null values.
My question is why it didn't work with tOracleOutput Component?
Thanks
KK
One Star

Re: [resolved] How to set Float default values in the schema.

Hi Sabrina,
I have found this for tOracleInput and tOracleOutput Components.
https://help.talend.com/search/all?query=Verifying+default+values+in+a+retrieved+schema&content-lang...
Moderator

Re: [resolved] How to set Float default values in the schema.

Hi kk,
Thanks for your feedback. Have you already checked the workaround provided by shong?
As a workaround, you can convert the null value to a default Float value on a tMap before tOracleOutput. For example:
tFileInputDelimited--row1--tMap--out1–tOracleOutput
write the following expression for the column of output table:
row1.c1==null ||row1.c1.equals("")?10.1f:row1.c1

"
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.
One Star

Re: [resolved] How to set Float default values in the schema.

Thanks Sabrina,
But I have found another way to do it.
Now it is working for tOracleOutput component. I have used SQL DEFAULT Constraint.
Thanks
KK 

View solution in original post

Moderator

Re: [resolved] How to set Float default values in the schema.

Hi,
I have used SQL DEFAULT Constraint.

Would you mind sharing your solution with us? Screenshots will be highly appreciated.

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.
One Star

Re: [resolved] How to set Float default values in the schema.

Sorry for late response.
Thanks
KK
One Star

Re: [resolved] How to set Float default values in the schema.

Thanks so much for the solution !

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

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