FAQs for SQL Analytics and Superset

Some questions and answers for SQL Analytics and Superset behaviors

Time Functions

What syntax and/or functions do we support around timestamp/dates?

During testing, the mdy() function threw an error:

where l_shipdate <= mdy(12, 01, 1998 )

However, the following syntax with date succeeds:

where l_shipdate < date '1998-12-01' - interval '90' day

SQL Lab/SQL Editor

Can I open and use multiple browser windows to SQL Lab/SQL Editor?

For Superset SQL Editor work, it is best to run queries and operations from only one active browser window.

If you open multiple browser windows to perform different querying or work in SQL Editor, note that the windows will be updated to reflect the latest work/actions from any of the open windows. If you run a query in one browser window, the query execution, history, and results will appear in all open SQL Editor windows. You could also cancel a long-running query from a different browser window than the one that launched the query.

What happened to my SQL Editor query tabs?

If your SQL Lab > SQL Editor session has one or more query tabs containing your favorite queries to test with or use, note that those tabs are saved within your browser cache session. The tabs could be lost if you clear browser cache, and existing tabs might not appear if you connect to ChaosSearch using a different web browser, or if you use an incognito browser window to connect to the ChaosSearch user deployment.

It is recommended to save your favorite queries so that you can reload and re-run them in the SQL Editor. If you have not saved queries, but you have run some queries previously that you would now like to save, check the Query History list on the SQL Editor. In many cases, you can recover a previously run query, load it, and save it for future use.

Why do some view (table) names and columns require double-quotation marks?

When typing a Refinery view name as part of a SQL query in the SQL Editor, some names might require double-quotation marks if they include special characters like dashes.

SELECT o_orderkey, o_totalprice, o_orderdate
FROM "xb-orders-view"
LIMIT 100

If you omit quotations and the view name has special characters, Superset displays a Trino Error similar to the following:

Trino Error trino error: 'errorType'

And the See more button displays:

This may be triggered by: Issue 1002 - The database returned an unexpected error.

Type double-quotation marks around the view name and retry the query.

Similarly, column names with special characters that could be interpreted by the parser need double quotation marks. Some JSON column names include a dot character (such as Records.eventName). When querying those columns, enclose them in double quotation marks otherwise the SQL Editor displays the error:

Field not found - Table Records not found in dereference ‘FIELD’

Do valid 0 record result sets display Query Returned No Data Messages?

Superset returns the message The query returned no data when the query should be returning 0 as a result in the result set. This can be observed in cases like select count(*) from view where column = val; and the value val is not matched. In these cases, when a result set of 0 is the correct answer, Superset typically displays the message The query returned no data.

Certifications/Certified By

The ability for users to create charts, dashboards, dataset metrics, or calculated columns could result in numerous, similarly named, objects that might present some challenges for end users who are looking for the best visualizations or metrics to use for their analytics and investigation.

Superset includes optional certification fields that can help to identify the curated best sources for various tasks. The Certified By field and Certification Details field allow admins to specify a name for a user or team who verified the object, and a short description statement, that will appear as a checkmark and pop-up widget for those resources in lists like the Dashboards or Charts pages. These fields could help users to quickly navigate to the best source of information for their work.

In the following screen, note the check marks next to the Orders Dashboard and the Top 10 Bluebikes Stations chart, which have the optional certification and descriptions. When you hover over a certification check mark, the certified by curator and the description text pop-up to display more information.

Database Restrictions

Can I configure a Superset connection to another database?

In the current ChaosSearch implementation, the database connection to the indexed data for the cluster is preconfigured for you at service setup. Connections to other ChaosSearch cluster databases or third-party databases are not supported at this time.

Does the ChaosSearch Superset implementation support AQE?

The Asynchronous query execution (AQE) support provided by Superset is not used in the ChaosSearch implementation. AQE is a Superset design that enables support for long running queries that execute beyond the typical web request’s timeout (30-60 seconds) by configuring an asynchronous backend for Superset. ChaosSearch has its own mechanisms for long-running queries and managing them across browser timeout settings.

Does the ChaosSearch database connection support data manipulation language (DML) statements?

The current implementation of Superset does not enable support for DML statements to update or manipulate the data using INSERT, UPDATE, DELETE, or similar statements. Only SELECT statements are allowed against the ChaosSearch database at this time.

Can I import my own CSV or similar dimension table?

The default database connection for ChaosSearch does not support the ability to import data files such as CSV, columnar files, or Excel spreadsheets. The options to import data have been removed from the interface.

Datasets

What happens if the Refinery view schema changes after I create a dataset for it?

It is not uncommon for a Refinery view schema to change over time as new log or event files are indexed. After you create a dataset for a Refinery view, it is important to keep the dataset up to date with the view. You can update the dataset when needed to get the the latest columns information from the view.

To update a dataset:

  1. Go to the Datasets tab and click the edit icon next to the dataset that you want to update.

  2. Click the Columns tab, and click Sync columns from source.

Superset updates the dataset with any new columns in the Refinery view, and removes any columns that are no longer in the view. After the update, it can be helpful to review the dataset columns to see if any other dataset changes are needed and then save the dataset.

Will charts continue to work if I delete and recreate a dataset for the same Refinery view?

No. Superset uses an internal ID value as the reference for each dataset that you add. If you add a dataset for view_1, the dataset is assigned an ID such as 6. Any charts and dashboards that you create which reference the dataset use its internal ID value, not its name. If you delete and recreate the dataset, the new dataset will have a different ID, so any charts or dashboards associated with the old dataset ID will display errors. Also, at this time, you cannot edit a broken chart or dashboard to change the associated dataset. You must delete and recreate the charts and dashboards for the new dataset.

Note that adding, modifying, or deleting a dataset has no effect on the underlying Refinery view stored in ChaosSearch.

Alerts and Reports

Do alert and report notifications work in Superset at this time?

These features are not supported at this time, and have been removed from the interface.

Annotation Layers and Annotations

Why does an annotation layer not appear in the chart?

In this version of Superset 1.x, there are some known issues with annotations not appearing in the charts where they are configured. We are investigating to identify workarounds or resolutions.

Charts

Do all of the chart types in Superset work?

Not all of the Superset charts are available in this release. Unsupported charts have been removed from the chart selection dialogs.