Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deploy a data application on a Perspective

Turn a saved query into a self-service app: save it as a Perspective, deploy a Data Application against its Data API, confirm it inherits governed access.

You have a governed query a team keeps re-running or asking an analyst for (a KPI breakdown, a channel comparison, a funnel step) and you want them to open it themselves instead. This recipe turns that query into an app: save it as a Perspective, deploy a Data Application against its Data API, and confirm the app inherits governed access from the product itself rather than needing its own. The journey is save as Perspective → grab its Data API → build the app → deploy → confirm it landed on the product.

What this enables:

Prerequisites: a business user working in Studio's UI (not raw API calls), and a container image for the app.

Steps

1. Run the query in Studio and save it as a Perspective

Run the query in Studio:

Running a channel-performance query against the orders Data Product in Studio

Then open the Save as Perspective dialog: name it, set visibility, and turn on Auto refresh so the app you build on this never needs its own refresh logic: the Perspective updates itself when the upstream data changes.

Save as Perspective dialog with name, visibility, and Auto Refresh toggle

The saved Perspective gets its own page with Data, Columns, Lineage, and Activate tabs:

Saved Perspective detail page showing the Data tab with channel-level results

2. Grab the auto-provisioned Data API

Saving the Perspective already provisions its Data API; there is no separate step to "expose" it. Open the new Perspective and select Activate: it shows the endpoint, the required Authorization header, and the response schema.

Perspective Activate tab showing the GET endpoint, Authorization header, and response schema

The app only needs to call this endpoint and render the result however fits (table, chart, metric tiles); it never queries the semantic layer directly. Keep the FQDN, tenant, product name, token, and Perspective slug as environment variables so the same app image works against any product.

3. Build the app against that endpoint

From here, the work shifts from Studio's UI to code: building, containerizing, and deploying the app takes developer tooling (a language runtime, Docker, dataos-ctl), so bring in a developer teammate for steps 3 and 4 if that isn't your own skill set. The app itself is ordinary code, nothing DataOS-specific beyond calling the endpoint from step 2. Use the Python SDK instead of raw HTTP calls; a minimal example using Streamlit:

Download the Python SDK wheel and place it alongside app.py; pip install can install directly from a local wheel file.

--server.baseUrlPath must match the app's ingress path (step 4); Streamlit uses it to route its websocket connection correctly behind a path-prefixed reverse proxy. Without it, the app loads a blank page: the HTML shell arrives, but the websocket that renders the actual content connects to the wrong path.

Build and push it to a registry your compute target can pull from, targeting the cluster's architecture explicitly:

DataOS compute typically runs on linux/amd64 nodes. Without --platform linux/amd64, docker build defaults to your host's architecture: on an Apple Silicon Mac that's linux/arm64, which won't run on the cluster.

VULCAN_FQDN, VULCAN_DP_NAME, VULCAN_TENANT, VULCAN_AUTH_TOKEN, and PERSPECTIVE_SLUG are read from the environment, not hardcoded, so the same image works for any Perspective on any product, as long as the app manifest's envs point it at the right one.

4. Deploy the Data Application manifest

Adapt the app Resource template to this product, wiring the Perspective's slug and the product's Data API base URL into the environment:

Apply it:

For a private image, add spec.service.imagePullSecret referencing a Container registry Secret resource.

noNetworkAuthorization: true is unrelated to whether your image is public or private: it controls whether opening the app's dashboard link requires a separate access grant. Bifrost (DataOS's access-control system) has no Can Use permission for Apps the way it does for other resource types, so without this setting, not even the app's owner can open the link. Set noNetworkAuthorization: true unless you deliberately want the dashboard access-gated.

If you change noNetworkAuthorization on an already-deployed app, the update may not take effect; delete and re-apply the app Resource to be sure the new setting is picked up.

5. Confirm it landed on the product

Open the product's catalog page. The app appears as its own tab, linked under spec.app.products: the app didn't get built next to the product, it got built into it.

Troubleshooting

Issue
Resolution

The Data API returns 401/403

The identity set in runAsUser needs a Can Use grant on the product itself (not just the Perspective). Owning a resource does not automatically grant Use on it. See permission levels for how to grant Use.

The app shows stale data

Confirm Auto refresh was enabled when the Perspective was saved; without it, the Perspective only updates when re-run manually.

dataos-ctl resource apply fails on image pull

For a private image, add spec.service.imagePullSecret pointing to a Container registry Secret.

The pod crashes or never starts after a successful image pull

Rebuild with docker buildx build --platform linux/amd64 ... --push. An image built without an explicit platform defaults to the build machine's architecture (linux/arm64 on Apple Silicon), which will not run on linux/amd64 compute.

Opening the dashboard link returns 401/403 in the browser, even as the app's owner

Add noNetworkAuthorization: true under spec.service.http and re-apply. Bifrost (DataOS's access-control system) has no per-user Can Use grant for Apps, so this setting is currently the only way to make the dashboard link openable to anyone besides the deployer. If it was already deployed without this setting, delete and re-apply rather than just updating.

The app loads a blank or endlessly loading page

Add --server.baseUrlPath=<ingress-path> to the Streamlit launch arguments, matching spec.service.http.path. Without it, Streamlit's websocket connects to the wrong path and the page never renders past the empty HTML shell.

The app doesn't appear on the product's catalog page

Check that spec.app.products in the manifest lists the correct data product name, and re-apply.

The pod starts but crashes with a filesystem permission error

Apps run under stricter runtime permissions; if the image writes to a path like /var/cache or /run, add it under spec.service.workingDirs (a list of id/directory pairs) and re-apply.

Outcome

You turned a one-off query into an app a team can open directly, with governed access and freshness inherited from the product rather than re-implemented. This app already pulls the Perspective via the SDK; the same Perspective can also be queried directly over raw HTTP or shared by its slug URL: three activation paths off one governed artifact.

References

Last updated

Was this helpful?