简体   繁体   English

对于在源和目标中为 FLOAT 的字段,我应该在 Informatica 中保留什么数据类型?

[英]What should I keep as datatype in Informatica for a field that is FLOAT in source and target?

I have a field with FLOAT(53) datatype in SQL Server.我在 SQL Server 中有一个FLOAT(53)数据类型的字段。 Upon importing it in Informatica, it becomes FLOAT(15) .将其导入 Informatica 后,它将变为FLOAT(15)

What datatype I should be using to get max possible accuracy?我应该使用什么数据类型来获得最大可能的准确性?

Ok, a bunch of issues here.好吧,这里有一堆问题。

  1. Check this doc to learn about the available data types in Informatica查看此文档以了解 Informatica 中可用的数据类型
  2. If you want "max possible accuracy" you should use DECIMAL :) FLOAT (even Double) - is not a precise data type.如果您想要“最大可能的准确性”,您应该使用 DECIMAL :) FLOAT(甚至 Double) - 不是精确的数据类型。 It allows large numbers, it allows fractions - but it's not precise.它允许大数,也允许小数 - 但它并不精确。 In fact it's impossible to represent 0.1!事实上不可能代表0.1! :) :)
  3. If you'll use DECIMAL, you'll have the precise number as long as it won't exceed 15 digits.如果您将使用 DECIMAL,只要不超过 15 位数字,您就会得到精确的数字。 For a larger numbers you will end up with DOUBLE anyway, unless...对于更大的数字,无论如何你最终都会得到 DOUBLE,除非......
  4. You enable HIGH PRECISION in your session properties.您在会话属性中启用HIGH PRECISION Then you will keep using precise DECIMAL numbers up to 38 digits.然后,您将继续使用最多 38 位的精确 DECIMAL 数字。
  5. If you'll exceed 38 digits, you will end up with non-precise DOUBLE anyway.如果您将超过 38 位,无论如何您最终都会得到不精确的 DOUBLE。 Yup - even with HIGH PRECISION enabled - check this doc .是的 - 即使启用了HIGH PRECISION - 检查此文档

In your case I presume you should use DOUBLE - the FLOAT in your SQL Server is not a precise type anyway.在您的情况下,我认为您应该使用DOUBLE - SQL Server 中的FLOAT无论如何都不是一个精确的类型。

This is also a great summary on the issue.也是对这个问题的一个很好的总结。

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

相关问题 存储数组的字段的数据类型应该是什么 - what should be the datatype of field to store arrays 我应该对文本字段使用哪种SQL Server数据类型,而该字段会被JOINED,“ LIKE'd”和被查询很多? - What SQL Server DataType should I use for a Text field which will be JOINED, “LIKE'd” and Queried against a lot? 我应该使用什么数据类型来存储SQL Server中的自定义值 - What datatype should I use to store custom value in SQL Server 1,565,000.62应该使用哪种C#数据类型? - What C# datatype should I use for 1,565,000.62? 我应该使用什么数据类型在 SQL Azure 数据库中保存文件? - What datatype should I use for saving a file in a SQL Azure database? 我应该使用哪种SQL Server数据类型来存储字节[] - What SQL Server Datatype Should I Use To Store A Byte[] 我应该使用什么数据类型变量来存储时间,以便我可以将它加载到我的数据库中 - What datatype variable should I use to store time so I can load it in my database 使用SQL Server向数据表添加包含空值的列时,我应该使用哪种数据类型? - What datatype should I use when adding a column that will contain a null to a Datatable with SQL Server? 从源到目标评估每个字段并进行更新 - Evaluate each field from source to target and update 如何从 3 列浮点数据类型构建日期? - How can I build a date from 3 columns of float datatype?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM