toInteger in ADF is creating Null

Sarvesh Pandey 71 Reputation points
2022-11-03T15:12:29.297+00:00

Hi All,
I have an csv source file in which a column is of Number datatype. I want o to convert it into integer.
I am using ADF Dataflow dervied column expression toInteger(toString(RowId)). This expression is producing Null values.
Also, i used this expression toInteger((RowId) but its producing the same result.

Please let me know how i can convert Number to Int. I can change CSV column datatype as well.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,553 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,893 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 31,731 Reputation points Microsoft Employee
    2022-11-04T06:01:41.243+00:00

    Hi @Sarvesh Pandey ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your question here.

    In order to convert the datatype , you can use Cast transformation in mapping data flow. The Cast transformation enables super-easy data type conversions with built-in type checking. Use the column drop-down to select columns from your stream of metadata for type conversion.

    For more details, kindly check : Cast Transformation in Mapping data flows in Azure Data Factory or Azure Synapse Analytics

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    0 comments No comments

0 additional answers

Sort by: Most helpful