Hi, I'm experiencing an error when setting logical...
# gooddata-cn
j
Hi, I'm experiencing an error when setting logical model (through PUT /api/v1/layout/workspaces/workspaceId/logicalModel) The API call ends up with
500
. I can see the following error in logs:
Copy code
ts="2023-07-24 13:07:33.571" level=ERROR msg="[33d5eb11-22] 500 Server Error for HTTP PUT \"/api/v1/layout/workspaces/workspaceId/logicalModel\"" logger=org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler thread=reactor-http-epoll-8 orgId=default spanId=1d3f152d9dd5a2a6 traceId=1d3f152d9dd5a2a6 userId=admin exc="org.jetbrains.exposed.exceptions.ExposedSQLException: org.postgresql.util.PSQLException: ERROR: relation \"obj_base\" does not exist
Can someone please guide me on how to resolve this issue? Thanks!
Copy code
Position: 69. Statement(s): SELECT obj_base.entity_type, obj_base.\"space\", obj_base.api_id FROM obj_base WHERE (obj_base.organization = ?) AND (FALSE) AND TRUE AND TRUE" logger=Exposed thread=reactor-http-epoll-8 orgId=default spanId=4207ed8debe4e561 traceId=4207ed8debe4e561 userId=admin exc="org.jetbrains.exposed.exceptions.ExposedSQLException: org.postgresql.util.PSQLException: ERROR: relation \"obj_base\" does not exist
I'm running
gooddata/gooddata-cn-ce:2.3.2
f
Hi Jakub, the
relation does not exist
error is thrown by Postgres when a statement references a table name that can’t be found in the referenced database. Please take a look at the
Statement
bit of the call and make sure that
obj_base
is being referenced correctly there. Could be as simple as a missing character, for example
j
There's no mention of
obj_base
in my ldm model at all 🤷
f
Not on the LDM, but on the source data. 🙂 The
Statement
string of the call lives under the
sql
object, which defines the dataset on the LDM via a query that runs on your data source. Here it is on the log you sent us:
Copy code
SELECT obj_base.entity_type, obj_base.\"space\", obj_base.api_id FROM obj_base WHERE (obj_base.organization = ?) AND (FALSE) AND TRUE AND TRUE"
Note that the query wants to use the
obj_base
table on the source data. The error indicates that the query cannot be completed because that particular table cannot be found. So it’d be a matter of ensuring that this query is referencing the data source correctly. Check the API Reference for this call for the request body schema.
j
Wait
j
Thanks for your support. Anyway we are not using the (optional)
sql
attributes on none of our datasets
m
Organization, entity, api_id... these sound more like some internal metadata database of GoodData to me... I suppose this is local installation of GD.CN. Could by any chance the internal database be wiped or connected elsewhere?
😮 1
j
Looks like you deleted the internal MD database, where all metadata are stored
Please, try following:
Copy code
docker-compose exec gooddata-cn-ce bash
su - postgres
psql md
j
@Jan Soubusta @Michal Hauzírek you're right guys, the DB was wiped out by accident Thanks for your support!
🙌 3
(and thanks to you @Francisco Antunes as well)
🙂 1