blob: eb29a1d490d7d5615c79165f99293fb48918aa2d [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/dashboard.md at 2022-05-12
| Rendered using Apache Maven Fluido Skin 1.7
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20220512" />
<meta http-equiv="Content-Language" content="en" />
<title>AsterixDB &#x2013; </title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.7.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left"><a href="./" id="bannerLeft"><img src="images/asterixlogo.png" alt="AsterixDB"/></a></div>
<div class="pull-right"></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2022-05-12</li>
<li id="projectVersion" class="pull-right">Version: 0.9.8</li>
<li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Get Started - Installation</li>
<li><a href="ncservice.html" title="Option 1: using NCService"><span class="none"></span>Option 1: using NCService</a></li>
<li><a href="ansible.html" title="Option 2: using Ansible"><span class="none"></span>Option 2: using Ansible</a></li>
<li><a href="aws.html" title="Option 3: using Amazon Web Services"><span class="none"></span>Option 3: using Amazon Web Services</a></li>
<li class="nav-header">AsterixDB Primer</li>
<li><a href="sqlpp/primer-sqlpp.html" title="Using SQL++"><span class="none"></span>Using SQL++</a></li>
<li class="nav-header">Data Model</li>
<li><a href="datamodel.html" title="The Asterix Data Model"><span class="none"></span>The Asterix Data Model</a></li>
<li class="nav-header">Queries</li>
<li><a href="sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
<li><a href="SQLPP.html" title="Raw SQL++ Grammar"><span class="none"></span>Raw SQL++ Grammar</a></li>
<li><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
<li class="nav-header">API/SDK</li>
<li><a href="api.html" title="HTTP API"><span class="none"></span>HTTP API</a></li>
<li><a href="csv.html" title="CSV Output"><span class="none"></span>CSV Output</a></li>
<li class="nav-header">Advanced Features</li>
<li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
<li><a href="feeds.html" title="Data Ingestion with Feeds"><span class="none"></span>Data Ingestion with Feeds</a></li>
<li><a href="udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
<li><a href="sqlpp/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
<li><a href="sqlpp/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
<li><a href="sqlpp/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</a></li>
<li><a href="geo/quickstart.html" title="GIS Support Overview"><span class="none"></span>GIS Support Overview</a></li>
<li><a href="geo/functions.html" title="GIS Functions"><span class="none"></span>GIS Functions</a></li>
<li><a href="interval_join.html" title="Support of Interval Joins"><span class="none"></span>Support of Interval Joins</a></li>
<li><a href="spatial_join.html" title="Support of Spatial Joins"><span class="none"></span>Support of Spatial Joins</a></li>
<li><a href="sqlpp/arrayindex.html" title="Support of Array Indexes"><span class="none"></span>Support of Array Indexes</a></li>
<li class="nav-header">Deprecated</li>
<li><a href="aql/primer.html" title="AsterixDB Primer: Using AQL"><span class="none"></span>AsterixDB Primer: Using AQL</a></li>
<li><a href="aql/manual.html" title="Queries: The Asterix Query Language (AQL)"><span class="none"></span>Queries: The Asterix Query Language (AQL)</a></li>
<li><a href="aql/builtins.html" title="Queries: Builtin Functions (AQL)"><span class="none"></span>Queries: Builtin Functions (AQL)</a></li>
</ul>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="./" title="AsterixDB" class="builtBy"><img class="builtBy" alt="AsterixDB" src="images/asterixlogo.png" /></a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<!--
! Licensed to the Apache Software Foundation (ASF) under one
! or more contributor license agreements. See the NOTICE file
! distributed with this work for additional information
! regarding copyright ownership. The ASF licenses this file
! to you under the Apache License, Version 2.0 (the
! "License"); you may not use this file except in compliance
! with the License. You may obtain a copy of the License at
!
! http://www.apache.org/licenses/LICENSE-2.0
!
! Unless required by applicable law or agreed to in writing,
! software distributed under the License is distributed on an
! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
! KIND, either express or implied. See the License for the
! specific language governing permissions and limitations
! under the License.
!-->
<p># AsterixDB Administration Console #</p>
<p>## <a name="toc" id="toc">Table of Contents</a></p>
<ul>
<li><a href="#basics">Basics</a></li>
<li><a href="#qnav">Query Navigation</a></li>
<li><a href="#metadatainspector">Metadata Inspector</a></li>
<li><a href="#planviewer">Interactive Plan Viewer</a></li>
<li><a href="#exporting">Exporting Data</a></li>
<li><a href="#development">Development</a></li>
</ul>
<div class="section">
<h2><a name="Basic_Usage_.5BBack_to_TOC.5D"></a><a name="basics" id="basics">Basic Usage</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
<p>Executing a query is easy. Type your query into the query input box, select your run configurations, and then click the green play button to run the query. The output will appear below in the &#x201c;Output&#x201d; section.</p>
<p><b>Input Options</b></p>
<ul>
<li><tt>Dataverse</tt> - the dataverse that the query will use. The default is the <tt>Default</tt> dataverse. This input is not required and can be autodetected by running the query (see Figure 1).</li>
<li><tt>Output Format</tt> - specifies the format of the result of the query.
<ul>
<li><tt>JSON</tt> (default) - query results are returned in JSON. Viewable in &#x201c;Tree&#x201d; and &#x201c;Table&#x201d; mode.</li>
<li><tt>CSV (no header)</tt> - query results are returned in CSV format without the header. Viewable only in &#x201c;Table&#x201d; mode.</li>
<li><tt>CSV (header)</tt> - query results are returned in CSV format with the header. Viewable only in &#x201c;Table&#x201d; mode. See the <a href="#exporting">Exporting Data</a> section for more information and examples.</li>
</ul>
</li>
<li><tt>Plan Format</tt> - specifies the format of the query plan (if requested).
<ul>
<li><tt>JSON</tt> (default) - results in showing the interactive query plan viewer.</li>
<li><tt>STRING</tt> - results in the text / string format of the query plan. Equivalent to the text format from the legacy 19001 console.</li>
</ul>
</li>
</ul>
<p>To execute the query, click the green triangle in the bottom right of the query input section. Users may also choose to click the &#x201c;Explain&#x201d; button. This option will not actually run the query. It will return only the query plan instead. The console will default the view in the output section to &#x201c;Plan&#x201d; as well.</p>
<p>To cancel the query, click the red stop button in the bottom right of the query input section. This will send a &#x201c;DELETE&#x201d; request to the server and cancel the previous request.</p>
<p><img src="../resources/images/dashboard_screenshots/input_component.png" alt="Figure 1: Input Component" /><br />
Figure 1: The input component of the console</p>
<p>The dashboard also now supports autocomplete of SQL++ keywords. Use <tt>CTRL+Space</tt> to activate the autocomplete feature (see Figure 2).</p>
<p><img src="../resources/images/dashboard_screenshots/autocomplete.png" alt="Figure 2: Autocomplete" /><br />
Figure 2: Example of autocomplete</p></div>
<div class="section">
<h2><a name="Query_Navigation_.5BBack_to_TOC.5D"></a><a name="qnav" id="qnav">Query Navigation</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
<p>This console supports query history and has two different ways of navigating the query history. On the input bar there is a section for <tt>QUERY HISTORY</tt> and there are also two arrows (<tt>&lt;</tt> and <tt>&gt;</tt>).</p>
<p>Utilizing the arrows will let you traverse all previously run queries one by one. However, if the console is already at the most recent query in the history and the user clicks the <tt>&gt;</tt> or forward arrow, it will create a new empty query.</p>
<p>The <tt>QUERY HISTORY</tt> drop down allows users to jump to a specific query in the history without having to step through it with the arrows.</p>
<p>When executing a query, this query will be counted as a new query if it is different (comparison is purely based on the query text, not the results) from the most recent query. It will subsequently be added to the front of the query history.</p></div>
<div class="section">
<h2><a name="Metadata_Inspector_.5BBack_to_TOC.5D"></a><a name="metadatainspector" id="metadatainspector">Metadata Inspector</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
<p>The metadata inspector is the column on the right side of the console (see Figure 3). The <tt>Refresh</tt> button is used to update the current metadata. When a user creates or drops a dataverse, dataset, datatype, user-defined function, or index, the changes will not be automatically reflected. The user must click the <tt>Refresh</tt> button to get the most up to date metadata.</p>
<p><img src="../resources/images/dashboard_screenshots/metadata_inspector.png" alt="Figure 3: Metadata Inspector" /><br />
Figure 3: The metadata inspector</p>
<p>The console supports multiple dialogs/windows open at once. All of these are resizable and draggable as well.</p>
<p>Users can also click the <tt>JSON</tt> / <tt>SUMMARY</tt> button in the dialog windows to toggle between the raw and parsed views of the metadata objects. <tt>SUMMARY</tt> is the default.</p>
<div class="section">
<div class="section">
<h4><a name="Dataverse"></a>Dataverse</h4>
<p>Clicking a dataverse will add it to the shown metadata in the inspector. Users can easily see which dataverses are currently being shown by the check mark to the left of the dataverse name. Users can select as many dataverses as desired. The datasets, datatypes, indices, and user-defined functions that are contained in the selected dataverses will appear in their corresponding sections.</p></div>
<div class="section">
<h4><a name="Datasets"></a>Datasets</h4>
<p>Clicking on a dataset will open a draggable and expandable window that contains information about the dataset.</p>
<ul>
<li><tt>Dataverse</tt> - which dataverse the dataset belongs to.</li>
<li><tt>Dataset</tt> - the name of the dataset.</li>
<li><tt>Datatype Name</tt> - the name of the datatype of the dataset.</li>
<li><tt>Primary Keys</tt> - the primary keys of the dataset.</li>
<li><tt>Sample</tt> - if there is data inserted into the dataset, this is a section where viewers can see a sample of the dataset. It is equivalent to the user querying: <tt>SELECT * FROM {dataset} LIMIT 1</tt>.</li>
</ul></div>
<div class="section">
<h4><a name="Datatypes"></a>Datatypes</h4>
<p>Clicking on a datatype will open a draggable and expandable window that contains information about the datatype. The console includes support for nested datatypes.</p>
<ul>
<li><tt>Dataverse</tt> - which dataverse the datatype belongs to.</li>
<li><tt>Datatype Name</tt> - the name of the datatype.</li>
<li><tt>Fields</tt> - a list of the fields in the dataset. Each field has information on whether it is nullable or required. If the field is nested (not a primitive type), click on it to see the information about that type. If the field is wrapped in <tt>[...]</tt> or <tt>{{...}}</tt>, then it is an ordered list or unordered list respectively. If a field is italicized, it means it is an anonymous type.</li>
</ul>
<p>NOTE: the <tt>JSON</tt> view does not support nested like the <tt>SUMMARY</tt> view does.</p></div>
<div class="section">
<h4><a name="Index"></a>Index</h4>
<p>Clicking on a dataset will open a draggable and expandable window that contains information about the index.</p>
<ul>
<li><tt>Dataverse</tt> - which dataverse the index belongs to.</li>
<li><tt>Index Name</tt> - the name of the index.</li>
<li><tt>Index Type</tt> - the type of the index (primary or not primary).</li>
<li><tt>Search Key(s)</tt> - the key(s) of the index.</li>
</ul></div>
<div class="section">
<h4><a name="User-Defined_Functions"></a>User-Defined Functions</h4>
<p>Clicking on an user-defined function will open a draggable and expandable window that contains information about the user-defined function.</p>
<ul>
<li><tt>Dataverse</tt> - which dataverse the user defined function (UDF) belongs to</li>
<li><tt>Function Name</tt> - the name of the UDF</li>
<li><tt>Arity</tt> - the number of parameters of the UDF</li>
<li><tt>Parameters</tt> - the name of the parameters</li>
<li><tt>Definition</tt> - the definition of the UDF</li>
</ul></div></div></div>
<div class="section">
<h2><a name="Interactive_Plan_Viewer_.5BBack_to_TOC.5D"></a><a name="planviewer" id="planviewer">Interactive Plan Viewer</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
<p>To view the interactive plan viewer, either execute a query and switch to the <tt>PLAN</tt> tab in the output section or <tt>EXPLAIN</tt> the query and it will default to the <tt>PLAN</tt> view.</p>
<p>To interact with the query plan, drag to move around the graph. Users can also choose to utilize the scroll function to zoom in and out of the plan. To the left of the plan will be the <tt>Plan Explorer</tt> (see Figure 5). This is the main way that users will be able to interact with the plan.</p>
<p>The plan orientation can be changed with the <tt>Plan Explorer</tt> under the <tt>View</tt> title. The default is <tt>bottom to top</tt>, but it can be swapped to <tt>top to bottom</tt> if desired.</p>
<p>The default view of the plan is not detailed (just showing operator IDs and operator names). To look at a more detailed view of the plan, check the <tt>Detailed</tt> checkbox in the plan explorer and the plan will reload with more detail per node.</p>
<p><img src="../resources/images/dashboard_screenshots/plan_explorer.png" alt="Figure 4: Plan Explorer" /><br />
Figure 5: The plan explorer</p>
<div class="section">
<div class="section">
<h4><a name="Traversing"></a>Traversing</h4>
<p>There are two main ways to traverse the query plan. The dropdown under <tt>Node</tt> will display the node the user is currently at. This dropdown will keep track of the node the user is at throughout.</p>
<p>The arrows next to the dropdown can be used to step through the plan node by node in a Depth First Search (DFS) fashion.</p>
<p>Selecting a node from the dropdown will jump the viewer to the node in the plan that was selected.</p>
<p>Utilizing both the dropdown and arrows, it is easy to trace through an entire plan.</p></div>
<div class="section">
<h4><a name="Variables_.28Detailed_mode_only.29"></a>Variables (Detailed mode only)</h4>
<p>Under the <tt>Variable</tt> section of the <tt>Plan Explorer</tt>, there is a dropdown that will contain all the variables that occur in the plan. Selecting a variable there will jump the plan viewer to the node that contains the last (top-most in the plan) occurrence of that variable. The user can see how many occurrences there are via the <tt>Variable Occurrences</tt> title above the dropdown. The arrows to the right can be used to step through the occurrences.</p>
<p>To skip to the variable&#x2019;s declaration, click the <tt>DECLARATION</tt> button. This will jump the plan viewer to the node of the very first occurrence of that variable. To get back to the previous node, click <tt>BACK</tt>.</p></div>
<div class="section">
<h4><a name="Search_.28Detailed_mode_only.29"></a>Search (Detailed mode only)</h4>
<p>Use the <tt>Search</tt> bar to type in a string of interest. The plan explorer will search the plan for that specific string in each node. The number of matches will be displayed in the title above the search bar. Users can use the arrows to the right to step through the nodes that matched.</p>
<p>Users must click <tt>Clear</tt> after finishing with a search.</p>
<p>Unfortunately, at this time, regular expression search is not supported.</p></div>
<div class="section">
<h4><a name="Clear"></a>Clear</h4>
<p>Clicking <tt>Clear</tt> will reset the query plan graph and focus the viewer on the first node in the plan.</p></div></div></div>
<div class="section">
<h2><a name="Exporting_Data_.5BBack_to_TOC.5D"></a><a name="exporting" id="exporting">Exporting Data</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
<p>Exporting data is a key part of the console&#x2019;s functionality. Users can select from JSON, JSONL, CSV (no header), and CSV (header) as data types for the output.</p>
<div class="section">
<h3><a name="JSON.2FJSONL:"></a>JSON/JSONL:</h3>
<ol style="list-style-type: decimal">
<li>Select <tt>JSON</tt> on the input <tt>Output Format</tt> option and run the query that you want to export the results of</li>
<li>Click <tt>Export</tt> in the output section</li>
<li>Select between <tt>JSON</tt> and <tt>JSONL</tt> (JSON Lines) and adjust the filename to the desired name</li>
<li>Click <tt>Export</tt> to start the download</li>
</ol></div>
<div class="section">
<h3><a name="CSV_.28no_header.29:"></a>CSV (no header):</h3>
<ol style="list-style-type: decimal">
<li>Select <tt>CSV (no header)</tt> on the input <tt>Output Format</tt> option and run the query that you want to export the results of</li>
<li>Click <tt>Export</tt> in the output section</li>
<li>Adjust the filename to the desired name</li>
<li>Click <tt>Export</tt> to start the download</li>
</ol></div>
<div class="section">
<h3><a name="CSV_.28header.29:"></a>CSV (header):</h3>
<ol style="list-style-type: decimal">
<li>Create a datatype that supports the query you want to run</li>
<li>Set the <tt>output-record-type</tt> to this type before your query</li>
<li>Select <tt>CSV (no header)</tt> on the input <tt>Output Format</tt> option and run the query that you want to export the results of</li>
<li>Click <tt>Export</tt> in the output section</li>
<li>Adjust the filename to the desired name</li>
<li>Click <tt>Export</tt> to start the download</li>
</ol>
<p>This one is clearly a little more involved. In order to get the desired header in the CSV format, it is necessary to set an <tt>output-record-type</tt> for the query. To better illustrate how to control this format, here is an example using the TinySocial dataset from the &#x201c;Using SQL++&#x201d; AsterixDB primer.</p>
<p>For context, here&#x2019;s the GleambookMessages DDL statement.</p>
<div>
<div>
<pre class="source">CREATE TYPE GleambookMessageType AS {
messageId: int,
authorId: int,
inResponseTo: int?,
senderLocation: point?,
message: string
};
CREATE DATASET GleambookMessages(GleambookMessageType)
PRIMARY KEY messageId;
</pre></div></div>
<p>First, create the type of the expected output. If the goal is to export <tt>messageId</tt>, <tt>authorId</tt>, and <tt>senderLocation</tt> in CSV format with headers, create an additional type to support this export.</p>
<div>
<div>
<pre class="source">CREATE TYPE GleambookMessages_exportCSV AS {
messageId: int,
authorId: int,
senderLocation: point
};
</pre></div></div>
<p>The query should then look something like this:</p>
<div>
<div>
<pre class="source">USE TinySocial;
SET `output-record-type` &quot;GleambookMessages_exportCSV&quot;;
SELECT messageId, authorId, senderLocation
FROM GleambookMessages;
</pre></div></div>
<p>Now run the query with the <tt>CSV (header)</tt> input option and the result will contain the header <tt>messageId</tt>, <tt>authorId</tt>, and <tt>senderLocation</tt> (see Figure 5).</p>
<p><img src="../resources/images/dashboard_screenshots/csv_header_sample_output.png" alt="Figure 5: Sample CSV Header Output" /><br />
Figure 5: CSV (header) sample output</p></div></div>
<div class="section">
<h2><a name="Development_.5BBack_to_TOC.5D"></a><a name="development" id="development">Development</a><font size="4"> <a href="#toc">[Back to TOC]</a></font></h2>
<p>To start the development server, run <tt>ng serve</tt> or <tt>npm start</tt>. Navigate to <tt>http://localhost:4200/</tt>. The app will automatically reload if you change any of the source files.</p>
<p>To add a debugger, add a new <tt>Javascrip Debug</tt> configuration in the IntelliJ <tt>Run Configurations</tt> and set the URL to <tt>http://localhost:4200/</tt>. Additionally, you can set the file directory to asterix-dashboard.</p></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
feather logo, and the Apache AsterixDB project logo are either
registered trademarks or trademarks of The Apache Software
Foundation in the United States and other countries.
All other marks mentioned may be trademarks or registered
trademarks of their respective owners.
</div>
</div>
</div>
</footer>
</body>
</html>