Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

ODBC: ERROR [02000]

Hi!
I'm trying to apply changes (I'm not doing any change, I just want to load the tables). My data source is snowflake and I'm using Import connection.

 

Does anybody knows how to solve it?
Thanks,

7 Replies

  • ammohammed's avatar
    ammohammed
    Frequent Visitor

    Hi, 

    I resolved by changing snowfalke query to native queries. 

     

    let
    Source = Value.NativeQuery(Snowflake.Databases("XX.azure.snowflakecomputing.com",
    "TEST_QUERY",[Role="TEST"]){[Name="TEST"]}[Data],
    "select * from ""GOLD"".""SHIFT""", null, [EnableFolding=true]),
    #"Removed Columns" = Table.RemoveColumns(Source,{"ETL_UPDATE_JOB_NAME","People ID Masked Roster End Date Key", "ETL_ROW_EXPIRY_DATE", "ETL_ROW_CURRENT_FLAG", "ETL_INSERT_DATETIME", "ETL_UPDATE_DATETIME", "ETL_INSERT_JOB_NAME"})
    in
    #"Removed Columns"

     

    /*let
    Source = Snowflake.Databases("XX.azure.snowflakecomputing.com", #"Snowflake-WH", [Role= #"Snowflake-WH", CreateNavigationProperties=null, ConnectionTimeout=null, CommandTimeout=null]),
    Database = Source{[Name=#"Snowflake-DB",Kind="Database"]}[Data],
    GOLD_Schema = Database{[Name="GOLD",Kind="Schema"]}[Data],
    #"SHIFT_View" = GOLD_Schema{[Name="SHIFT",Kind="Table"]}[Data]
    in
    SHIFT_View*/

     

    Also, changed number of parrallel load.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for you response. I tried to replicate the changes but I got the following errors... Any idea?

       

       

      • ammohammed's avatar
        ammohammed
        Frequent Visitor

        Hi, If you hover over the info icon it will guide you to maximum memory (MB) value which is dependent on Maximum number of simultaneous evalutions value. In my screen shot, I have Maximum number of simultaneous evalutions =4 and Maximum memory (MB) =3528.  You setting Maximum number of simultaneous evalutions =8 so you can Maximum memory (MB) =1813 as per the error.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Thanks for reaching out us. After some researching, I think the problem arises because of the data source, not the Desktop.

    I found this similar post with the same error message.

    Error: 002043 (02000): SQL compilation error: Object does not exist, or operation cannot be performed · Issue #892 · Snowflake-Labs/terraform-provider-snowflake · GitHub

    The user found out that renaming between lowercase and uppercase causes mapping issues in snowflake.

    What he did in the end was I just deleted the resources from the state file.

    Hope this can help you~

     

    Best Regards,

    Stephen Tao

     

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

     

  • chetwest's avatar
    chetwest
    Regular Visitor

    We recently starting getting the same message too.  But the error only seems to show up in PowerBI Desktop.  The nightly refreshes in our service work just fine.  As was mentioned, we did find that switching to native queries does work.  But we don't consider this a long term solution.  It feels like there has been some recent change that has caused this.  

    Note - our admin noticed that if you just hit refresh a couple of times, it eventually works.  But it will error again in the future.

    • ammohammed's avatar
      ammohammed
      Frequent Visitor

      Hi, Yes,It started after upgrade of Power BI to July2024 version.  The issue is with Power M query setting not matching with default snowflake warehouse. e.g. in my case my default snowflake setting is "DEV" for Warehouse , ROLE, DB and error occurs when I am running Power BI query for "TEST".Changing Power M query to native it enforces the parameterized Warehouse , ROLE, DB.

       

      I have reverted my Power BI desktop version to April-2024  and everthing is fine.

       I have raised an issue with microsoft team but still they haven't accepted it as an issue.

      • Rodrigo18's avatar
        Rodrigo18
        New Member

        um , so the reverting works , isnt it?