Which are the effects of Convert Decimal To Integer in Copy Activity ?

Alex Siqueira 0 Reputation points
2025-03-26T16:15:09.7+00:00

I am ingesting Oracle tables with Number columns types with and witout scale.

In this case, I would like to use the property "convertDecimalToInteger" in the ADF Copy Activity to have Integers when having values like '123.000000'.

My question is, which are the effects of this option over monetary values ? For instance, will the value of "123.99" will be transformed in "124" or "123" ?

Thanks

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

2 answers

Sort by: Most helpful
  1. J N S S Kasyap 4,085 Reputation points Microsoft External Staff Moderator
    2025-03-26T17:16:49.29+00:00

    Hi @Siqueira, Alexssander A [NC]

    To copy data from Oracle, set the source type in the copy activity to OracleSource. The following properties are supported in the copy activity source section.

    User's image

    The convertDecimalToInteger property in Azure Data Factory's (ADF) Copy Activity is used to control the conversion of Oracle NUMBER data types with zero or unspecified scale to integers during data copy operations. When set to true, this property converts such decimal values to their integer equivalents by truncating the decimal portion without rounding. By default, this property is set to false, meaning that decimal values are not automatically converted to integers.

    The conversion follows truncation, meaning it simply removes the decimal part without rounding.
    If you enable convertDecimalToInteger, monetary values like 123.99 will be truncated to 123 instead of rounded to 124. This could lead to incorrect financial calculations or discrepancies in reports.

    Alternative Solutions

    If you need proper rounding, consider:

    1. Using a Data Flow instead of Copy Activity, where you can explicitly round values before conversion.
    2. Handling rounding within Oracle before ingestion (ROUND(column_name, 0)).

    Please refer the below Microsoft doc for reference
    https://learn.microsoft.com/en-us/azure/data-factory/connector-oracle?tabs=data-factory

    I hope this information helps. Please do let us know if you have any further queries.

    Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.

    Thank you.


  2. Alex Siqueira 0 Reputation points
    2025-03-26T18:01:26.8833333+00:00

    Thanks a lot. I will work with a solution to avoid the rounding as you suggested.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.