blob: 1ac7ebafce92c295613d03fbff93703502fc9d3e [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/dashboard.md at 2021-07-16
| 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="20210716" />
<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: 2021-07-16</li>
<li id="projectVersion" class="pull-right">Version: 0.9.7</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="interval_join.html" title="Support of Interval Joins"><span class="none"></span>Support of Interval 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 on this console is easy. First, select from the input options and then select your execution mode.</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 is not required to run a query and the console will try and autodetect the dataverse used in the query.</li>
<li><tt>Plan Format</tt> - specifies what format of the resulting query plan.
<ul>
<li><tt>JSON</tt> - results in the 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 old 19001 console.</li>
</ul>
</li>
<li><tt>Output Format</tt> - the format of the result of the query.
<ul>
<li><tt>JSON</tt> - the default and will return the results in JSON. Can also view in <tt>Tree</tt> and <tt>Table</tt> views in the output section.</li>
<li><tt>CSV (no header)</tt> - will return CSV format but without the header. Can only view this in <tt>Table</tt> view in the output section.</li>
<li><tt>CSV (header)</tt> - will return CSV format with the header. Can only view this in <tt>Table</tt> view in the output section. See the <a href="#exporting">Exporting Data</a> section for more information and examples.</li>
</ul>
</li>
</ul>
<p>To execute the query click the green triangle in the bottom right. Users may also choose to click the <tt>Explain</tt> button. This will not actually run the query (no results returned) and will only return the query plan. The console will default the view in the output section to <tt>Plan</tt>.</p>
<p>To cancel the query click the red stop button in the bottom right. This will send a <tt>DELETE</tt> request to the server and cancel the previous request.</p>
<p>The dashboard now supports autocomplete for SQL++ keywords. Use <tt>CTRL+Space</tt> to activate the 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 the 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> dropdown allows users to jump through 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 (purely the text of the query, not the results) from the most recent query. It will subsequently be added to 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 rightside of the console. The <tt>Refresh</tt> button is used to update the current metadata. When a user creates or drops a Dataverse, Dataset, Datatype, or Index the changes will not be automatically reflected. User must click the <tt>Refresh</tt> button to get the most up to date data.</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 to toggle from the raw and parsed views. <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 this inspector. Users can select as many dataverses as desired. The corresponding datasets, datatypes, and indices will appear.</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 a <tt>SELECT * FROM {dataset} LIMIT 1</tt> query.</li>
</ul></div>
<div class="section">
<h4><a name="Datatypes"></a>Datatypes</h4>
<p>Clicking on a datatypes will open a draggable and expandable window that contains information about the datatype. This console does support 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 of that type. If the field is wrapped in <tt>[ ]</tt> or <tt>{{ }}</tt>, then it is an ordered list or unordered of that type respectively. If a field is italicized, it is an anonymous type.</li>
</ul>
<p>NOTE: the <tt>JSON</tt> view does not support nested like <tt>SUMMARY</tt> 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.</li>
<li><tt>Search Key(s)</tt> - the key(s) of the index.</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, execute a query and switch to the <tt>PLAN</tt> tab in the output section. Alternatively, users can click explain the query by clicking <tt>EXPLAIN</tt> instead of execute and the output section will default to the <tt>PLAN</tt> tab.</p>
<p>To interact with the query plan, drag to move the view of the graph. Use the scroll wheel or scroll movement to zoom in and out of the plan.</p>
<p>The default plan orientation is <tt>Bottom to Top</tt> and can be swapped for <tt>Top to Bottom</tt> if so desired.</p>
<p>The default view of the plan is not detailed (just operator IDs and operator names). To look at a more detailed plan, check the <tt>Detailed</tt> checkbox and the plan will reload with more detail per node.</p>
<div class="section">
<div class="section">
<h4><a name="Traversing"></a>Traversing</h4>
<p>There are multiple ways to traverse the query plan. the <tt>Go to Node</tt> dropdown will keep track of the currently selected node. Using the arrows next to the <tt>Go to Node</tt> dropdown will traverse the plan node by node in a Depth First Search (DFS) fashion. Selecting nodes on the <tt>Go to Node</tt> dropdown will jump the plan to the selected node.</p>
<p>Utilizing both the arrows and the <tt>Go to Node</tt> dropdown, it is easy to trace through a plan.</p></div>
<div class="section">
<h4><a name="Search_.28Detailed_mode_only.29"></a>Search (Detailed mode only)</h4>
<p>The <tt>Search</tt> function appears when the plan is in <tt>Detailed</tt> mode. Search for specific string occurrences in the plan. When the search icon is clicked, the first mathc will be selected (if there is a match). Use the arrows that appear next to it to iterate through every match.</p>
<p>Must click <tt>Clear Selections</tt> after done with the search.</p>
<p>Unfortunately, at this time regular expression search is not supported.</p></div>
<div class="section">
<h4><a name="Variables_.28Detailed_mode_only.29"></a>Variables (Detailed mode only)</h4>
<p>The <tt>See Variable Occurences</tt> dropdown will appear when the plan is in <tt>Detailed</tt> mode. Users can select from any variable that appears in the plan. Selecting a variable will jump to the node of last occurrence. The user can see how many occurence there are by the <tt>See Variable Occurences</tt> dropdown title (it will now include a fraction).</p>
<p>The arrows that appear can iterate through the occurences.</p>
<p>Often, it is useful to be able to skip right to the declaration of a variable. By clicking on the skip button, the plan will select the node where that variable was declared. To jump back to whatever node before, click the undo button.</p></div>
<div class="section">
<h4><a name="Clear_Selections"></a>Clear Selections</h4>
<p>Clicking <tt>Clear Selections</tt> will reset the graph and focus 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>
<div class="section">
<h3><a name="JSON.2FJSONL:"></a>JSON/JSONL:</h3>
<ol style="list-style-type: decimal">
<li>Select <tt>JSON</tt> in the input <tt>Output Format</tt> option and run the query that you want to export.</li>
<li>Click <tt>Export</tt> in the output section.</li>
<li>Select between <tt>JSON</tt> and <tt>JSONL</tt> (JSON Lines). 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> in the input <tt>Output Format</tt> option and run the query that you want to export.</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 type that supports the query you want to run.</li>
<li>Set the <tt>output-record-type</tt> before your query</li>
<li>Select <tt>CSV (no header)</tt> in the input <tt>Output Format</tt> option and run the query that you want to export.</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 trickier. In order to get the header in the CSV format, we need to set the <tt>output-record-type</tt> in the query in order to get the headers. To explain further, here is an example using the TinySocial dataset from the Using SQL++ Primer.</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>If we wanted to export <tt>messageId</tt>, <tt>authorId</tt>, and <tt>senderLocation</tt> in CSV format with headers, we would have to 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 would 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 hedaer <tt>messageId</tt>, <tt>authorId</tt>, and <tt>senderLocation</tt>.</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>