Commit f674e692 authored by Jeffrey Schlitt's avatar Jeffrey Schlitt

autocomplete, db support, lots of other

parent 47677365
Redshift,Hive,Netezza,Snowflake,Greenplum
Databases,Databases,Databases,Databases,Databases
Tables, Tables, Tables,Warehouses,Schemas
Views, Views, Views,Tables,Tables
Users,,Sequences,Views,Views
Groups,,Stored Procedures,Scalar Functions,Columns
Libraries,,Users,Roles,Users
Stored Procedures,,User Groups,,Groups
Users,,Server Configuration Variables,,Functions
User Groups,,,,Aggregates
,,,,Operators
,,,,Primary Keys
,,,,Foreign Keys
,,,,Partitions
,,,,External Tables
,,,,Sequences
\ No newline at end of file
Database Feature,Postgres,SQL Server,Azure SQL,Azure SQL DW,DB2,Redshift
,,,,,,
Tables,Yes,Yes,Yes,Yes,Yes,Yes
Views,Yes,Yes,Yes,Yes,Yes,Yes
Stored Procedures,No,No,No,No,No,Yes
External Libraries or User Defined Functions,No,No,No,No,No,Yes
Sequences,No,No,No,No,No,Yes
,,,,,,
,,,,,,
,,,,,,
Autocomplete Support,No,No,No,No,No,Yes
\ No newline at end of file
......@@ -21,31 +21,29 @@ 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
:scale: 50
: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
:scale: 50
:align: center
:alt: Browse the Database Catalog
The following table(s) will detail what objects are visible from the browser for Redshift, Netezza, Snowflake, Hive, Greenplum and Postgres.
.. _dbsupport:
.. csv-table::
:file: db_capabilities.csv
:header-rows: 1
:align: left
Database Object Support by Platform
=====================================
The following image details what objects are visible from the browser for all of our currently supported platforms. We do releases every two weeks with |var_product_name| so if there is a feature you need please contact us at support@aginity.com.
The following table(s) will detail what objects are visible from the browser for SQL Server, Azure SQL, Azure SQL DW and DB2
.. csv-table::
:file: db_capabilitiesPartII.csv
:header-rows: 1
:align: left
.. image:: ../../Pro_Images/AginityProDBSupport.png
:scale: 90
:align: center
:alt: Browse the Database Catalog
......@@ -54,11 +52,47 @@ Quick Actions from Explorer
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**
SQL Statement Generation
------------------------
To generate typical SQL statements from tables or views you can right click on the object, navigate to scripts and choose the appropriate script as shown below.
.. image:: ../../Pro_Images/AginityProDBExplorerScripts.png
:scale: 60
:align: center
:alt: Browse the Database Catalog
Selective SQL Generation on a Set of Columns
----------------------------------------------
To generate SQL statements based on a selection of columns within a Table or View, multi-select the columns by holding Ctrl (Windows) or Command (Mac) and selecting the columns as shown below. Then generate the SQL statement.
.. image:: ../../Pro_Images/AginityProDBExplorerColSelect.png
:scale: 60
:align: center
:alt: Browse the Database Catalog
.. hint::
Make sure you don't have the table name selected and column names at the same time. If you do it will generate the SQL for the whole table.
Drag and Drop Capabilities
--------------------------
You can drag and drop any object from the DB Explorer into the Query Panel
.. note::
Double-clicking expands the DB Explorer tree
Copy JDBC Connection String
-----------------------------
If you select any Connection (Top level of the tree) and select "Copy Connection string to Clipboard" you will get the full JDBC URI which is helpful for debugging. See this `Knowledge Base Article <https://support.aginity.com/hc/en-us/articles/360035391473-Debugging-JDBC-Connectivity-Issues-with-Aginity-Pro-or-Team-Step-1>`_ for help with debugging your |var_product_name| connections.
.. image:: ../../Pro_Images/AginityProDBExplorerJDBC.png
:scale: 60
:align: center
:alt: Browse the Database Catalog
.. seealso::
* :ref:`Use Catalog Browser <usecat>`
* :ref:`Use Query Panel <querypanel>`
......@@ -39,8 +39,9 @@ Once you write your code in |var_product_name| you have options to run it using
.. 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>`
.. _exf:
Executing to a File
--------------------
=====================
In version .17 of Aginity Pro we released the ability to use our **editor commands** to spool the results of a SQL statement(s) to a file(s).
......@@ -77,7 +78,39 @@ To do this you must issue the following commands
where emaildomain = 'aginity.com'
#+end
The table below illustrates the current values accepted in execute to file commands
+--------------------------------------+--------------------------------------+
| Parameter | Options |
+======================================+======================================+
| path | On Mac this should be in the format |
| | "/dir/dir/filename". On Windows it |
| | should be in the format |
| | "drive:\directory\filename". |
+--------------------------------------+--------------------------------------+
| type | Only supported file type today is |
| | csv. This is only the extension, |
| | you can change the delimiter. |
+--------------------------------------+--------------------------------------+
| delimiter | You can use any value but we |
| | recommend , or | or ^ or \t for (tab)|
+--------------------------------------+--------------------------------------+
| null_value | enter a character field for null |
| | typically '' (empty string) or 'NULL'|
+--------------------------------------+--------------------------------------+
| quote_char | enter how to enclose character string|
| | typically the quotation (") |
+--------------------------------------+--------------------------------------+
| escape_char | if an escape character is seen it |
| | will be seen with the "\" character |
+--------------------------------------+--------------------------------------+
| row_delimiter | an end of row is signified with a |
| | carriage return. This feature is |
| | not implemented yet. |
+--------------------------------------+--------------------------------------+
| overwrite | whether or not to allow overwrite |
| | if file exists: true or false |
+--------------------------------------+--------------------------------------+
.. note::
At Aginity, we produce lists for marketing purposes using a single catalog item called "Product Daily Marketing Feeds" that execute twenty five queries and spool the results to twenty five csv files which we upload to our marketing engine all with the click of the Run button in Aginity Team.
......@@ -109,12 +142,62 @@ You will have datatype choices at runtime as shown in the table below.
:align: center
:widths: 15,30
Auto-Complete Capabilities
==============================
In |var_product_name| we have implemented auto-complete on several database platforms and will be deploying across all over time. The auto-complete capability has three capabilities.
#. Display any words on the editor screen from above where your current cursor is
#. Display SQL Syntax like SELECT, WHERE, FROM all the way to database platform specific functions like CASE, DATEDIFF or CURRENT_DATE()
#. Display the database, schema, table, column as you are typing
.. image:: ../../Pro_Images/AginityProAC.png
:scale: 100
:align: center
:alt: 1st Query
.. hint::
To initiate just the database browser which shows database objects plus snippets hit the **Ctrl+Space** button otherwise as you type if auto-complete is supported it will automatically popup.
.. note::
Currently we support auto-complete on Netezza, Redshift and Snowflake
Snippet support
================
We have pre-wired some special snippets within the editor as well to make writing SQL simpler. The table below details those snippets that are currently available.
+--------------------------------------+--------------------------------------+
| Snippet | Action |
+======================================+======================================+
| selall | will generate generic SELECT FROM |
+--------------------------------------+--------------------------------------+
| selwh | will generate generic SELECT FROM |
| | WHERE |
+--------------------------------------+--------------------------------------+
| upd | will generate an UPDATE statement |
+--------------------------------------+--------------------------------------+
| ins | will generate an INSERT statement |
+--------------------------------------+--------------------------------------+
| del | will generate a DELETE statement |
+--------------------------------------+--------------------------------------+
| expf | will generate a generic export to |
| | file statement |
+--------------------------------------+--------------------------------------+
Common Actions in Query Panel
=====================================
* Renaming Tabs
* Commenting SQL
* Keeping Connection
We will highlight common functions heavily used in the editor here. There is a complete list of available editor functions which can be accessed by hitting the **Command+Shift+P** on Mac or the **Ctrl+Shift+P** button within the editor or from the **View->Command Palette** menu item.
.. image:: ../../Pro_Images/AginityProQueryPanelPalette.png
:scale: 40
:align: center
:alt: rename tab
Renaming Tabs
----------------
......@@ -141,7 +224,8 @@ In |var_product_name| you can use the typical SQL syntax to comment your code as
/* This is another way to comment your SQL code */
If highlight multiple lines of code you can also use the Shortcut Keys **Ctrl+K+C** on Windows or **Command+K+C** on Mac to comment them out. To uncomment use **Ctrl+K+U** or **Command+K+U**.
.. hint::
If highlight multiple lines of code you can also use the Shortcut Keys **Ctrl+K+C** on Windows or **Command+K+C** on Mac to comment them out. To uncomment use **Ctrl+K+U** or **Command+K+U**.
Keeping Connection
......@@ -154,6 +238,15 @@ The **Keep Connection** checkbox as show below will instruct |var_product_name|
:align: center
:alt: Keep Connection
Find and Replace
-------------------
Ctrl+F (Windows) or Command+F (Mac) will bring up the find and replace box as shown below.
.. image:: ../../Pro_Images/AginityProQPFindReplace.png
:scale: 100
:align: center
:alt: Keep Connection
Interacting with Query Results
=====================================
......@@ -175,7 +268,7 @@ hold, and drag the column header for the column you wish to move. As you move it
grid will automatically adjust to reposition the column.
.. image:: ../../Pro_Images/pro_query_panel_results_sort_before.png
:scale: 50
:scale: 100
:align: center
:alt: Before rearranging query results
......@@ -183,7 +276,7 @@ Once you are satisfied with the new position of the column, you may release the
lock into place.
.. image:: ../../Pro_Images/pro_query_panel_results_rearrange_after.png
:scale: 50
:scale: 100
:align: center
:alt: After rearranging query results columns
......@@ -194,7 +287,7 @@ After successfully executing a query, if the query has returned any rows you may
order to permit various types of analysis of your results.
.. image:: ../../Pro_Images/pro_query_panel_results_sort_before.png
:scale: 50
:scale: 100
:align: center
:alt: Before sorting query results
......@@ -202,7 +295,7 @@ In order to sort your results, simply click on the header row in the results gri
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
:scale: 100
:align: center
:alt: After sorting query results by channel name
......@@ -218,7 +311,7 @@ filter icon (three horizontal bars) will appear. Click on the filter icon and yo
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
:scale: 100
:align: center
:alt: Popup displayed for filtering results
......@@ -227,7 +320,7 @@ and you may select any of them. Once you have selected the filter type you wish
filter into the text box. The results will immediately begin to filter.
.. image:: ../../Pro_Images/pro_query_panel_results_filter_applied.png
:scale: 50
:scale: 100
:align: center
:alt: Results filtered after entering criteria
......@@ -246,7 +339,7 @@ Value (CSV) format to a file outside of |var_product_name|. To do this, right-cl
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
:scale: 100
:align: center
:alt: Exporting your query results to a CSV file
......
......@@ -336,7 +336,7 @@ Hit the **Import** button and your queries should be imported!
Aginity also maintains a Github repository of Catalog queries to be used. These queries are either administrative queries for specific platforms, data engineering queries that do powerful transformations against generic data or analytic queries showing how to do cool things in SQL.
Access the repositories `here<https://github.com/Aginity>`_
Access the repositories `here <https://github.com/Aginity>`_
.. seealso::
:ref:`Using Query Panel <querypanel>`
......@@ -61,13 +61,13 @@ Shortcut Key Reference
Frequently Asked Questions
=====================================
The table below are commonly asked questions that we compile and provide answers to. Over time as things change we will keep this table up to date.
The section below is dedicated to commonly asked questions that we compile and provide answers to. Over time as things change we will keep this table up to date.
.. csv-table::
:file: faq.csv
:header-rows: 1
:align: left
:widths: 45,45
What Control do I have with Row Limit Preference?
---------------------------------------------------
By default we cap the row limit preference to 100K rows to discourage users from spooling too much data across your network. Trust us your network infrastructure folks do appreciate it. Fear not though, you have options. First, if you set the preference to 0, it will spool as much as you want until either you run out of memory or your query completes. Alternatively, we recommend spooling the output to a file if you are doing returns greater than 100K rows. Refer to the documentation on :ref:`execute query to file. <exf>`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment