client.l2cache
Client for interacting with the level2 cache service.
Methods:
Name | Description |
---|---|
cache_metadata |
Retrieves the meta data for the cache |
get_l2data |
Gets the attributed statistics data for L2 ids. |
get_l2data_table |
Gets the attributed statistics data for L2 ids, returned as a dataframe. |
has_cache |
Checks if the l2 cache is available for the dataset |
table_mapping |
Retrieves table mappings for l2 cache. |
Attributes:
Name | Type | Description |
---|---|---|
server_version |
Optional[Version]
|
The version of the service running on the remote server. Note that this |
server_version: Optional[Version]
property
¶
The version of the service running on the remote server. Note that this refers to the software running on the server and has nothing to do with the version of the datastack itself.
cache_metadata()
¶
Retrieves the meta data for the cache
Returns:
Type | Description |
---|---|
dict
|
keys are attribute names, values are datatypes |
get_l2data(l2_ids, attributes=None)
¶
Gets the attributed statistics data for L2 ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
l2_ids
|
list or ndarray
|
A list of level 2 ids. |
required |
attributes
|
list
|
A list of attributes to retrieve. Defaults to
See the tutorial for more description. |
None
|
Returns:
Type | Description |
---|---|
dict
|
Keys are l2 ids, values are data. |
get_l2data_table(l2_ids, attributes=None, split_columns=True)
¶
Gets the attributed statistics data for L2 ids, returned as a dataframe.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
l2_ids
|
list or ndarray
|
A list of level 2 ids. |
required |
attributes
|
list
|
A list of attributes to retrieve. Defaults to
See the tutorial for more description. |
None
|
split_columns
|
bool
|
Whether to split columns with multiple values into separate columns. |
True
|
Returns:
Type | Description |
---|---|
DataFrame
|
A pandas dataframe with the requested attributes as columns and indexed by l2_id. |