Why CDM inline dataset only get 2 digits fraction?

Achates Chen 21 Reputation points

I am getting data by CDM inline dataset. I have some columns for cost which have fraction with decimals more that 2 digits. In infer drift column types setting, I tried decimal, float and double, but I always get 2 digits decimal only. How can I overcome this?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
7,139 questions
{count} votes

2 answers

Sort by: Most helpful
  1. MarkKromer-MSFT 5,156 Reputation points Microsoft Employee

    Rather than try to infer the type in the source, leave it as string and then cast it in a Derived Column using toDecimal()

  2. ShaikMaheer-MSFT 31,626 Reputation points Microsoft Employee

    Hi @Achates Chen , You can have plan to convert your data to string and then back to decimal. While converting decimal you use toDecimal() function to control how may fractional values to get after dot. Please check below screenshot for better idea.

    Please let us know how it goes. Thank you.