Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
I have a decimal column in Snowflake table , I want to insert the record as 01 for this column.
Tried creating routine and using the decimal format and converting it but no sucess.
public static BigDecimal padding_Bigdecimal() {
BigDecimal num = new BigDecimal("01");
DecimalFormat df = new DecimalFormat("00");
return new BigDecimal(df.format(num));
}
}
It is not returning 01 as the Decimalformat is a string and I want the value as Bigdecimal.
Any other way to get the value as 01 and insert into table columns that has decimal data type.
Regards
Hello @Ganshyam Patel ,
it will always show 1 for the input value 01 for the decimal column even run the insert sql on the snowflake console directly,
here is my test on snowflake:
create table TEST5(COL decimal(2,0));
insert into TEST5(COL) values(01);
SELECT * from TEST5;
so It's not a Talend Studio problem, it's a Snowflake problem.
Best regards
Aiming
Yes @Aiming Chen Agree,
It is the limitation of Snowflake to include only 1 and not the preceding 0.
Either need to change the datatype to varchar and store the value.
Hello,
Snowflake has a limitation and does not provide the precision as per the source.
Note: snowflake have a limit of 10 precision so we may see less digits in snowflake console.
https://docs.snowflake.com/en/sql-reference/data-types-numeric.html
However, data stored in backend of snowflake have high digits and Talend is able to show real data with high limit on precision as compared to snowflake. That is why it could be a wrong comparison between Talend and snowflake
Feel free to let us know if the behavior is OK with you when you use the dynamic schema feature in talend.
Best regards
Sabrina