Error in DBT cloud Server error: Database Error in rpc request (from remote system) syntax error at or near ")"

5.7k views Asked by At
WITH unioned_product_reports AS(
    {% set prod_relations = dbt_utils.get_relations_by_pattern('xyz_shema', 'test_products%') %}
    {{ dbt_utils.union_relations(relations = prod_relations) }}
    ranking_product_report_rows AS(
        SELECT *,
            ROW_NUMBER() OVER(PARTITION BY date, name ORDER BY batch_runtime DESC) rno
        FROM unioned_product_reports
    )
)

In dbt I am trying to union all tables by above using above dbt-utils packages but it showing error as:

Server error: Database Error in rpc request (from remote system) syntax error at or near ")" LINE 13: )

can someone suggest solution.

1

There are 1 answers

0
TKAY On

I don't know which database you are connecting to. I had the same error when connecting to Snowflake and fixed it with:

Go to the top right corner and click "settings gear", Go to profile settings, Go to credentials, Under credentials, select the Profile you are working on

  • Right slide menu will pop

Scroll down to development credentials and click the green connect snowflake account button. Or add the credentials you are using to connect to the respective DB. For me Snowflake, it should reconnect your snowflake authentication and you should be good to go

Hope it helps