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: ./earthlyw +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.py
and corresponding logic incollect.py
and tests intests/
directory - Add the new field in BigQuery table
dataproduct_apps.dataproduct_apps_v2
in Google Cloud Console- Update the view query for
dataproduct_apps.dataproduct_apps_unique
to include the new field
- Update the view query for
- Trigger
Sync Database Schema
in Metabase to update the data product schema (needs admin access)