Forum Discussion

fink_'s avatar
fink_
New Member
2 years ago

'Not Unique request_id' Error in PowerQuery using API connection

Hi,
I encountered a problem when connecting to the API via PowerQuery. I get the message "not unique request ID" every time. The same query works flawlessly in Postman.

 

The API requires a unique request ID with each request sent. I generate a random request ID and query via Postman and get a response, but when I generate a random request ID and query via PowerQuery I get this message. Could it be that for some reason PowerQuery first checks the connection using the request ID, which is no longer unique in the actual query? Does this have anything to do with Query Folding? Is there any way around this? Or maybe it's something completely different?

 

Thank you for your help in advance!

2 Replies

  • rubayatyasmin's avatar
    rubayatyasmin
    Community Champion

    Hi, fink_ 

     

    In QF PowerQuery tries to push as much of the data transformation work as possible back to the data source (in your case, the API). During this process, PowerQuery might pre-execute parts of the query for optimization, which could potentially involve sending a test request with the same request ID. If your API strictly requires unique request IDs for every call, this could lead to the error you're seeing.

     

    Also, Postman and PowerQuery handle requests differently. 

     

    To solve the issue, Try disabling the query folding. and then Ensure that the method you're using to generate the request ID in PowerQuery is indeed creating a unique ID each time. There might be differences in how PowerQuery executes the function to generate these IDs compared to how Postman does it.

     

    You can also monitor the API calls if possible to see in which point the error is generating. 

    • fink_'s avatar
      fink_
      New Member

      Thanks rubayatyasmin for your answer but after disabling the query folding I get the same error. And I am 100% sure my request ID is unique.