I am not able to get exact value from sql developer to target file or target table.

huangapple go评论40阅读模式
英文:

why i am not able get exact value from sql developer to target file or target table?

问题

我有两个环境,生产环境和QA环境,当我尝试从生产表中获取数值时,我可以从生产表中获得准确的值,但当我尝试从QA表中获取值时,会丢失一个小数位。我在Python和Informatica中都尝试了这个需求,但在两者中都遇到了相同的问题,仍然在努力获取准确的值。

我的一些数据示例:

来源:SQL开发者
目标:Informatica生成的平面文件

来源数值:-9.666666666666666
目标数值:-9.66666666666667

来源数值:-9.444444444444445
目标数值:-9.44444444444445

来源数值:-9.529411764705882
目标数值:-9.52941176470588

在这里你可以看到一些值在末尾被四舍五入,而一些值则少了一个小数位。
但奇怪的是,这些值确实存在,当我尝试获取QA和生产值之间的差异时,我可以看到预期的差异,但无法看到QA的准确值。

起初,我以为这是Informatica源或目标精度的问题,我尝试在整个映射中提供最大精度,但在精度方面没有问题。

我尝试将平面文件更改为Oracle表,但仍然无法获取完全相同的值。

另一个奇怪的地方是,QA和生产表的模式相同,包括数据类型和精度都相同,不知道问题出在哪里。

请分享你的想法,提前感谢!

英文:

I have two environment Prod and QA, when i try to get the value from Prod table, i got the exact value from Prod table but when i try to get the value from QA table, one decimal value is missing . I tried this requirement in both Python and Informatica but facing same issue in both , still struggling to the get exact value

some of example of my data:

source: SQL developer
target: flat file generated by Informatica

source value:-9.666666666666666
target value:-9.66666666666667

source value:-9.444444444444445
target value:-9.44444444444445

source value:-9.529411764705882
target value:-9.52941176470588

Here you can see for some values are getting rounding off at the end and some values one decimal is missing.
but strange thing is values are present there,when i try to get the difference between QA and Prod vales, i could see the difference when i expected , but not able to see the QA exact value.

first of all i thought its problem with Informatica source or target precision , i tried to give max precision across all over mapping, but there is no issue at precision.

I tried to change the flat file with oracle table but still not getting exact same value.

Here another strange thing is, both QA and Prod table are same schema, everything is same including data types and precision, don't know where is the problem

Please share your thought, Thanks in advance!

答案1

得分: 1

  1. 检查你的 SQL 客户端,看它是否在显示时将数字四舍五入
  2. 验证在 Informatica 的会话属性中是否设置了启用高精度,并参考 此文章 获取更多详情
  3. 检查整个映射中的精度和比例,对所有端口进行检查
  4. 将数据发送到一个文本文件中,并验证结果
英文:

A number of issues can be causing this. Try the following:

  1. Check your SQL Client if it's not rounding up numbers for the display
  2. Verify if Enable High Precision is set in session properties in Informatica and check this article for more details
  3. Check precision and scale across whole mapping, for all ports
  4. Send data to a flat file and verify the results

huangapple
  • 本文由 发表于 2023年5月15日 13:26:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76251085.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定