• Products
  • Documentation
  • Resources

Atlassian Analytics is in open beta

Only customers with a Cloud Enterprise plan for Jira Software or Jira Service Management have access to Atlassian Analytics.

What is SQL mode?

If you feel more comfortable creating SQL queries from scratch, you can do so by using SQL mode in your “Query” step. If you added columns or filters in visual mode then switched to SQL mode, you’ll see the same auto-generated SQL query that also appears in the SQL preview in visual mode’s advanced drawer. The key difference here is you can edit that SQL query to include more complex SQL functions that may not be feasible to do via visual mode.

Select a data source

Before you can start building your query, you need to decide from where to query the data. Select the data sources dropdown next to the name of your query, then select one of your connected data sources.

Like in visual mode, you can only query one data source at a time in SQL mode. If you’d like to query multiple data sources in your chart, you’ll need to create a query for each data source then merge those queries together in Visual SQL. Learn more about merging queries.

If you don’t see any data sources, connect one to Atlassian Analytics or reach out to your organization admin for access.

Select SQL mode

After selecting a data source to query, select SQL in your query to use SQL mode.

Building queries in visual mode then switching to SQL mode is a great way to generate the basic structure of return values—and even joins—before editing the query with more specific needs.

Write your SQL query

The SQL syntax used for your SQL mode query must be the syntax for your data source’s underlying database type. However, the SQL syntax in all other Visual SQL steps is SQLite.

The Atlassian Data Lake is a Databricks database, so use the appropriate SQL syntax when querying the Data Lake. Learn more about Databricks SQL syntax.

Use Cmd + Shift + F to nicely format your SQL query.

Run your query

When you feel like your query is ready, select Run query to execute it. The result table and chart preview will update with your query results.

You can also use Cmd + Enter (for Mac) or Ctrl + Enter to run your query.

After running your first query, you can start adding other Visual SQL steps to further transform your data. View all the available Visual SQL steps.

Switching between visual and SQL mode

Making changes and executing the query in visual mode updates the query in SQL mode, but this isn’t true for the reverse—making changes and executing the query in SQL mode doesn’t affect what’s shown in visual mode.

If you’re switching between visual mode and SQL mode, your changes to visual mode don’t impact your returned results until you rerun your query from visual mode.

Rerunning the query in visual mode may override changes you’ve made in SQL mode.

Executed SQL query and completion time

After executing your query, you can view the amount of time it took to complete next to the “Query finished” button. Selecting the completion time shows the executed query, including the values used for any variable controls referenced in your query.

If you rerun a query without making any changes to it, Atlassian Analytics doesn’t send a new query to the data source. It will use cached results from the original query and note that in the execute SQL query.

SQL mode query took 8.069 seconds to run

Additional Help