iottsbulk.clients package

Submodules

iottsbulk.clients.bulk_import_operations_client module

IoT Time Series Bulk API

This API allows to bulk import IoT time series data based on files uploaded via IoT File Service. Data import for simulation assets (entities) is supported with up to nano second precision and for performance assets (entities) with up to milli second precision. A bulk import is modeled as asynchronous job whose status can be retrieved after creation. Successfully imported time series data can be retrieved using the read operation. # noqa: E501

class BulkImportOperationsClient(rest_client_config=None, mindsphere_credentials=None)[source]

Bases: object

create_import_job(request_object)[source]

Create bulk import job for importing time series data

Creates an import job resource to asynchronously import IoT time series data from files uploaded through IoT File Service. After successful creation of an import job, the provided file contents are validated and imported in the background. The status of a job can be retrieved using the returned job ID. Note that in case of validation errors occuring during or after job creation, no time series data is imported from any of the provided files. ### Restrictions: ### Currently only one asset-aspect (entity-property set) combination can be specified as target of the import. Data for performance assets (entities) must be older than 30 minutes in order to be imported, while for simulation assets (entities) no restriction on minimum age exists. In case of simulation assets (entities), all data must be within the same hour. In case of performance assets (entities), all data must be within the same day. The overall size of the files used to import data for one asset-aspect (entity-property set) combination is limited: - For simulation assets (entities), a maximum of 350 MB per hour is allowed - For performance assets (entities), a maximum of 1 GB per day is allowed Note that hour and day intervals are fixed with respect to UTC time hours and days. A maximum of 100 files can be specified per request.

Parameters:request_object (CreateImportJobRequest) – It contains the below parameters –>
( bulkImportInput* - Input for time series bulk ingestion job creation. Even though an array of multiple asset-aspect (entity-property set) combinations is offered in the schema, only one combination of asset (entity) and aspect (property set) is supported at the moment. All provided time series data must be related to that combination. )
Returns:JobStatus
retrieve_import_job(request_object)[source]

Retrieve status of bulk import job

Parameters:request_object (RetrieveImportJobRequest) – It contains the below parameters –>
( id* - Bulk import job ID as obtained on job creation )
Returns:JobStatus

iottsbulk.clients.read_operations_client module

IoT Time Series Bulk API

This API allows to bulk import IoT time series data based on files uploaded via IoT File Service. Data import for simulation assets (entities) is supported with up to nano second precision and for performance assets (entities) with up to milli second precision. A bulk import is modeled as asynchronous job whose status can be retrieved after creation. Successfully imported time series data can be retrieved using the read operation. # noqa: E501

class ReadOperationsClient(rest_client_config=None, mindsphere_credentials=None)[source]

Bases: object

retrieve_timeseries(request_object)[source]

Retrieve time series data

Retrieve time series data for a single asset (entity) and aspect (property set). Returns data for the specified time range. Returns only the selected properties if ‘select’ parameter is used. The maximum number of time series data items returned per request is defined by parameter ‘limit’. In case more time series data items are present in the requested time range, only a subset of data items will be returned. In that case response property ‘nextRecord’ contains the request URL to fetch the next set of time series data items, by increasing the ‘from’ parameter accordingly.

Parameters:request_object (RetrieveTimeseriesRequest) – It contains the below parameters –>
( entity* - Unique identifier of the asset (entity). ),
( propertySetName* - Unique name of the aspect (property set). ),
( from* - Beginning of the time range to read (exclusive). ‘from’ time must be less than ‘to’ time. Range between ‘from’ and ‘to’ time must be less than 90 days. ),
( to* - End of the time range to retrieve (inclusive). ),
( limit - Maximum number of time series data items to be retrieved. ),
( select - Comma-separated list of properties to be returned. By default all properties of an(a) aspect (property set) are considered. )
Returns:TimeSeries

Module contents