Skip to main content
get_records_by_series_and_decode(table_name=None, world_table_name=None, offset=0, limit=250, encoding=‘binary’, options=, force_primitive_return_types=True)[source]

Retrieves the complete series/track records from the given input parameter world_table_name based on the partial track information contained in the input parameter table_name.

This operation supports paging through the data via the input parameter offset and input parameter limit parameters.

In contrast to GPUdb.get_records() this returns records grouped by series/track. So if input parameter offset is 0 and input parameter limit is 5 this operation would return the first 5 series/tracks in input parameter table_name. Each series/track will be returned sorted by their TIMESTAMP column.

Parameters

table_name (str) –

Name of the table or view for which series/tracks will be fetched, in [schema_name.]table_name format, using standard name resolution rules.

world_table_name (str) –

Name of the table containing the complete series/track information to be returned for the tracks present in the input parameter table_name, in [schema_name.]table_name format, using standard name resolution rules. Typically this is used when retrieving series/tracks from a view (which contains partial series/tracks) but the user wants to retrieve the entire original series/tracks. Can be blank.

offset (int) –

A positive integer indicating the number of initial series/tracks to skip (useful for paging through the results). The default value is 0. The minimum allowed value is 0. The maximum allowed value is MAX_INT.

limit (int) –

A positive integer indicating the maximum number of series/tracks to be returned. Or END_OF_SET (-9999) to indicate that the max number of results should be returned. The default value is 250.

encoding (str) –

Specifies the encoding for returned records; either binary or json. Allowed values are:

  • binary

  • json

The default value is ‘binary’.

options (dict of str to str) –

Optional parameters. The default value is an empty dict ( ).

force_primitive_return_types (bool) –

If True, then OrderedDict objects will be returned, where string sub-type columns will have their values converted back to strings; for example, the Python datetime structs, used for datetime type columns would have their values returned as strings. If False, then Record objects will be returned, which for string sub-types, will return native or custom structs; no conversion to string takes place. String conversions, when returning OrderedDicts, incur a speed penalty, and it is strongly recommended to use the Record object option instead. If True, but none of the returned columns require a conversion, then the original Record objects will be returned. Default value is True.

Returns

A dict with the following entries–

table_names (list of str) –

The table name (one per series/track) of the returned series/tracks.

type_names (list of str) –

The type IDs (one per series/track) of the returned series/tracks.

type_schemas (list of str) –

The type schemas (one per series/track) of the returned series/tracks.

info (dict of str to str) –

Additional information.

records (list of list of Record) –

A list of list of Record objects which contain the decoded records.