Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 months ago
Solved

Power BI DirectQuery to Redshift: ODBC error 42883 with pg_catalog.date_add(...) does not exist

  I'm using Power BI Desktop with Amazon Redshift in DirectQuery mode. Data loads initially (sometimes at least / sometimes it has errors), but when I scroll down in a visual (e.g., table), I ev...
  • Anonymous's avatar
    Anonymous
    10 months ago

    Hi Anonymous ,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    Power BI is generating a pg_catalog.date_add() call automatically. This is a MySQL-style function that isn't available in Redshift's PostgreSQL engine. This typically happens when Power BI loads more rows, such as when scrolling in a table visual, and it's not caused by any DAX or transformations you've applied.

    To resolve this behavior, please try the following steps:

    • Make sure you are using the latest versions of Power BI Desktop and the Redshift ODBC Driver, as previous versions may have translation issues.
    • It is recommended to use the native Redshift connector rather than a generic ODBC connection. The native connector leverages Microsoft’s optimized SQL translation and does not rely on pg_catalog.date_add.
    • Turn Off Auto Date/Time: Navigate to File > Options > Data Load > Time Intelligence and deselect Auto Date/Time for new files to stop automatic background date logic from being created.
    • In Power Query, confirm all date columns are explicitly typed as Date (not DateTime or Text).

    If the problem continues after following these steps, please use Performance Analyzer to capture the generated SQL and share a snippet that includes the pg_catalog.date_add call. This will help determine if the issue is related to the connector’s SQL translation layer and if it should be escalated as a product issue.

     

    Also thank you grazitti_sapna and Praful_Potphode your detailed follow-up helped narrow this down to a connector-level translation issue rather than a data or DAX logic problem.

    I hope my suggestions give you good ideas, if you need any further assistance, feel free to reach out.

     

    Thank you.