Home > Back-end >  How to process signed numbers in azure data factory
How to process signed numbers in azure data factory

Time:01-21

I am processing a .txt file in source and I have a data 120.2894. I want to push the data to sql db using adf dataflow activity. Automatically it takes string datatype and makes the output as 120.29 which is precise upto two decimal places. I have tried decimal l(15,4) using a cast activity but it remives the sign and gives the output as 120.2894.

I need the data in as usual format and the output shouold be 120.2894. Please let me know how I can do the cast in adf?

Ps:-The column also contains negative records.

CodePudding user response:

In SQL or data factory If it detects Number with sign It will not show it the sign is only visible for - numbers.

Sample data: enter image description here

Go to projection of source >> Import projection it will detect schema of column. enter image description here

Data preview for it:( It will only show - sign for numbers) enter image description here

Output: (same in sql database) enter image description here

If you still want data as 120.2894 you need to store it as String (varchar).

Go to projection of source >> Import projection it will detect schema of column >> then select string type for respective column. enter image description here

Data preview for it: enter image description here

Output: enter image description here

  • Related