upload_tdms_to_dataset#

nominal.tdms.upload_tdms_to_dataset(dataset, file, timestamp_column=None, timestamp_type=None, *, wait_until_complete=True, file_name=None, tag_columns=None, tags=None)#

Process and upload a tdms file to an existing dataset as if it were a gzipped-CSV file

Parameters:
  • dataset (Dataset)

    Dataset to upload the dataframe to

  • file (Path | str)

    Path to the TDMS file to parse and upload

  • timestamp_column (str | None)

    Column containing timestamps to use for their respective rows.

    Note: If provided, only groups containing a signal of this name will be uploaded. Furthermore, the length of all data columns must match their respective timestamp columns.

    If not provided, TDMS channel properties must have both a wf_increment and wf_start_time property to be uploaded.

  • timestamp_type (Iso8601 | Epoch | Relative | Custom | Literal['iso_8601', 'epoch_picoseconds', 'epoch_nanoseconds', 'epoch_microseconds', 'epoch_milliseconds', 'epoch_seconds', 'epoch_minutes', 'epoch_hours', 'epoch_days'] | None)

    Type of timestamp, e.g., epoch_seconds, iso8601, etc.

  • wait_until_complete (bool)

    If true, block until data has been ingested

  • file_name (str | None)

    Upload filename for the generated CSV. An existing extension is preserved; otherwise .csv.gz is appended. If not provided, defaults to using the dataset’s name

  • tag_columns (Mapping[str, str] | None)

    Mapping of column names => tag keys to use for their respective rows.

  • tags (Mapping[str, str] | None)

    Mapping of key-value pairs to apply uniformly as tags to all data within the dataframe.

Return type:

DatasetFile

Channels will be named as f”{group_name}.{channel_name}”, with spaces replaced with underscores.

Note

timestamp_column and timestamp_type must both be provided or excluded together.