Commit acc0d1c6 authored by Jeffrey Schlitt's avatar Jeffrey Schlitt

added FAQ and Execute to File

parent fe0bf6bd
......@@ -39,6 +39,49 @@ 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>`
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).
To do this you must issue the following commands
#. Use the #+sql command to tell the editor you will be writing SQL in this section.
#. You will then use the :output file command to tell the editor you will spool the results to an output file
#. In the table below is a series of parameters and descriptions to be used when spooling
#. Use the #+begin statement to tell the editor you from here until the #+end command you will have SQL to execute.
#. Write your SQL
#. End with #+end
#. Use the Run commands as you would any normal SQL statement as described in the Run Scope section above.
The code below is an example you can use to build off of.
.. code-block:: SQL
-- This will write the SQL statement between #+begin and #+end to the file specified.
:output file
:path '/users/jschlitt/Downloads/jeff1'
:type csv
:delimiter ','
:null_value 'NULL'
:quote_char '"'
:escape_char '\'
:row_delimiter '/'
:overwrite true
select * from wb_pro_marketing_list
where emaildomain = ''
.. 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.
.. _useparam:
......@@ -98,6 +141,7 @@ 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**.
Keeping Connection
"I see in the Aginity Pro and Team, I can set preferences to number of rows returned. One thing I don't see is the ability to move this past 100K rows because it turns red if I try. What if I need to spool more than 100K rows?","Yes, you are correct by default we cap the number of rows to 100K in the preferences 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 execute query to file under the ""Using the Query Panel Section""."
\ No newline at end of file
......@@ -58,6 +58,19 @@ Shortcut Key Reference
| Command F (Mac) or Ctrl F (Windows) | Find and Replace Menu |
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.
.. csv-table::
:file: FAQ.csv
:header-rows: 1
:align: left
:widths: 45,45
.. _sqlref:
SQL Reference Guides for Supported connections
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