locked
Logic App (GET ROWS > Create CSV Table) duplicate rows appearing that are not in the MS SQL view RRS feed

  • Question

  • We have a MS SQL database in Azure with a view, if I look at the data in the view I can see for example that PERSON_A appears once.

    We have a logic app that uses GETS ROWS to retrieve all the data from this view, when looking at the RAW data being returned I can see PERSON_A appears twice with different ItemInternalId:

    "ItemInternalId":"efab705b-285c-49a1-9f26-8c1e2b8bf301"
    "ItemInternalId":"7dfcbfe2-2eae-45f1-b4fb-fdbb62e85ea8"

    This view returns about 3000 rows, pagination is turned on and set to 10000, this view should never return more than about 5000 rows so we did not want to deal with paginating the results and appending a CSV file. The result of the GET_ROWS is output to a CSV file, the duplicate row(s) appear in the CSV file as you would expect but this is odd as it is not showing in the view.

    Any help with using GET_ROWS and Create CSV Table would be appreciated, thanks.



    • Edited by Ryan Tyler Friday, April 6, 2018 1:58 PM typo
    Friday, April 6, 2018 1:57 PM

All replies

  • Does it consistently behave this way?  Are the duplicates next to each other?

    Is one of the ItenInternalId correct?  If so, what is the second one?  (Yes, this is leading to are you sure PersonA doesn't actually appear twice in the data? :)

    Saturday, April 7, 2018 11:18 AM
  • Different record(s) appear as duplicates after the data behind the view has been updated.

    Basically the data in the CSV is not matching what is in the view. We have tested the view and compared it to the CSV and there are differences. I would expect the CSV to have the same data as the view. I am not sure how to check the ItemInternalId as its a value that is generated and not in the database.

    Monday, April 9, 2018 8:23 AM
  • This does not help you with your problems but I would consider moving this functionality into an Azure function instead.

    Have the function poll the data, construct the CSV and then return to the LA, that picks up the file and sends it to whereever you need to send it.


    //Mikael Sand - Enfo Sweden If you find any post helpful, please mark it as such. If I answer your question, humor me with a thank you or mark as answer.

    Monday, April 9, 2018 9:10 AM
  • We just tried using a Execute SQL step rather than a SQL view and now the data is as expected, the connector using a view appears to be the issue.

    Some very odd results, duplicate and missing rows appear in the output.


    Monday, April 9, 2018 1:14 PM
  • Hi All, 

    I have come across the same issue and even with the V2 version of the connector. I have raised issue with Microsoft. The issue i have resolved with execute SQL query action.

    The issue seems to happens only when you call the SQL views not while you call a table. 

    SQL Query execute action came to our rescue. 

    Regads,

    Poojith Jain

    Blogs 1, 2, 3, 4 , 5

    Thursday, June 4, 2020 6:35 PM