Commit 872fb80f authored by Jeffrey Schlitt's avatar Jeffrey Schlitt

first one

parent ed70648c
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M [email protected] "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6b8d7ce2b7aeac1f82359d2537d2d5f2
tags: 645f666f9bcd5a90fca523b33c5a78b7
******************************
US Census Bureau Business Data
******************************
*******************************
City of Chicago Filming Permits
*******************************
****************************
Retail Store Sample Data
****************************
****************************
USDA Agricultural Summary
****************************
***************************************
Using Sample Databases in Aginity Pro
***************************************
Aginity Pro comes pre-loaded with several sample databases that allow you to start using Aginity
Pro right away, without connecting to any outside sources. These sample databases are designed to
give you the opportunity to play with the data; create, catalog, and reuse queries; and become
familiar with the Discovery Panel.
The data in these sample databases are provided in accordance with appropriate licenses.
.. toctree::
:maxdepth: 2
census/census.rst
permits/permits.rst
retail/retail.rst
usda/usda.rst
wiki/wiki.rst
\ No newline at end of file
*****************************
Wikipedia Clickstream Summary
*****************************
.. _objbrowse:
***********************************************
Using the Object Browser in |var_product_name|
***********************************************
The Object Browser panel in |var_product_name| can be toggled by using the **Database Explorer** and **Catalog** tabs on the left hand pane of the application as show below. The **Database Explorer** is used to navigate database objects based on the **Connections** defined in |var_product_name|. The **Catalog** browser is used to navigate SQL Analytics that you have personally stored.
Below is a quick start video of using the Object Browser in |var_product_name|
.. raw:: html
<iframe width="560" height="315" src="https://www.youtube.com/embed/gOytEFeUsOw" frameborder="0" allowfullscreen>
</iframe>
|
Viewing the Database Data Dictionary
=====================================
Once you have established a connection to a database you can browse the database dictionary catalogs. You can toggle to the **Database Explorer** browser by clicking on the tab as shown below. The database data dictionaries typically contains the tables, columns, views and other database objects available to query from the query panel.
.. image:: ../../Pro_Images/pro_browser_db.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
Once you have selected the **Database Explorer** tab you can drill into each connection as shown below.
.. image:: ../../Pro_Images/pro_browser_navigate.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
The following table will detail what objects are visible from the browser for each database connection type.
.. csv-table::
:file: db_capabilities.csv
:header-rows: 1
:align: center
**need to finish this table**
Reverse Engineering from the Database Explorer
=========================================================
Currently you can reverse engineer the following statements automatically in |var_product_name|
**TBD**
Quick Actions from Browser
===============================
Currently you can do the following quick actions from the **Database Explorer**
#. Drag and drop any object from the **Database Explorer** to the **Query Panel**
#. Copy the path of an object by right-clicking on the object and selecting **Copy Path**
.. seealso::
* :ref:`Use Catalog Browser <usecat>`
* :ref:`Use Query Panel <querypanel>`
.. _querypanel:
****************************************************
Using the Query Panel in |var_product_name|
****************************************************
You will spend most of your time in the Query Panel writing SQL and saving it to your catalog in |var_product_name|. The video below will give you an overview of creating your first query
.. raw:: html
<iframe width="560" height="315" src="https://www.youtube.com/embed/80PWV_fTgUI" frameborder="0" allowfullscreen>
</iframe>
|
Writing your First Query
=====================================
Each tab in the |var_product_name| application can be set to different database connections. Once you establish that connection as shown below you can use the query panel like a text editor using SQL syntax specific to that database platform.
.. image:: ../../Pro_Images/Pro_Query_panel_1stQuery.png
:scale: 30
:align: center
:alt: 1st Query
Once you write your code in |var_product_name| you have options to run it using the following scope:
.. image:: ../../Pro_Images/Pro_Query_panel_scope.png
:scale: 30
:align: center
:alt: 1st Query
.. csv-table::
:file: run_scope.csv
:header-rows: 1
:align: center
:widths: 15,30
.. seealso::
:ref:`Note one of the greatest challenges in SQL is learning the different functional syntax from different database vendors. We are trying to make that easy by giving you links to the SQL reference manuals we support <sqlref>`
|
.. _useparam:
Using Parameters in your Query
=====================================
Parameters can be used in |var_product_name| by using the **$** in any part of a SQL statement. When you execute a query the |var_product_name| application will ask you to fill in the value of the parameter before it sends the query to the database.
.. code-block:: SQL
:linenos:
--sample parameter query
select *
from landing_dim_customer
where gender = $fill_in_gender_at_runtime
limit 100;
You will have datatype choices at runtime as shown in the table below.
.. csv-table::
:file: param_scope.csv
:header-rows: 1
:align: center
:widths: 15,30
Common Actions in Query Panel
=====================================
* Renaming Tabs
* Commenting SQL
* Keeping Connection
Renaming Tabs
----------------
You can rename the query tabs by double clicking and typing in a name as shown below.
.. image:: ../../Pro_Images/Pro_Query_panel_rename_tab.png
:scale: 40
:align: center
:alt: rename tab
Commenting SQL
----------------------------
In |var_product_name| you can use the typical SQL syntax to comment your code as shown below
.. code-block:: SQL
:linenos:
-- This is one way to comment your SQL code
SELECT AVG(LineTotal)
FROM sales.SalesOrderDetail
/* This is another way to comment your SQL code */
Keeping Connection
--------------------
The **Keep Connection** checkbox as show below will instruct |var_product_name| to maintain the connection to the database if the default behavior of the database is to disconnect after the execution of a query. You are still subject to an overall database connection timeout if you session connection exceeds the permitted database setting.
.. image:: ../../Pro_Images/pro_query_panel_keepconn.png
:scale: 50
:align: center
:alt: Keep Connection
Interacting with Query Results
=====================================
Once your query has been executed you can use the features of the result grid to interact with the result set. The typical actions you will do are listed below.
* Reordering the Result Grid
* Sorting the Result Grid
* Filtering the Result Grid
* Exporting results to CSV
Reordering the Result Grid
--------------------------
Once a query has executed successfully, you may rearrange the columns in the Result Grid in order
to more effectively perform subsequent analyses. Rearranging the Result Grid is simple: simply click,
hold, and drag the column header for the column you wish to move. As you move it left or right, the
grid will automatically adjust to reposition the column.
.. image:: ../../Pro_Images/pro_query_panel_results_sort_before.png
:scale: 50
:align: center
:alt: Before rearranging query results
Once you are satisfied with the new position of the column, you may release the drag and the column will
lock into place.
.. image:: ../../Pro_Images/pro_query_panel_results_rearrange_after.png
:scale: 50
:align: center
:alt: After rearranging query results columns
Sorting the Result Grid
-----------------------
After successfully executing a query, if the query has returned any rows you may sort the results in
order to permit various types of analysis of your results.
.. image:: ../../Pro_Images/pro_query_panel_results_sort_before.png
:scale: 50
:align: center
:alt: Before sorting query results
In order to sort your results, simply click on the header row in the results grid. If the results are
already being sorted by that column, then the sort order will toggle between ascending and descending.
.. image:: ../../Pro_Images/pro_query_panel_results_sort_after.png
:scale: 50
:align: center
:alt: After sorting query results by channel name
Filtering the Result Grid
-------------------------
Data in the Result Grid may be filtered to make it easier to locate and analyze certain subsets of
the resultant data, without requiring you to submit an entirely separate query.
To filter the result grid by values in a particular column, bring your mouse cursor to the column
header for the column to which you wish to apply a filter. In the right-hand side on the header row the
filter icon (three horizontal bars) will appear. Click on the filter icon and you will be presented
with a pop-up menu that will allow you to enter your filter criteria.
.. image:: ../../Pro_Images/pro_query_panel_results_filter_popup.png
:scale: 50
:align: center
:alt: Popup displayed for filtering results
By default, the filter criteria will select a "Contains" filter, but several other filter types exist
and you may select any of them. Once you have selected the filter type you wish to apply, type the
filter into the text box. The results will immediately begin to filter.
.. image:: ../../Pro_Images/pro_query_panel_results_filter_applied.png
:scale: 50
:align: center
:alt: Results filtered after entering criteria
When a column is being filtered, a funnel icon will appear in its header. To remove the filter, you
may re-enter the filter mode by clicking on the filter icon (three bars) in the header row, and simply
delete the filter text.
Multiple columns may have active filters at the same time. To accomplish this, simply perform these
steps on each column.
Exporting results to CSV
------------------------
Once you have successfully executed a query you can elect to export those results in Comma Separated
Value (CSV) format to a file outside of |var_product_name|. To do this, right-click anywhere in the results
panel. Doing this will display a context menu from which you will select the option "Export to CSV".
.. image:: ../../Pro_Images/pro_query_panel_results_export.png
:scale: 50
:align: center
:alt: Exporting your query results to a CSV file
After selecting this option, you will be presented with a screen that permits you to select the location
to which to save your results. Once you have identified the proper location, press the Save button to
complete the export.
CSV files may subsequently be imported into a large number of different programs for further review
and analysis.
.. seealso::
* :ref:`Adding Query to Catalog <addcat>`
* :ref:`Using Discovery Panel <usedisc>`
**************************
Installing |var_product_name|
**************************
The following sections will discussing installing |var_product_name| on both Windows and Mac. To start download the software if you have not from the `Aginity Web Site <https://www.aginity.com>`_
Mac Install
==============
To start the Mac install click on the Pro "dmg" file you downloaded.
.. image:: ../../Pro_Images/pro_install_mac.png
:scale: 30
:align: center
:alt: Installing on Mac
Drag the |var_product_name|.app icon into your Applications Directory. Once complete you can open the application from your Launchpad icon.
.. image:: ../../Pro_Images/pro_install_open_app_mac.png
:scale: 15
:align: center
:alt: Launching on Mac
Windows Install
==================
To start the Windows install click on the Pro "exe" file you downloaded.
You will be prompted to fill first choose whether to install as `Only for me <https://docs.microsoft.com/en-us/windows/desktop/Msi/installation-context>`_ or `Anyone who uses this computer (all users) <https://docs.microsoft.com/en-us/windows/desktop/Msi/installation-context>`_ on the machine. If you are installing the application on a VM or other shared infrastructure you should choose all users.
.. image:: ../../Pro_Images/pro_install_windows_1.png
:scale: 30
:align: center
:alt: Installing on Windows Pick Context
Secondly, pick the installation directory for the software.
.. image:: ../../Pro_Images/pro_install_windows_2.png
:scale: 30
:align: center
:alt: Picking Destination Folder
Once complete you should be able to launch |var_product_name|.
.. image:: ../../Pro_Images/pro_install_windows_3.png
:scale: 30
:align: center
:alt: Launching on Windows
Opening for the First Time
===========================
Once you have opened the application you will be presented with a clean instance of |var_product_name|.
.. image:: ../../Pro_Images/pro_install_first_open.png
:scale: 15
:align: center
:alt: Opening Amp
Once you open |var_product_name| you will commonly do these Actions.
.. seealso::
:ref:`Add Connections <newconn>`
*****************************
Troubleshooting
*****************************
This page is dedicated to common issues or errors you may encounter when using |var_product_name|. We recommend you also post any new issues or questions to our |var_product_name| Forum.
The |location_link1| is a great resource for posting questions, searching for common solutions to features of Pro or just learning how to be efficient as a SQL analytic developer through samples, best practices and collaboration with other Pro users!
.. |location_link1| raw:: html
<a href="https://support.aginity.com/hc/en-us/categories/360001389774-Aginity-Pro-Resources" target="_blank">|var_product_name| Forum</a>
.. csv-table::
:file: troubleshoot.csv
:header-rows: 1
:align: center
******************************************
Sharing the Catalog in |var_product_name|
******************************************
.. _usecat:
****************************************
Using the Catalog in |var_product_name|
****************************************
.. raw:: html
<iframe width="560" height="315" src="https://www.youtube.com/embed/B4wzUg6HJ9Y" frameborder="0" allowfullscreen>
</iframe>
|
Catalog Overview
===========================================
The query catalog is a unique capability of |var_product_name| allowing you to easily save, manage and use items stored in it. Let's start with browsing the catalog.
The catalog is organized by any number of directories and sub-directories of queries as shown below.
.. image:: ../../Pro_Images/pro_catalog_browser_start.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
.. seealso::
Click `Some link to best practice <here>`_ to see best practices for organizing catalogs.
Queries are given friendly names and can be used or accessed in several ways. The first way is to drag the catalog query into a **query panel** as shown in the two images below
.. figure:: ../../Pro_Images/pro_catalog_before_drag.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
You can drag the query into the empty query panel
.. figure:: ../../Pro_Images/pro_catalog_post_drag.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
After you drag the item it will present the full catalog query for edit or execution.
You can also edit queries within the catalogs. By right clicking on a query you can change the SQL itself, the description and folder options.
.. image:: ../../Pro_Images/pro_catalog_edit.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
By previewing a query you can see key metadata items and statistics about the catalog as well as take action on the item.
.. image:: ../../Pro_Images/pro_catalog_preview.png
:scale: 30
:align: center
:alt: Browse the Database Catalog
Calling Catalog Items from SQL
================================
One of the most innovative features of |var_product_name| is the ability to call catalog items from within SQL statements
The video and following examples below will give you basic syntax required to call a catalog item.
.. raw:: html
<iframe width="560" height="315" src="https://www.youtube.com/embed/F-XXYxekgcg" frameborder="0" allowfullscreen>
</iframe>
|
Single SQL SELECT Statement
--------------------------------
In this example we have a single SQL SELECT statement in the catalog called **OrderAverage**.
This is the code in the Catalog.
.. code-block:: SQL
:linenos: