TDMS Uploads

Import data from TDMS files directly into Sift

Credentials

Before starting this section, ensure you have retrieved your API key and the appropriate Sift URL for your provisioned environment. Instructions on obtaining the API key and URL are available in the authentication section of the documentation.

Import Data from TDMS files using sift-stack-py

Getting started with sift-stack-py

Be sure to visit the Python Quickstart section of the documentation to see how to get started with the Sift Python client library before continuing.

For this example we will be uploading data from sample_data.tdms which can be found at this link.

Uploading this TDMS file is only a few steps:

from sift_py.data_import.tdms import TdmsUploadService
 
# Instantiate a tdms upload service
tdms_upload_service = TdmsUploadService({
    "uri": sift_uri,
    "apikey": apikey,
})
 
# Upload the tdms file
import_service = tdms_upload_service.upload(
    "sample_data.tdms",
    asset_name,
    group_into_components=True,
)
 
# Wait until the upload is complete and store the uploaded file's metadata
# into the 'uploaded_file' variable.
uploaded_file = import_service.wait_until_complete()

For more comprehensive examples you can visit the Sift public repository.