CLI validation error for SQL Dataset moving from d...
# gooddata-cloud
r
CLI validation error for SQL Dataset moving from dev to staging Hi, in my DEV env, I’ve added a SQL dataset. Then I export the LDM json out. Then in STAGING, I import the LDM json Both envs (dev and staging) point to the same datasource so the schema/user is the same. Then I do a
gd clone -p dev
and then do a
gd deploy -p staging
(
gd -v
-> 0.8.0) But the deploy fails with this error
Copy code
Can not load table from server for profile "staging". Reason: DB request exception (state=GENERAL_ERROR dataSourceId=dbt_project-eltana_stg vendorErrorState=GENERAL_ERROR vendorErrorCode=3) General errororg.postgresql.util.PSQLException: ERROR: syntax error at end of input
      Position: 2729
I’m attaching the yml of the dataset it tries to validate. I doublechecked but running the SQL on the server directly and it works fine. I’m not sure where to look to troubleshoot. Any help appreciated?!
b
Hello Romain, I am sorry to hear about the issue. First of all, I would like to kindly ask, for more information about your setup. The error you shared mentions:
Copy code
dataSourceId=dbt_project-eltana_stg
however, the shared yaml definition file is for:
Copy code
id: ds_return_reasons
How are these two tied together? Are you by any chance using multiple data sources? In addition to the above, have you tried using the latest version - 0.9.0? I was informed that in v.0.9.0, a support for multiple data sources was added. It was not in 0.8.0, so maybe this can be the source of the issue? 🤔
r
Thanks for engaging @Branislav Slávik the
id: ds_return_reasons
is the name of the sql dataset the
dataSourceId=dbt_project-eltana_stg
is the name of the datasource in the GD. I’ve just upgraded to 0.9.0 and now getting new errors which I need to fix first to see if the original is still present or not:
Copy code
Error: gooddata.yaml in this folder is not valid. Fix all the issues and run the command again.

[e] in ./gooddata.yaml 6:5
    4|    token: $PROD_GOODDATA_API_TOKEN
    5|    workspace_id: 4de88e37b6c347a098b10fe274a8c325
    6|    data_source_id: dbt_project-gooddata_rds
    7|  dev_tse:
    8|    host: <https://xxxxx.cloud.gooddata.com/>
      Property "data_source_id" is not allowed here.
      at /Users/romain/PycharmProjects/eltana/embedded-analytics-suite/gooddata.yaml:6:5
after upgrading to 0.9.0 and changing the key from
data_source_id
to
data_source
, the command runs but fails with the same error. However I found the issue: it is related to the presence of comments (
-- xxxx
) inline the yml description. That breaks the piping of the command into PG. When removing the inline sql comment, it works. So sorted. I would suggest logging an improvement of the error message
b
I am glad that using the newer version help you to figure out the issue. 👍 Thank you for the suggestion, I will pass your feedback regarding the inline SQL comments further internally... 😉