queries_post: Execute a query

View source: R/generated_client.R

queries_postR Documentation

Execute a query

Description

Execute a query

Usage

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
)

Arguments

database

integer required. The database ID.

sql

string required. The SQL to execute.

preview_rows

integer required. The number of rows to save from the query's result (maximum: 100).

credential

integer optional. The credential ID.

hidden

boolean optional. The hidden status of the item.

interactive

boolean optional. Deprecated and not used.

include_header

boolean optional. Whether the CSV output should include a header row [default: true].

compression

string optional. The type of compression. One of gzip or zip, or none [default: gzip].

column_delimiter

string optional. The delimiter to use. One of comma or tab, or pipe [default: comma].

unquoted

boolean optional. If true, will not quote fields.

filename_prefix

string optional. The output filename prefix.

Value

A list containing the following elements:

id

integer, The query ID.

database

integer, The database ID.

sql

string, The SQL to execute.

credential

integer, The credential ID.

resultRows

array, A preview of rows returned by the query.

resultColumns

array, A preview of columns returned by the query.

scriptId

integer, The ID of the script associated with this query.

exception

string, Deprecated and not used.

error

string, The error message for this run, if present.

createdAt

string,

updatedAt

string,

startedAt

string, The start time of the last run.

finishedAt

string, The end time of the last run.

state

string, The state of the last run. One of queued, running, succeeded, failed, and cancelled.

lastRunId

integer, The ID of the last run.

hidden

boolean, The hidden status of the item.

archived

string, The archival status of the requested item(s).

myPermissionLevel

string, Your permission level on the object. One of "read", "write", or "manage".

interactive

boolean, Deprecated and not used.

previewRows

integer, The number of rows to save from the query's result (maximum: 100).

includeHeader

boolean, Whether the CSV output should include a header row [default: true].

compression

string, The type of compression. One of gzip or zip, or none [default: gzip].

columnDelimiter

string, The delimiter to use. One of comma or tab, or pipe [default: comma].

unquoted

boolean, If true, will not quote fields.

filenamePrefix

string, The output filename prefix.

reportId

integer, The ID of the report associated with this query.


civis documentation built on April 1, 2023, 12:01 a.m.