Execute a query
queries_post(
database,
sql,
preview_rows,
credential = NULL,
hidden = NULL,
interactive = NULL,
include_header = NULL,
compression = NULL,
column_delimiter = NULL,
unquoted = NULL,
filename_prefix = NULL
)
A list containing the following elements:
integer, The query ID.
integer, The database ID.
string, The SQL to execute.
integer, The credential ID.
array, A preview of rows returned by the query.
array, A preview of columns returned by the query.
integer, The ID of the script associated with this query.
string, Deprecated and not used.
string, The error message for this run, if present.
string,
string,
string, The start time of the last run.
string, The end time of the last run.
string, The state of the last run. One of queued, running, succeeded, failed, and cancelled.
integer, The ID of the last run.
boolean, The hidden status of the item.
string, The archival status of the requested item(s).
string, Your permission level on the object. One of "read", "write", or "manage".
boolean, Deprecated and not used.
integer, The number of rows to save from the query's result (maximum: 100).
boolean, Whether the CSV output should include a header row [default: true].
string, The type of compression. One of gzip or zip, or none [default: gzip].
string, The delimiter to use. One of comma or tab, or pipe [default: comma].
boolean, If true, will not quote fields.
string, The output filename prefix.
integer, The ID of the report associated with this query.
integer required. The database ID.
string required. The SQL to execute.
integer required. The number of rows to save from the query's result (maximum: 100).
integer optional. The credential ID.
boolean optional. The hidden status of the item.
boolean optional. Deprecated and not used.
boolean optional. Whether the CSV output should include a header row [default: true].
string optional. The type of compression. One of gzip or zip, or none [default: gzip].
string optional. The delimiter to use. One of comma or tab, or pipe [default: comma].
boolean optional. If true, will not quote fields.
string optional. The output filename prefix.