Forum Discussion
Power BI DirectQuery to Redshift: ODBC error 42883 with pg_catalog.date_add(...) does not exist
- Anonymous10 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.
Hi Anonymous ,
Usually these issues arise because of date columns.apparently date columns in cloud datawarehouse(like snowflake,redshift etc) accept the dates like '0000-01-01','9999-12-31' which causes issue while loading data in powerbi.so my apparoch would be to identify if we have this type of data in date columns.If yes, then try to handle it using sql functions.
If date column is not causing the issue, then try loading columns one by one in desktop which will eventually give you the culprit.
Try the approach and let me know.
Please give kudos or mark it as resolved once confirmed.
Thanks and Regards,
Praful
No, this kind of data is not there. It's only data between 2020 and 2030.
Further, the error message suggests that the issue is not the date range, but that
"pg_catalog.date_add"
is called, which eventually not exists in postgres/redshift. It rather is mysql dialect, which power bi seems to generate here.