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:
Go to projection of source >> Import projection it will detect schema of column.
Data preview for it:( It will only show -
sign for numbers)
Output: (same in sql database)
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.
Data preview for it:
Output: