Last updated
Was this helpful?
Last updated
Was this helpful?
After executing a query the query results can be accessed via the SDK in a query result set object.
Query Results are stored in the QueryResultSet
object. This object is returned by:
Flipside.run
Flipside.get_query_results
Results are accessible via rows
and records
. Rows is an array of arrays (CSV format), while records are an array of objects where the keys are the column names.
Run stats provide a summary of the entire result set from the number of rows returned, the number of bytes returned, and a breakdown of time spent on each part of the query run's lifecycle.
Python QueryRunStats object, which can be accessed on the QueryResultSet via run_stats
The page
object returns stats about the current page of results as well as the total available pages given the specified page size you provided when requesting the results.
For example, if there are 1 million rows returned by a query and you request results with a page size of 10,000 rows, the total number of pages will be 100.
Assuming we have query_result_set
variable you can access the total number of pages simply by calling:
In the next example we'll show you how to use PageStats
to iterate over a Query Result Set.
query_exec_seconds
represents the number of QuerySeconds used by the query that you will be billed/debited for. Note you are not billed/debited for queued, streaming, or total seconds, only execution seconds. For more information on QuerySeconds see the .
queryExecSeconds represents the number of QuerySeconds used by the query that you will be billed/debited for. Note you are not billed/debited for queued, streaming, or total seconds, only execution seconds. For more information on QuerySeconds see the .