I’m a newbie in GD CN, I’m trying to connect datas...
# gd-beginners
n
I’m a newbie in GD CN, I’m trying to connect datasource to postgres database. the connection is ok, but I cannot scan tables after I created them in pgadmin4 app. Do you have any advices for me? Thanks
j
Hello Nam, are you seeing some kind of error? What can you see in dev browser console?
n
Hi Jan, thanks for helping me. I see no error in console
gooddata | 172.18.0.1 - - [07/Oct/20220945:48 +0000] “PUT /api/v1/layout/dataSources/2301ccb2-e158-4636-bb28-add45f5a0c51/physicalModel HTTP/1.1” 204 0 “http://localhost:3000/modeler/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36”
gooddata | 172.18.0.1 - - [07/Oct/20220945:48 +0000] “GET /api/v1/layout/dataSources/2301ccb2-e158-4636-bb28-add45f5a0c51/physicalModel HTTP/1.1" 200 52 “http://localhost:3000/modeler/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
j
Are you sure you configured all connection properties aligned with where you created tables? Focus on DB name and schema name. Also, do you use more DB users? If yes, do they have the same privileges?
n
hi Jan, the configuration seem to be correct. I don’t have more DB user, I just use local database (postgres) to practice LDM
j
Please, screenshot the data source configuration properties, the database structure in pgadmin4 or any other SQL IDE and the dialog in LDM Modeler where you try to scan the data source and then when the scan finishes, please.
n
here they are.
thank you for your help
j
Please, screenshot the schema name in our UI (second tag in data source configuration
n
Screen Shot 2022-10-07 at 9.31.35 PM.png
j
Btw am I correct that you started the Postgres DB locally in the same docker network (e.g. from the same docker-compose.yaml file, right?
n
yes, you’re right
j
And now please try to scan the data source in our UI once more and screenshot the scan dialog (before you click on scan).
n
Screen Shot 2022-10-07 at 9.34.35 PM.png
j
can you please remove the
|
prefix?
n
it’s pointer, not
|
j
🙂
When you hit the scan, you get back and in the left panel there are still no tables, right?
n
right
j
Mystery...
Restart the container, scan data source again and copy&paste logs related the scan action here, please
1
n
gooddata_scan_pdm_issue
j
Everything seems to be ok. Please, try this:
Copy code
docker-compose exec <gooddata service name> bash
psql -U postgres -h postgres postgres
select * from information_schema.tables where table_schema = 'public'
n
postgres=# select * from information_schema.tables where table_schema = ‘public’
postgres-# select * from postgres.tables
postgres-# select * from public.tables
postgres-# select * from postgres.public.tables
postgres-#
I’ve tries with different cases, but there are no tables listed 😞
j
sorry, use semicolon in the end:
Copy code
select * from information_schema.tables where table_schema = 'public';
n
postgres=# select * from information_schema.tables where table_schema = ‘public’;
table_catalog | table_schema | table_name | table_type | self_referencing_column_name | reference_generation | user_defined_type_catalog | user_defined_type_schema | user_de
fined_type_name | is_insertable_into | is_typed | commit_action
---------------+--------------+------------+------------+------------------------------+----------------------+---------------------------+--------------------------+--------
----------------+--------------------+----------+---------------
(0 rows)
postgres=#
j
So no tables, that is why the scan does not find any
Now you have to find out why your tables are not where they should be 😉
@Martin Burian @Petr Kudlacek do you think it would be worth documenting the investigation procedure from this thread somewhere?
n
thanks Jan, I’ll check the configuration on my side again 🙂
j
you are welcome! Enjoy the weekend 😉
😍 1