Share via

Issue with sink to SQL

Adam Fila (PL) 0 Reputation points
2023-08-03T07:53:45.84+00:00

When I do a sink to SQL one of the values should be -1, in the ADF preview the value is correct but after inserting to the SQL the value is 1.

While doing it by hand there are no issues, and stored procedure doing the same in Power Automate is also working fine

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


1 answer

Sort by: Most helpful
  1. QuantumCache 20,681 Reputation points Moderator
    2023-08-03T15:40:06.3233333+00:00

    Hello @Adam Fila,

    Welcome to QnA,

    Thanks for reaching out on this forum, Community will help you with this issue.

    It's possible that the issue is related to the data type of the column in the SQL table. If the column is defined as an unsigned integer, it will not allow negative values and will automatically convert them to positive values.

    Another possible solution is to use a derived column transformation in your dataflow to convert the value to a string before inserting it into the SQL table. This will ensure that the value is not automatically converted to a positive integer. You can then use a SQL function to convert the string value back to an integer in the stored procedure.

    Please add more info on Sample Source Data? any CSV file? or any source SQL?

    Please provide sample data info, how does it look like? so that we repro on our side/

    Please Provide your Dataflow actions? how many stages/activities after Source-->Derived Column (Any Expressions?)-->Sink (SQL)? Please provide dummy info Image of your Dataflow how does it like?

    Thanks for your understanding!
    #NeedMoreInfo

    Was this answer helpful?

    0 comments No comments

Your answer

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