Forum Discussion

ivansz's avatar
ivansz
Frequent Visitor
2 years ago
Solved

integer out of range error when merging two tables

I have a Power BI report getting data from multiple tables in PostgreSQL database. The model has been working well for a while, but since today I get an error when I want to refresh the data: "OLE DB...
  • Alex87's avatar
    2 years ago

    The error you're encountering, "OLE DB or ODBC error: [DataSource.Error] PostgreSQL: 22003: integer out of range," suggests that during the data processing within Power BI (especially during the merging step), an integer value is being processed that exceeds the allowable range for the data type expected by the PostgreSQL database. In PostgreSQL, an int8 is an 8-byte integer, which should be more than sufficient to handle any integer values.

    Check your data types in Power Bi, try to examine the merge process and simplify it to debug, validate the data integrity by looking for extreme values that could generate the error.

  • ivansz's avatar
    2 years ago

    Finally, I found the root cause of the problem: One of the queries reads data from a view in the database and in that view one of the calculated columns got this "out of range" error. What is still a mystery that when I removed the merging in PowerBI all table refreshed without a problem (seemingly).