Forum Discussion

alfadila27's avatar
alfadila27
Regular Visitor
2 years ago
Solved

ODBC Issue in Power BI - Invalid Input Syntax

Hello Power BI community,

I'm encountering a rather perplexing issue while attempting to connect to an Amazon Redshift data source in Power BI. I'm receiving the following error message:

 

DataSource.Error: ODBC: ERROR [22P02] [Microsoft][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState 22P02] ERROR: invalid input syntax for integer: ""

Details:
DataSourceKind=AmazonRedshift
DataSourcePath=production-data-warehouse.crbtbg0npivu.ap-southeast-1.redshift.amazonaws.com;production
OdbcErrors=[Table]

 

 

Additionally, there's no int datatype in that table

 

I've tried examining and understanding this error message, but I'm still unsure about how to resolve it. Has anyone ever faced a similar issue or have insights on how to fix it?

Thank you so much for your assistance!

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi alfadila27 ,

    Based on the information you have provided, you can troubleshoot and resolve this issue by following the steps below:

    1. Validate the query to be sent to Redshift. Ensure that no empty strings are forced to be converted or converted to integers.
    2. If you are using the Power BI Query Editor, check the steps that involve data type conversion or filtering to ensure that they do not introduce empty strings where integers are required.

    You can enable tracing in Power BI Desktop for more detailed information about errors. By examining the trace log, you can identify the exact query or action that caused the error.

    Please let me know if you need any further assistance.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi alfadila27 ,

    Based on the information you have provided, you can troubleshoot and resolve this issue by following the steps below:

    1. Validate the query to be sent to Redshift. Ensure that no empty strings are forced to be converted or converted to integers.
    2. If you are using the Power BI Query Editor, check the steps that involve data type conversion or filtering to ensure that they do not introduce empty strings where integers are required.

    You can enable tracing in Power BI Desktop for more detailed information about errors. By examining the trace log, you can identify the exact query or action that caused the error.

    Please let me know if you need any further assistance.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.