upload_tdms_to_dataset#

nominal.tdms.upload_tdms_to_dataset(dataset: Dataset, file: Path | str, timestamp_column: str | None = None, 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 = None, *, wait_until_complete: bool = True, file_name: str | None = None, tag_columns: Mapping[str, str] | None = None, tags: Mapping[str, str] | None = None) → DatasetFile#

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

Parameters:
  • dataset – Dataset to upload the dataframe to

  • file – Path to the TDMS file to parse and upload

  • timestamp_column – 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 – Type of timestamp, e.g., epoch_seconds, iso8601, etc.

  • wait_until_complete – If true, block until data has been ingested

  • file_name – 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 of column names => tag keys to use for their respective rows.

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

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.