Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

Key Expression Error: The key didn't match any rows in the table

I am connected to my gateway and I setup a schedule refresh for my dataset that is connected to an oracle server. However every time the dataset it set to refresh I get the (Key Expression Error: The key didn't match any rows in the table). The data and table is still good considering I can update maually on my power bi desktop. However when I try online to do refresh now or th schedule refresh I keep getting this error.

  • Anonymous

     

    Based on my test, the refresh from desktop and gateway use the same queries. In your previous reply, you say "The credentials I have entered has access to all data in our Oracle Database", Can you confirm it is the same credential used in your desktop where, as you state, the refresh works fine. If not the same, login Oracle with that credential and try to running the queries captured from Power BI gateway.

     

9 Replies

  • kcantor's avatar
    kcantor
    Icon for Community Champion rankCommunity Champion

    Anonymous

    Check your query. The only time I have received that error was when their was a small change to my source table. I double checked my query (and made a slight adjustment) then republished the data model. It fixed the problem.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I haven't altered my data which is why I am confused I setup the connection made a report on power bi desktop and then published it to power bi gateway. Setup schedule refresh and it gives me this error. I went back and clicked edit queries on power bi desktop to check query and clicked refresh preview to try to help the problem. Then republished and still nothing. 

  • Eric_Zhang's avatar
    Eric_Zhang
    Icon for Microsoft Employee rankMicrosoft Employee

    Anonymous

     

    Based on my test, the error message in subject would be caused by missing tables/views, either dropped or the user set in data source don't have access to. Please check the highlighted part in your refresh history to determine what is the problematic table.

     

    Also make sure that you've set the correct user with sufficient premission in the data source of your gateway. If the user is correct, try to delete and re-create the data source. If it still doesn't work, try to save your pbix in another name and publish it as a new report.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello Eric_Zhang

       

      The credentials I have entered has access to all data in our Oracle Database. The table hasn't been altered in anyway since I have uploaded it and setup the gateqay initially. I have also re-published several times under the same name and a different name and still nothing. When I go to my refresh history and look at the technical details as you did I do not see anything you are seeing except 

      -Data Source Type

      -Data Source Error

      -Cluster URI

      -Activity ID

      -Request ID

      -Time

      in that order. Nothing that gives me any information as to what specifically. 

       

       

      • Eric_Zhang's avatar
        Eric_Zhang
        Icon for Microsoft Employee rankMicrosoft Employee

        Anonymous

         

        Then can you try to capture what query does the Power BI Service send to your Oracle server? There should be some trace tool for Oracle.