bcgov / MFIN-Data-Catalogue

The Finance Data Catalogue enables users to discover data holdings at the BC Ministry of Finance and offers information and functionality that benefits consumers of data for business purposes. The product is built using Drupal and adheres to the Government of BC's Core Administrative and Descriptive etadata Standard.
Other
6 stars 0 forks source link

Drupal backend database access #168

Closed eloynav closed 11 months ago

eloynav commented 1 year ago

https://github.com/bcgov/MFIN-Data-Catalogue/labels/question


What's your Question?

How to access MySQL database using Openshift or an API? Drupal database tables diagram and relationships?

NicoledeGreef commented 1 year ago

Talking with @eloynav, the purpose of access is to facilitate reporting down the road. In order to move data into the reporting environment (e.g. denormalized data store) an understanding of the default model is needed.

CraigClark commented 1 year ago

@NicoledeGreef the following from @sylus

right now it’s MySQL container and you access through kubectl or openshift gui. Do they want us to switch to Maria?

CraigClark commented 1 year ago

@NicoledeGreef @eloynav I am not sure what this means Drupal database tables diagram and relationships?. Could you please clarify that? Do you mean this? https://www.drupal.org/node/1785994#d8

eloynav commented 1 year ago

Drupal database tables diagram and relationship = Drupal 8 database E/R diagram you provided thanks. No, I am not suggesting moving to MariaDB. I was not sure what as the backend database.

(Q) When accessing MySQL container using openshift gui?

sylus commented 1 year ago

Oh I see what your asking my apologies I thought this was just a general question about accessing the db backend. :)

Which you can still use either via the OpenShift Console or using the kubectl / oc command line clients. This would be full admin level control and not just read-only access and more for the backend developers.

The best way to query / interact with the data in the backend more directly and safely I'd recommend using Drupal's REST API and possibly even JSON API which works really well with clients like Postman and Thunder in VSCode. With this approach you could set permissions around what entities can get queried / updated (CRUD) that can inherit Drupal's and through Open ID your groups RBAC.

With json api in particular you can accomplish some pretty neat / joins and queries.

https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/jsonapi-vs-cores-rest-module

CraigClark commented 12 months ago

https://github.com/bcgov/MFIN-Data-Catalogue/labels/stuck @eloynav does Will's comment address what you need to know? If so, is it okay if I close this issue?