简体   繁体   English

源限定符允许值超过 Informatica 中定义的大小

[英]Source qualifier allowing value more than defined size in Informatica

One of my informatica session behaving weird.我的一个 informatica session 表现怪异。 For a particular column precision and scale values are defined as 17,16respectively and enable the high precision is on.对于特定列的精度和比例值分别定义为 17,16 并启用高精度。 As per the precision and scale values it should allow the numbers which are having only single digit before the decimal point but in my session it allowing upto 2digits before the decimal point and failing for 3digits before the decimal point with the error Invalid number .根据精度和比例值,它应该允许小数点前只有一位数的数字,但在我的 session 中,它允许小数点前最多 2 位,小数点前 3 位失败,错误为Invalid number I am confused why it's allowing 2digits numbers as it should fail for them too?我很困惑为什么它允许 2digits 数字,因为它也应该失败? Ex: precision 17,scale 16 1.4567--allowed 12.4567--allowed 123.4567-- rejected例如:精度 17,比例 16 1.4567--允许 12.4567--允许 123.4567--拒绝

In addition to it I observed that in the source that column has data type as number but coming to source qualifier same column has data type decimal.除此之外,我观察到在源中,该列的数据类型为数字,但进入源限定符时,同一列的数据类型为十进制。 Why this internal convertion happened?为什么会发生这种内部转换?

Can anyone help on this?有人可以帮忙吗?

As for the second part of the question: one of Source Qualifier transformation fuctions is to convert any Source data types to PowerCenter data types.至于问题的第二部分: Source Qualifier转换功能之一是将任何 Source 数据类型转换为 PowerCenter 数据类型。 Whatever source you will use, Source Qualifier will convert the data types.无论您使用什么源, Source Qualifier都会转换数据类型。 This way you end up with same data types and comparison between Orace and MS SQL Server won't be a problem.这样,您最终会得到相同的数据类型,并且在 Orace 和 MS SQL 服务器之间进行比较不会有问题。

This is whats happening in case of '12.4567 -- allowed'.这就是“12.4567 -- allowed”的情况。 Since you have high precision mode on, infa is converting decimal to double automatically.由于您启用了高精度模式,infa 会自动将十进制转换为双精度。 Double is 8byte data. Double 是 8 字节数据。 So, if you set something col(11,9) and trying to insert 1234567890.1, infa will fail.因此,如果您设置 col(11,9) 并尝试插入 1234567890.1,infa 将失败。
Summary -概括 -
If you specify the precision greater than the maximum number of digits, the Data Integration Service converts decimal values to double in high precision mode.如果您指定的精度大于最大位数,则数据集成服务会在高精度模式下将十进制值转换为双精度值。

This is as per Infa documentation这是根据 Infa 文档

8 bytes (if high precision is off or precision is greater than 38) 
16 bytes (if precision <= 18 and high precision is on) 
20 bytes (if precision > 18 and <= 28) 
24 bytes (if precision > 28 and <= 38)   

Decimal value with declared precision and scale.具有声明精度和小数位数的十进制值。 Scale must be less than or equal to precision.比例必须小于或等于精度。 For transformations that support precision up to 38 digits, the precision is 1 to 38 digits, and the scale is 0 to 38. For transformations that support precision up to 28 digits, the precision is 1 to 28 digits, and the scale is 0 to 28. If you specify the precision greater than the maximum number of digits, the Data Integration Service converts decimal values to double in high precision mode.对于支持高达 38 位精度的转换,精度为 1 到 38 位,比例为 0 到 38。对于支持高达 28 位精度的转换,精度为 1 到 28 位,比例为 0 到28. 如果您指定的精度大于最大位数,数据集成服务将在高精度模式下将十进制值转换为双精度值。

https://docs.informatica.com/data-integration/powercenter/10-2/developer-tool-guide/data-type-reference/transformation-data-types.html https://docs.informatica.com/data-integration/powercenter/10-2/developer-tool-guide/data-type-reference/transformation-data-types.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM