Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions reporting-analytics/analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,30 @@ To configure a new chart based on an OpenOps table to display in the **Analytics

For more information on how to create charts, see the [Superset documentation](https://superset.apache.org/docs/intro/).

## Creating virtual (SQL) datasets

In the Analytics admin portal, a dataset can be created from:

* A physical table or view (select it from the **Table** dropdown).
* A **virtual dataset**, defined by a SQL query.

Create a virtual dataset in the Analytics admin portal by using the portal’s dataset creation flow and providing a SQL query.

### Tips and best practices

* Enter a non-empty SQL query. Creating a virtual dataset requires SQL that is not empty or whitespace.

### Troubleshooting

* **Dataset creation fails with an “SQL query cannot be empty or whitespace” error**: Edit the dataset and provide a SQL query with at least one non-whitespace character.

## When a dataset already exists

When creating datasets programmatically (for example, via internal services that call the analytics API), dataset creation can be configured to either:

* **Reuse** an existing dataset when the dataset already exists.
* **Recreate** an existing dataset by deleting it first and then creating a new one (a delete-and-recreate flow).

## Connecting to external data sources

Here's what you can do to connect OpenOps Analytics to external data sources such as CSV files:
Expand Down