Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
karthik_koneru
Contributor III
Contributor III

[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
Labels (2)
1 Solution

Accepted Solutions
karthik_koneru
Contributor III
Contributor III
Author

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

8 Replies
Anonymous
Not applicable

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
karthik_koneru
Contributor III
Contributor III
Author

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
karthik_koneru
Contributor III
Contributor III
Author

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...
Anonymous
Not applicable

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
karthik_koneru
Contributor III
Contributor III
Author

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 
Anonymous
Not applicable

Hi,
I have used SQL DEFAULT Constraint.

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

Best regards
Sabrina
karthik_koneru
Contributor III
Contributor III
Author

Sorry for late response.
0683p000009MCPs.pngThanks
KK
Anonymous
Not applicable

Thanks so much for the solution !