Update BigQuery with todays Nais applications.
Dataproduct-apps runs as a Naisjob in all clusters, collecting deployed applications and publishing them to a topic on the nav-infrastructure-kafka cluster. A separate instance runs as an Application in prod-gcp, consuming from the topic and updating BigQuery with received messages.
We use earthly for building.
If you don't have earthly installed, you can use the wrapper earthlyw in the root of the repository.
Build docker image: ./earthlyw +docker
Run prospector and pytest locally: ./earthlyw +tests
Run integration tests: ./earthlyw --allow-privileged +integration-tests
Adding a new field to the resulting data product in Metabase can be an adventure. Here are the steps to add a new field to the resulting data product:
- Add the new field in
model.py,persist.pyand corresponding logic incollect.pyand tests intests/directory - Add the new field in BigQuery table
dataproduct_apps.dataproduct_apps_v2in Google Cloud Console- Update the view query for
dataproduct_apps.dataproduct_apps_uniqueto include the new field
- Update the view query for
- Trigger
Sync Database Schemain Metabase to update the data product schema (needs admin access)