QueryResult¶
- pydantic model openapi_client.models.query_result.QueryResult¶
Result set for a completed query, capped at 51 rows by the backend. Use GET /queries/{queryid}/results/download for the complete result file. TotalNumRows is returned on the Redshift path only.
- Fields:
- field header: Optional[List[StrictStr]] = None (alias 'Header')¶
Column names, in the same order as the values in each Rows entry. For statements that return no result set (CREATE, MERGE INTO, VACUUM) this is the single element “Message” and Rows carries the confirmation text.
- field rows: Optional[List[List[Any]]] = None (alias 'Rows')¶
Result rows, each an array of cell values positionally aligned with Header. Athena cells are always strings. Redshift cells preserve their source type, so a cell may be a string, number, boolean, or null.
- field total_num_rows: Optional[StrictInt] = None (alias 'TotalNumRows')¶
Total rows produced by the query, which may exceed the number returned in Rows. Returned on the Redshift path only.
- field results_download_link: Optional[StrictStr] = None (alias 'ResultsDownloadLink')¶
Presigned URL for the full result file. Absent for CREATE, MERGE INTO and VACUUM queries.
- to_str()¶
Returns the string representation of the model using alias
- Return type:
str
- to_json()¶
Returns the JSON representation of the model using alias
- Return type:
str
- classmethod from_json(json_str)¶
Create an instance of QueryResult from a JSON string
- Return type:
Optional[Self]
- to_dict()¶
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- Return type:
Dict[str,Any]
- classmethod from_dict(obj)¶
Create an instance of QueryResult from a dict
- Return type:
Optional[Self]