Help on how to get datasets

Greetings @Moses_Mutesasira @Agaba_Derrick_Junior @mherman22. I would like to be helped on how to get datasets, the xml data for different test services.
I’m currently writing integration tests for the TestReflexService though I would like to have the datasets to continue with the tests
Thanks for your help.

2 Likes

@Ariho-Seth for started you need to know how to access the database, i.e using terminal

docker exec -it openelisglobal-database psql -U clinlims -d clinlims

in other ways you can use dbeaver-ce a database app or log In Postgress SQL and access our db

For selecting what tables you are working on you can use /d and the name of the table you are searching it will always list the table information

2 Likes

@Ariho-Seth take note of how some table names are written, some names are written with underscores(_) and there fore if you write them without underscores they wont showup
useful commands while searching
SELECT * FROM table_name; – Get all data from a table.

  • \dt – List all tables.
  • \d table_name – Describe table structure (columns, types, indexes, etc.).
  • \dn – List all schemas.
  • \dv – List all views.
  • \df – List all functions.
  • dt – Show tables across all schemas.
  • \d+ table_name – Describe with additional details like storage and size.
  • SELECT * FROM information_schema.tables; – Standard way to list tables.
  • SELECT * FROM pg_catalog.pg_tables WHERE tablename LIKE '%keyword%'; – Search tables by

this works while using terminal after logging in with

docker exec -it openelisglobal-database psql -U clinlims -d clinlims

3 Likes

Sure Thanks a lot for your help,

1 Like