nisystemlink.clients.dataframe
- class nisystemlink.clients.dataframe.DataFrameClient(configuration=None)[source]
- __init__(configuration=None)[source]
Initialize an instance.
- Parameters
configuration (
Optional[nisystemlink.clients.core.HttpConfiguration]) – Defines the web server to connect to and information about how to connect. If not provided, theHttpConfigurationManageris used to obtain the configuration.- Raises
ApiException – if unable to communicate with the DataFrame Service.
- api_info()[source]
Get information about available API operations.
- Return type
- Returns
Information about available API operations.
- Raises
ApiException – if unable to communicate with the DataFrame Service.
- list_tables(take=None, id=None, order_by=None, order_by_descending=None, continuation_token=None, workspace=None)[source]
Lists available tables on the SystemLink DataFrame service.
- Parameters
take (
Optional[int]) – Limits the returned list to the specified number of results. Defaults to 1000.id (
Optional[List[str]]) – List of table IDs to filter by.order_by (
Optional[Literal['CREATED_AT','METADATA_MODIFIED_AT','NAME','NUMBER_OF_ROWS','ROWS_MODIFIED_AT']]) – The sort order of the returned list of tables.order_by_descending (
Optional[bool]) – Whether to sort descending instead of ascending. Defaults to false.continuation_token (
Optional[str]) – The token used to paginate results.workspace (
Optional[List[str]]) – List of workspace IDs to filter by.
- Return type
- Returns
The list of tables with a continuation token.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- create_table(table)[source]
Create a new table with the provided metadata and column definitions.
- Parameters
table (
nisystemlink.clients.dataframe.models.CreateTableRequest) – The request to create the table.- Return type
str- Returns
The ID of the newly created table.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- query_tables(query)[source]
Queries available tables on the SystemLink DataFrame service and returns their metadata.
- Parameters
query (
nisystemlink.clients.dataframe.models.QueryTablesRequest) – The request to query tables.- Return type
- Returns
The list of tables with a continuation token.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- get_table_metadata(id)[source]
Retrieves the metadata and column information for a single table identified by its ID.
- Parameters
id (str) – Unique ID of a data table.
- Return type
- Returns
The metadata for the table.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- modify_table(id, update)[source]
Modify properties of a table or its columns.
- Parameters
id (
str) – Unique ID of a data table.update (
nisystemlink.clients.dataframe.models.ModifyTableRequest) – The metadata to update.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- Return type
None
- delete_table(id)[source]
Deletes a table.
- Parameters
id (str) – Unique ID of a data table.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- Return type
None
- delete_tables(ids)[source]
Deletes multiple tables.
- Parameters
ids (List[str]) – List of unique IDs of data tables.
- Return type
Optional[nisystemlink.clients.dataframe.models.DeleteTablesPartialSuccess]- Returns
A partial success if any tables failed to delete, or None if all tables were deleted successfully.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- modify_tables(updates)[source]
Modify the properties associated with the tables identified by their IDs.
- Parameters
updates (
nisystemlink.clients.dataframe.models.ModifyTablesRequest) – The table modifications to apply.- Return type
Optional[nisystemlink.clients.dataframe.models.ModifyTablesPartialSuccess]- Returns
A partial success if any tables failed to be modified, or None if all tables were modified successfully.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- get_table_data(id, columns=None, order_by=None, order_by_descending=None, take=None, continuation_token=None)[source]
Reads raw data from the table identified by its ID.
- Parameters
id (
str) – Unique ID of a data table.columns (
Optional[List[str]]) – Columns to include in the response. Data will be returned in the same order as the columns. If not specified, all columns are returned.order_by (
Optional[List[str]]) – List of columns to sort by. Multiple columns may be specified to order rows that have the same value for prior columns. The columns used for ordering do not need to be included in the columns list, in which case they are not returned. If not specified, then the order in which results are returned is undefined.order_by_descending (
Optional[bool]) – Whether to sort descending instead of ascending. Defaults to false.take (
Optional[int]) – Limits the returned list to the specified number of results. Defaults to 500.continuation_token (
Optional[str]) – The token used to paginate results.
- Return type
- Returns
The table data and total number of rows with a continuation token.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- append_table_data(id, data, *, end_of_data=None)[source]
Appends one or more rows of data to the table identified by its ID.
- Parameters
id (
str) – Unique ID of a data table.data (
Union[nisystemlink.clients.dataframe.models.AppendTableDataRequest,nisystemlink.clients.dataframe.models.DataFrame,pyarrow.lib.RecordBatch,collections.abc.Iterable[pa.RecordBatch],None]) –The data to append.
Supported forms:
AppendTableDataRequest: Sent as-is via JSON;end_of_datamust beNone.DataFrame(service model): Wrapped into anAppendTableDataRequest(end_of_dataoptional) and sent as JSON.Single
pyarrow.RecordBatch: Treated the same as an iterable containing one batch and streamed as Arrow IPC.end_of_data(if provided) is sent as a query parameter.Iterable[pyarrow.RecordBatch]: Streamed as Arrow IPC.end_of_data(if provided) is sent as a query parameter. If the iterator yields no batches, it is treated asNoneand requiresend_of_data.None:end_of_datamust be provided; sends JSON containing only theendOfDataflag (useful for closing a table without appending rows).
end_of_data (
Optional[bool]) – Whether additional rows may be appended in future requests. Required whendataisNoneor the RecordBatch iterator is empty; must be omitted when passing anAppendTableDataRequest(include it inside that model instead).
- Raises
ValueError – If parameter constraints are violated.
ApiException – If unable to communicate with the DataFrame Service or an invalid argument is provided.
- Return type
None
- query_table_data(id, query)[source]
Reads rows of data that match a filter from the table identified by its ID.
- Parameters
id (
str) – Unique ID of a data table.query (
nisystemlink.clients.dataframe.models.QueryTableDataRequest) – The filtering and sorting to apply when reading data.
- Return type
- Returns
The table data and total number of rows with a continuation token.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- export_table_data(id, query)[source]
Exports rows of data that match a filter from the table identified by its ID.
- Parameters
id (
str) – Unique ID of a data table.query (
nisystemlink.clients.dataframe.models.ExportTableDataRequest) – The filtering, sorting, and export format to apply when exporting data.
- Return type
- Returns
A file-like object for reading the exported data.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- query_decimated_data(id, query)[source]
Reads decimated rows of data from the table identified by its ID.
- Parameters
id (
str) – Unique ID of a data table.query (
nisystemlink.clients.dataframe.models.QueryDecimatedDataRequest) – The filtering and decimation options to apply when reading data.
- Return type
- Returns
The decimated table data.
- Raises
ApiException – if unable to communicate with the DataFrame Service or provided an invalid argument.
- pydantic model nisystemlink.clients.dataframe.models.ApiInfo[source]
Information about the available API operations.
Show JSON schema
{ "title": "ApiInfo", "description": "Information about the available API operations.", "type": "object", "properties": { "operations": { "$ref": "#/$defs/OperationsV1" } }, "$defs": { "Operation": { "description": "Represents an operation that can be performed on a data frame.", "properties": { "available": { "title": "Available", "type": "boolean" }, "version": { "title": "Version", "type": "integer" } }, "required": [ "available", "version" ], "title": "Operation", "type": "object" }, "OperationsV1": { "description": "The operations available in the routes provided by the v1 HTTP API.", "properties": { "create_tables": { "$ref": "#/$defs/Operation" }, "delete_tables": { "$ref": "#/$defs/Operation" }, "modify_metadata": { "$ref": "#/$defs/Operation" }, "list_tables": { "$ref": "#/$defs/Operation" }, "read_data": { "$ref": "#/$defs/Operation" }, "write_data": { "$ref": "#/$defs/Operation" } }, "required": [ "create_tables", "delete_tables", "modify_metadata", "list_tables", "read_data", "write_data" ], "title": "OperationsV1", "type": "object" } }, "required": [ "operations" ] }
- Fields
-
field operations:
OperationsV1[Required]
- pydantic model nisystemlink.clients.dataframe.models.AppendTableDataRequest[source]
Contains the rows to append and optional flags. The
framefield is required unlessendOfDatais true.Show JSON schema
{ "title": "AppendTableDataRequest", "description": "Contains the rows to append and optional flags. The ``frame`` field is\nrequired unless ``endOfData`` is true.", "type": "object", "properties": { "frame": { "anyOf": [ { "$ref": "#/$defs/DataFrame" }, { "type": "null" } ], "default": null }, "end_of_data": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "End Of Data" } }, "$defs": { "DataFrame": { "description": "Data read from or to be written to a table.\n\nValues may be ``None`` (if the column is of type ``NULLABLE``) or encoded as\na string in a format according to each column's datatype:\n\n* BOOL: One of ``\"true\"`` or ``\"false\"``, case-insensitive.\n* INT32: Any integer number in the range [-2147483648, 2147483647],\n surrounded by quotes.\n* INT64: Any integer number in the range [-9223372036854775808,\n 9223372036854775807], surrounded by quotes.\n* FLOAT32: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-3.40282347E+38, 3.40282347E+38],\n surrounded by quotes. Not all values within the range can be represented\n with 32 bits. To preserve the exact binary encoding of the value when\n converting to a string, clients should serialize 9 digits after the\n decimal. Instead of a number, the value may be ``\"NaN\"`` (not a number),\n ``\"Infinity\"`` (positive infinity), or ``\"-Infinity\"`` (negative\n infinity), case-sensitive.\n* FLOAT64: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-1.7976931348623157E+308,\n 1.7976931348623157E+308], surrounded by quotes. Not all values within the\n range can be represented with 64 bits. To preserve the exact binary\n encoding of the value when converting to a string, clients should\n serialize 17 digits after the decimal. Instead of a number, the value may\n be ``\"NaN\"`` (not a number), ``\"Infinity\"`` (positive infinity), or\n ``\"-Infinity\"`` (negative infinity), case-sensitive.\n* STRING: Any quoted string.\n* TIMESTAMP: A date and time with millisecond precision in ISO-8601 format\n and time zone. For example: ``\"2022-08-19T16:17:30.123Z\"``. If a time zone\n is not provided, UTC is assumed. If a time zone other than UTC is\n provided, the value will be converted to UTC. If more than three digits of\n fractional seconds are provided, the time will be truncated to three\n digits (i.e. milliseconds).\n\nThe format is the same as a serialized Pandas DataFrame with orient=\"split\"\nand index=False. See\nhttps://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html.\n\nWhen providing a DataFrame for appending rows, any of the table's columns\nnot specified will receive a value of ``None``. If any such columns aren't\nnullable, an error will be returned. If the entire columns property is left\nout, each row is assumed to contain all columns in the order specified when\nthe table was created.", "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "data": { "items": { "items": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "array" }, "title": "Data", "type": "array" } }, "required": [ "data" ], "title": "DataFrame", "type": "object" } } }
- Fields
-
field end_of_data:
Optional[bool] = None Whether the table should expect any additional rows to be appended in future requests.
- pydantic model nisystemlink.clients.dataframe.models.Column[source]
Defines a single column in a table.
Show JSON schema
{ "title": "Column", "description": "Defines a single column in a table.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "data_type": { "$ref": "#/$defs/DataType" }, "column_type": { "$ref": "#/$defs/ColumnType", "default": "NORMAL" }, "properties": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "$defs": { "ColumnType": { "description": "Represents the different column types for a table column.", "enum": [ "NORMAL", "INDEX", "NULLABLE" ], "title": "ColumnType", "type": "string" }, "DataType": { "description": "Represents the different data types for a table column.", "enum": [ "BOOL", "FLOAT32", "FLOAT64", "INT32", "INT64", "STRING", "TIMESTAMP" ], "title": "DataType", "type": "string" } }, "required": [ "name", "data_type" ] }
- Fields
-
field column_type:
ColumnType= ColumnType.Normal The column type. Defaults to ColumnType.Normal.
-
field name:
str[Required] The column name, which must be unique across all columns in the table.
-
field properties:
Optional[Dict[str,str]] = None User-defined properties associated with the column.
- pydantic model nisystemlink.clients.dataframe.models.ColumnFilter[source]
A filter to apply to the table data.
Show JSON schema
{ "title": "ColumnFilter", "description": "A filter to apply to the table data.", "type": "object", "properties": { "column": { "title": "Column", "type": "string" }, "operation": { "$ref": "#/$defs/FilterOperation" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "$defs": { "FilterOperation": { "description": "Represents the different operations that can be used in a filter.", "enum": [ "EQUALS", "NOT_EQUALS", "LESS_THAN", "LESS_THAN_EQUALS", "GREATER_THAN", "GREATER_THAN_EQUALS", "CONTAINS", "NOT_CONTAINS" ], "title": "FilterOperation", "type": "string" } }, "required": [ "column", "operation" ] }
-
field column:
str[Required] The name of the column to use for filtering.
-
field operation:
FilterOperation[Required] How to compare the column’s value with the specified value.
An error is returned if the column’s data type does not support the specified operation: * String columns only support
EQUALS,NOT_EQUALS,CONTAINS, andNOT_CONTAINS. * Non-string columns do not supportCONTAINSorNOT_CONTAINS. * WhenvalueisNone, the operation must beEQUALSorNOT_EQUALS. * WhenvalueisNaNfor a floating-point column, the operation must beNOT_EQUALS.
-
field value:
Optional[str] = None The comparison value to use for filtering. An error will be returned if the value cannot be converted to the column’s data type.
-
field column:
- pydantic model nisystemlink.clients.dataframe.models.ColumnMetadataPatch[source]
Specifies column properties to add, modify, or delete when editing table metadata.
Show JSON schema
{ "title": "ColumnMetadataPatch", "description": "Specifies column properties to add, modify, or delete when editing table metadata.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "properties": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": "Properties" } }, "required": [ "name", "properties" ] }
- Fields
-
field name:
str[Required] The name of the column to modify.
-
field properties:
Dict[str,Optional[str]] [Required] The properties to modify. A map of key value properties containing the metadata to be added or modified. Set a property value to
Noneto delete the property.
- pydantic model nisystemlink.clients.dataframe.models.ColumnOrderBy[source]
Specifies a column to order by and the ordering direction.
Show JSON schema
{ "title": "ColumnOrderBy", "description": "Specifies a column to order by and the ordering direction.", "type": "object", "properties": { "column": { "title": "Column", "type": "string" }, "descending": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Descending" } }, "required": [ "column" ] }
- Fields
-
field column:
str[Required] The name of the column to order by.
-
field descending:
Optional[bool] = None Whether the ordering should be in descending order.
- class nisystemlink.clients.dataframe.models.ColumnType(value)[source]
Represents the different column types for a table column.
- Index = 'INDEX'
The column provides a unique value per row. Each table must provide exactly one INDEX column. The column’s
DataTypemust be INT32, INT64, or TIMESTAMP.
- Normal = 'NORMAL'
The column has no special properties. This is the default.
- Nullable = 'NULLABLE'
Rows may contain null values for this column. When appending rows, NULLABLE columns may be left out entirely, in which case all rows being appended will use null values for that column.
- pydantic model nisystemlink.clients.dataframe.models.CreateTableRequest[source]
Contains information needed to create a table, including its properties and column definitions.
Show JSON schema
{ "title": "CreateTableRequest", "description": "Contains information needed to create a table, including its properties and column definitions.", "type": "object", "properties": { "columns": { "items": { "$ref": "#/$defs/Column" }, "title": "Columns", "type": "array" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "properties": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" } }, "$defs": { "Column": { "description": "Defines a single column in a table.", "properties": { "name": { "title": "Name", "type": "string" }, "data_type": { "$ref": "#/$defs/DataType" }, "column_type": { "$ref": "#/$defs/ColumnType", "default": "NORMAL" }, "properties": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "required": [ "name", "data_type" ], "title": "Column", "type": "object" }, "ColumnType": { "description": "Represents the different column types for a table column.", "enum": [ "NORMAL", "INDEX", "NULLABLE" ], "title": "ColumnType", "type": "string" }, "DataType": { "description": "Represents the different data types for a table column.", "enum": [ "BOOL", "FLOAT32", "FLOAT64", "INT32", "INT64", "STRING", "TIMESTAMP" ], "title": "DataType", "type": "string" } }, "required": [ "columns" ] }
- Fields
-
field columns:
List[Column] [Required] The list of columns in the table. Exactly one column must have a
ColumnTypeof INDEX.
-
field name:
Optional[str] = None The name to associate with the table. When not specified, a name will be assigned from the table’s ID.
-
field properties:
Optional[Dict[str,str]] = None User-defined properties to associate with the table.
-
field test_result_id:
Optional[str] = None The ID of the test result associated with the table. A value of
Noneor an empty string indicates there is no associated test result. Added in version 2 of thenisystemlink.clients.dataframe.models.OperationsV1.create_tablesoperation. Older versions of the service will ignore this value.
-
field workspace:
Optional[str] = None The workspace to create the table in. Uses the default workspace when not specified.
- pydantic model nisystemlink.clients.dataframe.models.DataFrame[source]
Data read from or to be written to a table.
Values may be
None(if the column is of typeNULLABLE) or encoded as a string in a format according to each column’s datatype:BOOL: One of
"true"or"false", case-insensitive.INT32: Any integer number in the range [-2147483648, 2147483647], surrounded by quotes.
INT64: Any integer number in the range [-9223372036854775808, 9223372036854775807], surrounded by quotes.
FLOAT32: A decimal number using a period for the decimal point, optionally in scientific notation, in the range [-3.40282347E+38, 3.40282347E+38], surrounded by quotes. Not all values within the range can be represented with 32 bits. To preserve the exact binary encoding of the value when converting to a string, clients should serialize 9 digits after the decimal. Instead of a number, the value may be
"NaN"(not a number),"Infinity"(positive infinity), or"-Infinity"(negative infinity), case-sensitive.FLOAT64: A decimal number using a period for the decimal point, optionally in scientific notation, in the range [-1.7976931348623157E+308, 1.7976931348623157E+308], surrounded by quotes. Not all values within the range can be represented with 64 bits. To preserve the exact binary encoding of the value when converting to a string, clients should serialize 17 digits after the decimal. Instead of a number, the value may be
"NaN"(not a number),"Infinity"(positive infinity), or"-Infinity"(negative infinity), case-sensitive.STRING: Any quoted string.
TIMESTAMP: A date and time with millisecond precision in ISO-8601 format and time zone. For example:
"2022-08-19T16:17:30.123Z". If a time zone is not provided, UTC is assumed. If a time zone other than UTC is provided, the value will be converted to UTC. If more than three digits of fractional seconds are provided, the time will be truncated to three digits (i.e. milliseconds).
The format is the same as a serialized Pandas DataFrame with orient=”split” and index=False. See https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html.
When providing a DataFrame for appending rows, any of the table’s columns not specified will receive a value of
None. If any such columns aren’t nullable, an error will be returned. If the entire columns property is left out, each row is assumed to contain all columns in the order specified when the table was created.Show JSON schema
{ "title": "DataFrame", "description": "Data read from or to be written to a table.\n\nValues may be ``None`` (if the column is of type ``NULLABLE``) or encoded as\na string in a format according to each column's datatype:\n\n* BOOL: One of ``\"true\"`` or ``\"false\"``, case-insensitive.\n* INT32: Any integer number in the range [-2147483648, 2147483647],\n surrounded by quotes.\n* INT64: Any integer number in the range [-9223372036854775808,\n 9223372036854775807], surrounded by quotes.\n* FLOAT32: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-3.40282347E+38, 3.40282347E+38],\n surrounded by quotes. Not all values within the range can be represented\n with 32 bits. To preserve the exact binary encoding of the value when\n converting to a string, clients should serialize 9 digits after the\n decimal. Instead of a number, the value may be ``\"NaN\"`` (not a number),\n ``\"Infinity\"`` (positive infinity), or ``\"-Infinity\"`` (negative\n infinity), case-sensitive.\n* FLOAT64: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-1.7976931348623157E+308,\n 1.7976931348623157E+308], surrounded by quotes. Not all values within the\n range can be represented with 64 bits. To preserve the exact binary\n encoding of the value when converting to a string, clients should\n serialize 17 digits after the decimal. Instead of a number, the value may\n be ``\"NaN\"`` (not a number), ``\"Infinity\"`` (positive infinity), or\n ``\"-Infinity\"`` (negative infinity), case-sensitive.\n* STRING: Any quoted string.\n* TIMESTAMP: A date and time with millisecond precision in ISO-8601 format\n and time zone. For example: ``\"2022-08-19T16:17:30.123Z\"``. If a time zone\n is not provided, UTC is assumed. If a time zone other than UTC is\n provided, the value will be converted to UTC. If more than three digits of\n fractional seconds are provided, the time will be truncated to three\n digits (i.e. milliseconds).\n\nThe format is the same as a serialized Pandas DataFrame with orient=\"split\"\nand index=False. See\nhttps://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html.\n\nWhen providing a DataFrame for appending rows, any of the table's columns\nnot specified will receive a value of ``None``. If any such columns aren't\nnullable, an error will be returned. If the entire columns property is left\nout, each row is assumed to contain all columns in the order specified when\nthe table was created.", "type": "object", "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "data": { "items": { "items": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "array" }, "title": "Data", "type": "array" } }, "required": [ "data" ] }
-
field columns:
Optional[List[str]] = None The names and order of the columns included in the data frame.
-
field data:
List[List[Optional[str]]] [Required] The data for each row with the order specified in the columns property. Must contain a value for each column in the columns property.
- class nisystemlink.clients.dataframe.models.DataType(value)[source]
Represents the different data types for a table column.
- Bool = 'BOOL'
32-bit IEEE 754 floating-point number.
- Float32 = 'FLOAT32'
32-bit IEEE 754 floating-point number.
- Float64 = 'FLOAT64'
64-bit IEEE 754 floating-point number.
- Int32 = 'INT32'
32-bit signed integers.
- Int64 = 'INT64'
64-bit signed integers.
- String = 'STRING'
Arbitrary string data.
- Timestamp = 'TIMESTAMP'
Date and time represented in UTC with millisecond precision.
- class nisystemlink.clients.dataframe.models.DecimationMethod(value)[source]
Represents the different methods that can be used to decimate data.
- EntryExit = 'ENTRY_EXIT'
Creates an
x_columnordered set which will be divided in the number ofintervalsspecified. For each of the intervals, the first and last row within the interval will be returned in addition to the maximum and minimum values for all the columns specified iny_columns.
- Lossy = 'LOSSY'
Creates an
x_columnordered set and returns an uniformly distributed sample of rows with as many rows as the number specified asintervals.
- MaxMin = 'MAX_MIN'
Creates an
x_columnordered set which will be divided in the number ofintervalsspecified. For each of the intervals, the maximum and minimum values for all the columns specified iny_columnswill be returned.
- pydantic model nisystemlink.clients.dataframe.models.DecimationOptions[source]
Contains the parameters to use for data decimation.
Show JSON schema
{ "title": "DecimationOptions", "description": "Contains the parameters to use for data decimation.", "type": "object", "properties": { "x_column": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "X Column" }, "y_columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Y Columns" }, "intervals": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Intervals" }, "method": { "anyOf": [ { "$ref": "#/$defs/DecimationMethod" }, { "type": "null" } ], "default": null } }, "$defs": { "DecimationMethod": { "description": "Represents the different methods that can be used to decimate data.", "enum": [ "LOSSY", "MAX_MIN", "ENTRY_EXIT" ], "title": "DecimationMethod", "type": "string" } } }
-
field intervals:
Optional[int] = None Number of intervals to use for decimation. Defaults to 1000.
-
field method:
Optional[DecimationMethod] = None Specifies the method used to decimate the data. Defaults to
DecimationMethod.Lossy
-
field x_column:
Optional[str] = None The name of the column that will be used as the x-axis for decimating the data. The column in the table that was specified as Index will be used if this field is excluded. Only numeric columns are supported. i.e.
INT32,INT64,FLOAT32,FLOAT64andTIMESTAMP.
-
field y_columns:
Optional[List[str]] = None A list of columns to decimate by. This property is only needed when the specified method is
MAX_MINorENTRY_EXIT. Only numeric columns are supported. i.e.INT32,INT64,FLOAT32,FLOAT64andTIMESTAMP.
-
field intervals:
- pydantic model nisystemlink.clients.dataframe.models.DeleteTablesPartialSuccess[source]
The result of deleting multiple tables when one or more tables could not be deleted.
Show JSON schema
{ "title": "DeleteTablesPartialSuccess", "description": "The result of deleting multiple tables when one or more tables could not be deleted.", "type": "object", "properties": { "deleted_table_ids": { "items": { "type": "string" }, "title": "Deleted Table Ids", "type": "array" }, "failed_table_ids": { "items": { "type": "string" }, "title": "Failed Table Ids", "type": "array" }, "error": { "$ref": "#/$defs/ApiError" } }, "$defs": { "ApiError": { "description": "Represents the standard error structure for SystemLink API responses.", "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "code": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Code" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Message" }, "args": { "default": [], "items": { "type": "string" }, "title": "Args", "type": "array" }, "resource_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resource Type" }, "resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resource Id" }, "inner_errors": { "default": [], "items": { "$ref": "#/$defs/ApiError" }, "title": "Inner Errors", "type": "array" } }, "title": "ApiError", "type": "object" } }, "required": [ "deleted_table_ids", "failed_table_ids", "error" ] }
-
field deleted_table_ids:
List[str] [Required] The IDs of the tables that were successfully deleted.
-
field failed_table_ids:
List[str] [Required] The IDs of the tables that could not be deleted.
-
field deleted_table_ids:
- class nisystemlink.clients.dataframe.models.ExportFormat(value)[source]
The format of the exported data.
- CSV = 'CSV'
Comma-separated values.
- pydantic model nisystemlink.clients.dataframe.models.ExportTableDataRequest[source]
Specifies the parameters for a data export with ordering and filtering.
Show JSON schema
{ "title": "ExportTableDataRequest", "description": "Specifies the parameters for a data export with ordering and filtering.", "type": "object", "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "order_by": { "anyOf": [ { "items": { "$ref": "#/$defs/ColumnOrderBy" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Order By" }, "filters": { "anyOf": [ { "items": { "$ref": "#/$defs/ColumnFilter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Filters" }, "take": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Take" }, "response_format": { "$ref": "#/$defs/ExportFormat" } }, "$defs": { "ColumnFilter": { "description": "A filter to apply to the table data.", "properties": { "column": { "title": "Column", "type": "string" }, "operation": { "$ref": "#/$defs/FilterOperation" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "required": [ "column", "operation" ], "title": "ColumnFilter", "type": "object" }, "ColumnOrderBy": { "description": "Specifies a column to order by and the ordering direction.", "properties": { "column": { "title": "Column", "type": "string" }, "descending": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Descending" } }, "required": [ "column" ], "title": "ColumnOrderBy", "type": "object" }, "ExportFormat": { "description": "The format of the exported data.", "enum": [ "CSV" ], "title": "ExportFormat", "type": "string" }, "FilterOperation": { "description": "Represents the different operations that can be used in a filter.", "enum": [ "EQUALS", "NOT_EQUALS", "LESS_THAN", "LESS_THAN_EQUALS", "GREATER_THAN", "GREATER_THAN_EQUALS", "CONTAINS", "NOT_CONTAINS" ], "title": "FilterOperation", "type": "string" } }, "required": [ "response_format" ] }
- Fields
-
field columns:
Optional[List[str]] = None The names of columns to include in the export. The export will include the columns in the same order specified in this parameter. All columns are included in the order specified at table creation if this property is excluded.
-
field filters:
Optional[List[ColumnFilter]] = None A list of columns to filter by. Only rows whose columns contain values matching all of the specified filters are returned. The columns used for filtering do not need to be included in the columns list, in which case they are not included in the export.
-
field order_by:
Optional[List[ColumnOrderBy]] = None A list of columns to order the results by. Multiple columns may be specified to order rows that have the same value for prior columns. The columns used for sorting do not need to be included in the columns list, in which case they are not included in the export.
-
field response_format:
ExportFormat[Required] The format of the exported data. The only response format currently supported is
CSV.
-
field take:
Optional[int] = None The maximum number of rows to include in the export. If
None(the default), all rows are included. Added in version 3 of thenisystemlink.clients.dataframe.models.OperationsV1.read_dataoperation. Older versions of the service will ignore this value and always include all rows.
- class nisystemlink.clients.dataframe.models.FilterOperation(value)[source]
Represents the different operations that can be used in a filter.
- pydantic model nisystemlink.clients.dataframe.models.ModifyTableRequest[source]
Contains the metadata properties to modify. Values not included will remain unchanged.
Show JSON schema
{ "title": "ModifyTableRequest", "description": "Contains the metadata properties to modify. Values not included will remain unchanged.", "type": "object", "properties": { "metadata_revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Metadata Revision" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "properties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "columns": { "anyOf": [ { "items": { "$ref": "#/$defs/ColumnMetadataPatch" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" } }, "$defs": { "ColumnMetadataPatch": { "description": "Specifies column properties to add, modify, or delete when editing table metadata.", "properties": { "name": { "title": "Name", "type": "string" }, "properties": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": "Properties" } }, "required": [ "name", "properties" ], "title": "ColumnMetadataPatch", "type": "object" } } }
-
field columns:
Optional[List[ColumnMetadataPatch]] = None Updates to the column properties. Cannot add or remove columns, or change the name of a column.
-
field metadata_revision:
Optional[int] = None When specified, this is an integer that must match the last known revision number of the table, incremented by one. If it doesn’t match the current
metadataRevisionincremented by one at the time of execution, the modify request will be rejected with a 409 Conflict. This is used to ensure that changes to this table’s metadata are based on a known, previous state.
-
field name:
Optional[str] = None The new name of the table. Set to
Noneto reset the name to the table’s ID.
-
field properties:
Optional[Dict[str,Optional[str]]] = None The properties to modify. A map of key value properties containing the metadata to be added or modified. Set a property value to
Noneto delete the property.
-
field test_result_id:
Optional[str] = None The new test result ID associated with the table. Set to
Noneor an empty string to remove the test result ID. Added in version 2 of thenisystemlink.clients.dataframe.models.OperationsV1.modify_metadataoperation. Older versions of the service will ignore this value.
-
field workspace:
Optional[str] = None The new workspace for the table. Set to
Noneto reset to the default workspace. Changing the workspace requires permission to delete the table in its current workspace and permission to create the table in its new workspace.
-
field columns:
- pydantic model nisystemlink.clients.dataframe.models.ModifyTablesPartialSuccess[source]
The result of modifying multiple tables when one or more tables could not be modified.
Show JSON schema
{ "title": "ModifyTablesPartialSuccess", "description": "The result of modifying multiple tables when one or more tables could not be modified.", "type": "object", "properties": { "modified_table_ids": { "items": { "type": "string" }, "title": "Modified Table Ids", "type": "array" }, "failed_modifications": { "items": { "$ref": "#/$defs/TableMetadataModification" }, "title": "Failed Modifications", "type": "array" }, "error": { "$ref": "#/$defs/ApiError" } }, "$defs": { "ApiError": { "description": "Represents the standard error structure for SystemLink API responses.", "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "code": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Code" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Message" }, "args": { "default": [], "items": { "type": "string" }, "title": "Args", "type": "array" }, "resource_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resource Type" }, "resource_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Resource Id" }, "inner_errors": { "default": [], "items": { "$ref": "#/$defs/ApiError" }, "title": "Inner Errors", "type": "array" } }, "title": "ApiError", "type": "object" }, "TableMetadataModification": { "description": "Contains the metadata properties to modify. Values not included in the\nrequest or included with a ``None`` value will remain unchanged.", "properties": { "id": { "title": "Id", "type": "string" }, "metadata_revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Metadata Revision" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "properties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "required": [ "id" ], "title": "TableMetadataModification", "type": "object" } }, "required": [ "modified_table_ids", "failed_modifications", "error" ] }
-
field failed_modifications:
List[TableMetadataModification] [Required] The requested modifications that could not be applied.
-
field modified_table_ids:
List[str] [Required] The IDs of the tables that were successfully modified.
-
field failed_modifications:
- pydantic model nisystemlink.clients.dataframe.models.ModifyTablesRequest[source]
Contains one or more table modifications to apply.
Show JSON schema
{ "title": "ModifyTablesRequest", "description": "Contains one or more table modifications to apply.", "type": "object", "properties": { "tables": { "items": { "$ref": "#/$defs/TableMetadataModification" }, "title": "Tables", "type": "array" }, "replace": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Replace" } }, "$defs": { "TableMetadataModification": { "description": "Contains the metadata properties to modify. Values not included in the\nrequest or included with a ``None`` value will remain unchanged.", "properties": { "id": { "title": "Id", "type": "string" }, "metadata_revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Metadata Revision" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "properties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "required": [ "id" ], "title": "TableMetadataModification", "type": "object" } }, "required": [ "tables" ] }
-
field replace:
Optional[bool] = None When true, existing properties are replaced instead of merged.
-
field tables:
List[TableMetadataModification] [Required] The table modifications to apply. Each table may only appear once in the list.
-
field replace:
- pydantic model nisystemlink.clients.dataframe.models.Operation[source]
Represents an operation that can be performed on a data frame.
Show JSON schema
{ "title": "Operation", "description": "Represents an operation that can be performed on a data frame.", "type": "object", "properties": { "available": { "title": "Available", "type": "boolean" }, "version": { "title": "Version", "type": "integer" } }, "required": [ "available", "version" ] }
-
field available:
bool[Required] Whether or not the operation is available to the caller (e.g. due to permissions).
-
field version:
int[Required] The version of the available operation.
-
field available:
- pydantic model nisystemlink.clients.dataframe.models.OperationsV1[source]
The operations available in the routes provided by the v1 HTTP API.
Show JSON schema
{ "title": "OperationsV1", "description": "The operations available in the routes provided by the v1 HTTP API.", "type": "object", "properties": { "create_tables": { "$ref": "#/$defs/Operation" }, "delete_tables": { "$ref": "#/$defs/Operation" }, "modify_metadata": { "$ref": "#/$defs/Operation" }, "list_tables": { "$ref": "#/$defs/Operation" }, "read_data": { "$ref": "#/$defs/Operation" }, "write_data": { "$ref": "#/$defs/Operation" } }, "$defs": { "Operation": { "description": "Represents an operation that can be performed on a data frame.", "properties": { "available": { "title": "Available", "type": "boolean" }, "version": { "title": "Version", "type": "integer" } }, "required": [ "available", "version" ], "title": "Operation", "type": "object" } }, "required": [ "create_tables", "delete_tables", "modify_metadata", "list_tables", "read_data", "write_data" ] }
- pydantic model nisystemlink.clients.dataframe.models.PagedTableRows[source]
Contains the result of a query for rows of data.
Show JSON schema
{ "title": "PagedTableRows", "description": "Contains the result of a query for rows of data.", "type": "object", "properties": { "continuation_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Continuation Token" }, "frame": { "$ref": "#/$defs/DataFrame" }, "total_row_count": { "title": "Total Row Count", "type": "integer" } }, "$defs": { "DataFrame": { "description": "Data read from or to be written to a table.\n\nValues may be ``None`` (if the column is of type ``NULLABLE``) or encoded as\na string in a format according to each column's datatype:\n\n* BOOL: One of ``\"true\"`` or ``\"false\"``, case-insensitive.\n* INT32: Any integer number in the range [-2147483648, 2147483647],\n surrounded by quotes.\n* INT64: Any integer number in the range [-9223372036854775808,\n 9223372036854775807], surrounded by quotes.\n* FLOAT32: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-3.40282347E+38, 3.40282347E+38],\n surrounded by quotes. Not all values within the range can be represented\n with 32 bits. To preserve the exact binary encoding of the value when\n converting to a string, clients should serialize 9 digits after the\n decimal. Instead of a number, the value may be ``\"NaN\"`` (not a number),\n ``\"Infinity\"`` (positive infinity), or ``\"-Infinity\"`` (negative\n infinity), case-sensitive.\n* FLOAT64: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-1.7976931348623157E+308,\n 1.7976931348623157E+308], surrounded by quotes. Not all values within the\n range can be represented with 64 bits. To preserve the exact binary\n encoding of the value when converting to a string, clients should\n serialize 17 digits after the decimal. Instead of a number, the value may\n be ``\"NaN\"`` (not a number), ``\"Infinity\"`` (positive infinity), or\n ``\"-Infinity\"`` (negative infinity), case-sensitive.\n* STRING: Any quoted string.\n* TIMESTAMP: A date and time with millisecond precision in ISO-8601 format\n and time zone. For example: ``\"2022-08-19T16:17:30.123Z\"``. If a time zone\n is not provided, UTC is assumed. If a time zone other than UTC is\n provided, the value will be converted to UTC. If more than three digits of\n fractional seconds are provided, the time will be truncated to three\n digits (i.e. milliseconds).\n\nThe format is the same as a serialized Pandas DataFrame with orient=\"split\"\nand index=False. See\nhttps://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html.\n\nWhen providing a DataFrame for appending rows, any of the table's columns\nnot specified will receive a value of ``None``. If any such columns aren't\nnullable, an error will be returned. If the entire columns property is left\nout, each row is assumed to contain all columns in the order specified when\nthe table was created.", "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "data": { "items": { "items": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "array" }, "title": "Data", "type": "array" } }, "required": [ "data" ], "title": "DataFrame", "type": "object" } }, "required": [ "frame", "total_row_count" ] }
- Fields
-
field total_row_count:
int[Required] The total number of rows matched by the query across all pages of results.
- pydantic model nisystemlink.clients.dataframe.models.PagedTables[source]
The response for a table query containing the matched tables.
Show JSON schema
{ "title": "PagedTables", "description": "The response for a table query containing the matched tables.", "type": "object", "properties": { "continuation_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Continuation Token" }, "tables": { "items": { "$ref": "#/$defs/TableMetadata" }, "title": "Tables", "type": "array" } }, "$defs": { "Column": { "description": "Defines a single column in a table.", "properties": { "name": { "title": "Name", "type": "string" }, "data_type": { "$ref": "#/$defs/DataType" }, "column_type": { "$ref": "#/$defs/ColumnType", "default": "NORMAL" }, "properties": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "required": [ "name", "data_type" ], "title": "Column", "type": "object" }, "ColumnType": { "description": "Represents the different column types for a table column.", "enum": [ "NORMAL", "INDEX", "NULLABLE" ], "title": "ColumnType", "type": "string" }, "DataType": { "description": "Represents the different data types for a table column.", "enum": [ "BOOL", "FLOAT32", "FLOAT64", "INT32", "INT64", "STRING", "TIMESTAMP" ], "title": "DataType", "type": "string" }, "TableMetadata": { "description": "Contains information about a table, including its properties and column definitions.", "properties": { "columns": { "items": { "$ref": "#/$defs/Column" }, "title": "Columns", "type": "array" }, "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "id": { "title": "Id", "type": "string" }, "metadata_modified_at": { "format": "date-time", "title": "Metadata Modified At", "type": "string" }, "metadata_revision": { "title": "Metadata Revision", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Properties" }, "row_count": { "title": "Row Count", "type": "integer" }, "rows_modified_at": { "format": "date-time", "title": "Rows Modified At", "type": "string" }, "supports_append": { "title": "Supports Append", "type": "boolean" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "title": "Workspace", "type": "string" } }, "required": [ "columns", "created_at", "id", "metadata_modified_at", "metadata_revision", "name", "properties", "row_count", "rows_modified_at", "supports_append", "workspace" ], "title": "TableMetadata", "type": "object" } }, "required": [ "tables" ] }
- Fields
-
field tables:
List[TableMetadata] [Required] The list of tables returned by the query.
- pydantic model nisystemlink.clients.dataframe.models.QueryDecimatedDataRequest[source]
Specifies the columns, filters and decimation parameters for a query.
Show JSON schema
{ "title": "QueryDecimatedDataRequest", "description": "Specifies the columns, filters and decimation parameters for a query.", "type": "object", "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "filters": { "anyOf": [ { "items": { "$ref": "#/$defs/ColumnFilter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Filters" }, "decimation": { "anyOf": [ { "$ref": "#/$defs/DecimationOptions" }, { "type": "null" } ], "default": null } }, "$defs": { "ColumnFilter": { "description": "A filter to apply to the table data.", "properties": { "column": { "title": "Column", "type": "string" }, "operation": { "$ref": "#/$defs/FilterOperation" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "required": [ "column", "operation" ], "title": "ColumnFilter", "type": "object" }, "DecimationMethod": { "description": "Represents the different methods that can be used to decimate data.", "enum": [ "LOSSY", "MAX_MIN", "ENTRY_EXIT" ], "title": "DecimationMethod", "type": "string" }, "DecimationOptions": { "description": "Contains the parameters to use for data decimation.", "properties": { "x_column": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "X Column" }, "y_columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Y Columns" }, "intervals": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Intervals" }, "method": { "anyOf": [ { "$ref": "#/$defs/DecimationMethod" }, { "type": "null" } ], "default": null } }, "title": "DecimationOptions", "type": "object" }, "FilterOperation": { "description": "Represents the different operations that can be used in a filter.", "enum": [ "EQUALS", "NOT_EQUALS", "LESS_THAN", "LESS_THAN_EQUALS", "GREATER_THAN", "GREATER_THAN_EQUALS", "CONTAINS", "NOT_CONTAINS" ], "title": "FilterOperation", "type": "string" } } }
- Fields
-
field decimation:
Optional[DecimationOptions] = None The decimation options to use when querying data. If not specified, the default is to use
DecimationMethod.Lossywith 1000 intervals over the table’s index column.
- pydantic model nisystemlink.clients.dataframe.models.QueryTableDataRequest[source]
Contains the filtering and sorting options to use when querying table data.
Show JSON schema
{ "title": "QueryTableDataRequest", "description": "Contains the filtering and sorting options to use when querying table data.", "type": "object", "properties": { "continuation_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Continuation Token" }, "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "filters": { "anyOf": [ { "items": { "$ref": "#/$defs/ColumnFilter" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Filters" }, "order_by": { "anyOf": [ { "items": { "$ref": "#/$defs/ColumnOrderBy" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Order By" }, "take": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Take" } }, "$defs": { "ColumnFilter": { "description": "A filter to apply to the table data.", "properties": { "column": { "title": "Column", "type": "string" }, "operation": { "$ref": "#/$defs/FilterOperation" }, "value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value" } }, "required": [ "column", "operation" ], "title": "ColumnFilter", "type": "object" }, "ColumnOrderBy": { "description": "Specifies a column to order by and the ordering direction.", "properties": { "column": { "title": "Column", "type": "string" }, "descending": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Descending" } }, "required": [ "column" ], "title": "ColumnOrderBy", "type": "object" }, "FilterOperation": { "description": "Represents the different operations that can be used in a filter.", "enum": [ "EQUALS", "NOT_EQUALS", "LESS_THAN", "LESS_THAN_EQUALS", "GREATER_THAN", "GREATER_THAN_EQUALS", "CONTAINS", "NOT_CONTAINS" ], "title": "FilterOperation", "type": "string" } } }
-
field order_by:
Optional[List[ColumnOrderBy]] = None A list of columns to order the results by. Multiple columns may be specified to order rows that have the same value for prior columns. The columns used for sorting do not need to be included in the columns list, in which case they are not returned. If
order_byis not specified, then the order in which results are returned is undefined.
-
field take:
Optional[int] = None Limits the returned list to the specified number of results.
-
field order_by:
- pydantic model nisystemlink.clients.dataframe.models.QueryTablesRequest[source]
Request parameters for querying tables.
Show JSON schema
{ "title": "QueryTablesRequest", "description": "Request parameters for querying tables.", "type": "object", "properties": { "continuation_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Continuation Token" }, "filter": { "title": "Filter", "type": "string" }, "substitutions": { "anyOf": [ { "items": { "anyOf": [ { "type": "integer" }, { "type": "boolean" }, { "type": "string" }, { "type": "null" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Substitutions" }, "reference_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Reference Time" }, "take": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Take" }, "order_by": { "anyOf": [ { "enum": [ "CREATED_AT", "METADATA_MODIFIED_AT", "NAME", "NUMBER_OF_ROWS", "ROWS_MODIFIED_AT" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Order By" }, "order_by_descending": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Order By Descending" }, "interactive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Interactive" } }, "required": [ "filter" ] }
-
field filter:
str[Required] The table query filter in Dynamic LINQ format.
Allowed properties in the filter are:
columns: List of columns in the table (see below; requires version 2 of thenisystemlink.clients.dataframe.models.OperationsV1.list_tablesoperation)createdAt: DateTime the table was createdcreatedWithin: TimeSpan in which the table was createdid: String value uniquely identifying the tablename: String name for the tablemetadataModifiedAt: DateTime the table’s metadata was last modifiedmetadataModifiedWithin: TimeSpan in which the table’s metadata was last modifiedproperties: Dictionary with string keys and values representing table metadatarowsModifiedAt: DateTime rows were last appended to the tablerowsModifiedWithin: TimeSpan within rows were last appended to the tablerowCount: Int32 number of rows in the tablesupportsAppend: Boolean indicating whether or not the table supports appending additional rows of datatestResultId: String ID of the test result associated with the table (requires version 2 of thenisystemlink.clients.dataframe.models.OperationsV1.list_tablesoperation)workspace: String ID of the workspace the table belongs toworkspaceName: String name of the workspace the table belongs to
Allowed properties in the
columnslist are:name: String name of the column (requires atestResultIdfilter)
Allowed constants in the filter are:
RelativeTime.CurrentDay: TimeSpan representing the elapsed time between now and the start of the current dayRelativeTime.CurrentWeek: TimeSpan representing the elapsed time between now and the start of the current weekRelativeTime.CurrentMonth: TimeSpan representing the elapsed time between now and the start of the current monthRelativeTime.CurrentYear: TimeSpan representing the elapsed time between now and the start of the current year
-
field interactive:
Optional[bool] = None Whether the query is being made within an interactive context, such as a web UI. Interactive queries receive faster feedback for slow queries. Added in version 2 of the
nisystemlink.clients.dataframe.models.OperationsV1.list_tablesoperation. Older versions of the service will ignore this value.
-
field order_by:
Optional[Literal['CREATED_AT','METADATA_MODIFIED_AT','NAME','NUMBER_OF_ROWS','ROWS_MODIFIED_AT']] = None The sort order of the returned list of tables.
-
field order_by_descending:
Optional[bool] = None Whether to sort descending instead of ascending.
The elements in the list are sorted ascending by default. If the orderByDescending parameter is specified, the elements in the list are sorted based on it’s value. The orderByDescending value must be a boolean string. The elements in the list are sorted ascending if false and descending if true.
-
field reference_time:
Optional[datetime] = None The date and time to use as the reference point for RelativeTime filters, including time zone information. Defaults to the time on the server in UTC.
-
field substitutions:
Optional[List[Union[Annotated[int],Annotated[bool],str,None]]] = None Make substitutions in the query filter expression.
Substitutions for the query expression are indicated by non-negative integers that are prefixed with the
@symbol. Each substitution in the given expression will be replaced by the element at the corresponding index (zero-based) in this list. For example,@0in the filter expression will be replaced with the element at the zeroth index of the substitutions list.
-
field take:
Optional[int] = None Limits the returned list to the specified number of results.
-
field filter:
- pydantic model nisystemlink.clients.dataframe.models.TableMetadata[source]
Contains information about a table, including its properties and column definitions.
Show JSON schema
{ "title": "TableMetadata", "description": "Contains information about a table, including its properties and column definitions.", "type": "object", "properties": { "columns": { "items": { "$ref": "#/$defs/Column" }, "title": "Columns", "type": "array" }, "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "id": { "title": "Id", "type": "string" }, "metadata_modified_at": { "format": "date-time", "title": "Metadata Modified At", "type": "string" }, "metadata_revision": { "title": "Metadata Revision", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Properties" }, "row_count": { "title": "Row Count", "type": "integer" }, "rows_modified_at": { "format": "date-time", "title": "Rows Modified At", "type": "string" }, "supports_append": { "title": "Supports Append", "type": "boolean" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "title": "Workspace", "type": "string" } }, "$defs": { "Column": { "description": "Defines a single column in a table.", "properties": { "name": { "title": "Name", "type": "string" }, "data_type": { "$ref": "#/$defs/DataType" }, "column_type": { "$ref": "#/$defs/ColumnType", "default": "NORMAL" }, "properties": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "required": [ "name", "data_type" ], "title": "Column", "type": "object" }, "ColumnType": { "description": "Represents the different column types for a table column.", "enum": [ "NORMAL", "INDEX", "NULLABLE" ], "title": "ColumnType", "type": "string" }, "DataType": { "description": "Represents the different data types for a table column.", "enum": [ "BOOL", "FLOAT32", "FLOAT64", "INT32", "INT64", "STRING", "TIMESTAMP" ], "title": "DataType", "type": "string" } }, "required": [ "columns", "created_at", "id", "metadata_modified_at", "metadata_revision", "name", "properties", "row_count", "rows_modified_at", "supports_append", "workspace" ] }
- Fields
-
field created_at:
datetime[Required] The date and time the table was created.
-
field id:
str[Required] The table’s unique identifier.
-
field metadata_modified_at:
datetime[Required] The date and time the table’s metadata was last modified.
-
field metadata_revision:
int[Required] The table’s metadata revision number, incremented each time the metadata is modified.
-
field name:
str[Required] The name associated with the table.
-
field properties:
Dict[str,str] [Required] User-defined properties associated with the table.
-
field row_count:
int[Required] The number of rows in the table.
-
field rows_modified_at:
datetime[Required] The date and time the table’s data was last modified.
-
field supports_append:
bool[Required] Whether the table supports appending additional rows of data.
-
field test_result_id:
Optional[str] = None The ID of the test result associated with the table. Added in version 2 of the
nisystemlink.clients.dataframe.models.OperationsV1.list_tablesoperation. This value will always beNonewhen communicating with older versions of the service.
-
field workspace:
str[Required] The workspace the table belongs to.
- pydantic model nisystemlink.clients.dataframe.models.TableMetadataModification[source]
Contains the metadata properties to modify. Values not included in the request or included with a
Nonevalue will remain unchanged.Show JSON schema
{ "title": "TableMetadataModification", "description": "Contains the metadata properties to modify. Values not included in the\nrequest or included with a ``None`` value will remain unchanged.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "metadata_revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Metadata Revision" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "test_result_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Test Result Id" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workspace" }, "properties": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" } }, "required": [ "id" ] }
-
field id:
str[Required] The ID of the table to modify.
-
field metadata_revision:
Optional[int] = None When specified, this is an integer that must match the last known revision number of the table, incremented by one. If it doesn’t match the current
metadataRevisionincremented by one at the time of execution, the modify request will be rejected with a conflict error. This is used to ensure that changes to this table’s metadata are based on a known, previous state.
-
field name:
Optional[str] = None The new name of the table.
-
field properties:
Optional[Dict[str,Optional[str]]] = None The properties to modify. A map of key value properties containing the metadata to be added or modified. Setting a property value to
Nonewill delete the property. Existing properties not included in the map are unaffected unless replace is true in the top-level request object.
-
field test_result_id:
Optional[str] = None The new test result ID associated with the table. Set to an empty string to remove the test result ID. Added in version 2 of the
nisystemlink.clients.dataframe.models.OperationsV1.modify_metadataoperation. Older versions of the service will ignore this value.
-
field workspace:
Optional[str] = None The new workspace for the table. Changing the workspace requires permission to delete the table in its current workspace and permission to create the table in its new workspace.
-
field id:
- nisystemlink.clients.dataframe.models.TableMetdataModification
alias of
TableMetadataModification
- pydantic model nisystemlink.clients.dataframe.models.TableRows[source]
Contains the result of a query for rows of decimated data.
Show JSON schema
{ "title": "TableRows", "description": "Contains the result of a query for rows of decimated data.", "type": "object", "properties": { "frame": { "$ref": "#/$defs/DataFrame" } }, "$defs": { "DataFrame": { "description": "Data read from or to be written to a table.\n\nValues may be ``None`` (if the column is of type ``NULLABLE``) or encoded as\na string in a format according to each column's datatype:\n\n* BOOL: One of ``\"true\"`` or ``\"false\"``, case-insensitive.\n* INT32: Any integer number in the range [-2147483648, 2147483647],\n surrounded by quotes.\n* INT64: Any integer number in the range [-9223372036854775808,\n 9223372036854775807], surrounded by quotes.\n* FLOAT32: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-3.40282347E+38, 3.40282347E+38],\n surrounded by quotes. Not all values within the range can be represented\n with 32 bits. To preserve the exact binary encoding of the value when\n converting to a string, clients should serialize 9 digits after the\n decimal. Instead of a number, the value may be ``\"NaN\"`` (not a number),\n ``\"Infinity\"`` (positive infinity), or ``\"-Infinity\"`` (negative\n infinity), case-sensitive.\n* FLOAT64: A decimal number using a period for the decimal point, optionally\n in scientific notation, in the range [-1.7976931348623157E+308,\n 1.7976931348623157E+308], surrounded by quotes. Not all values within the\n range can be represented with 64 bits. To preserve the exact binary\n encoding of the value when converting to a string, clients should\n serialize 17 digits after the decimal. Instead of a number, the value may\n be ``\"NaN\"`` (not a number), ``\"Infinity\"`` (positive infinity), or\n ``\"-Infinity\"`` (negative infinity), case-sensitive.\n* STRING: Any quoted string.\n* TIMESTAMP: A date and time with millisecond precision in ISO-8601 format\n and time zone. For example: ``\"2022-08-19T16:17:30.123Z\"``. If a time zone\n is not provided, UTC is assumed. If a time zone other than UTC is\n provided, the value will be converted to UTC. If more than three digits of\n fractional seconds are provided, the time will be truncated to three\n digits (i.e. milliseconds).\n\nThe format is the same as a serialized Pandas DataFrame with orient=\"split\"\nand index=False. See\nhttps://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html.\n\nWhen providing a DataFrame for appending rows, any of the table's columns\nnot specified will receive a value of ``None``. If any such columns aren't\nnullable, an error will be returned. If the entire columns property is left\nout, each row is assumed to contain all columns in the order specified when\nthe table was created.", "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "data": { "items": { "items": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "array" }, "title": "Data", "type": "array" } }, "required": [ "data" ], "title": "DataFrame", "type": "object" } }, "required": [ "frame" ] }
- Fields
Arrow / JSON Ingestion Notes
append_table_data accepts multiple data forms:
AppendTableDataRequest(JSON)DataFramemodel (JSON)Single
pyarrow.RecordBatch(Arrow IPC)Iterable of
pyarrow.RecordBatch(Arrow IPC)Nonewithend_of_data(flush only)
Arrow support is optional and requires installing the pyarrow extra:
pip install "nisystemlink-clients[pyarrow]"
If pyarrow is not installed and a RecordBatch (or iterable) is passed, a
RuntimeError is raised. When Arrow is used, the batches are serialized into
an IPC stream and sent with content type
application/vnd.apache.arrow.stream; the end_of_data flag is sent as a
query parameter. JSON ingestion places endOfData in the request body.
If the target SystemLink DataFrame Service does not yet support Arrow and
responds with HTTP 400, the client raises an explanatory ApiException
advising to upgrade or fall back to JSON ingestion.