Query editor overview

To get to the query editor, either click on Create – New Query or click on an existing query (like the ones you found in the previous paragraph).

Let's look at an overview of all the components of the query editor:

  1. Metadata: This is the Query name, Tags, and Star (indicator of Favourite query).
  2. Data source selector: Here, we choose where the query takes the data from (refer to chapter on Data Sources, for more detail).
  3. Schema browser: This displays all the tables in the selected Data Source. The schema auto-refreshes periodically in the background, unless the user explicitly clicks on the refresh schema button. When clicking on a specific table, the schema expands to display its columns. In the upper part of the schema browser, you have the search box, which is where you can refine the schema according to the text you type. Clicking on the double arrow on the right-hand side of the selected schema entity will insert the clicked entity into the query editor:

In the case of large schemas (that have thousands of entities), the reload of the schema might take some time.

Not all of the Data Sources have the get_schema method implemented, which means that those who miss it will not display anything in the schema browser.

  1. Query Editor: This is where you actually write your queries. Every Data Source has its own SQL (query language) flavor, but most of them try to be SQL-like. Auto complete is supported and automatically triggered when you start typing, unless your schema is really large (> 5,000 tokens), and then you have to trigger it manually with Ctrl + Spacebar.

    In addition, there is an option to format the SQL code (it brings the sql query to a more readable format):

  1. Results and visualizations panel: When you run your query, the results are displayed here, as well as any additional visualizations that you add to it.
  2. Results data menu: The post execution menu allows you to download the dataset, get the code that embeds your visualization into an external resource, such as a website (through iframe), and edit visualizations for the query.
  3. Last update Information: Here is the information about the last time the query ran.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.181.165