# 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*](https://dev.nominal.io/python/ref/generated/nominal.core.Dataset.md#nominal.core.Dataset "nominal.core.dataset.Dataset"))

      Dataset to upload the dataframe to
    - **file** ([*Path*](https://docs.python.org/3/library/pathlib.html#pathlib.Path "(in Python v3.15)") *|* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)"))

      Path to the TDMS file to parse and upload
    - **timestamp_column** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *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*](https://dev.nominal.io/python/ref/generated/nominal.ts.Iso8601.md#nominal.ts.Iso8601 "nominal.ts.Iso8601") *|* [*Epoch*](https://dev.nominal.io/python/ref/generated/nominal.ts.Epoch.md#nominal.ts.Epoch "nominal.ts.Epoch") *|* [*Relative*](https://dev.nominal.io/python/ref/generated/nominal.ts.Relative.md#nominal.ts.Relative "nominal.ts.Relative") *|* [*Custom*](https://dev.nominal.io/python/ref/generated/nominal.ts.Custom.md#nominal.ts.Custom "nominal.ts.Custom") *|* [*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal "(in Python v3.15)")*[**'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*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)"))

      If true, block until data has been ingested
    - **file_name** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *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*](https://docs.python.org/3/library/typing.html#typing.Mapping "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]* *|* *None*)

      Mapping of column names => tag keys to use for their respective rows.
    - **tags** ([*Mapping*](https://docs.python.org/3/library/typing.html#typing.Mapping "(in Python v3.15)")*[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*,* [*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")*]* *|* *None*)

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

Return type:
:   [*DatasetFile*](https://dev.nominal.io/python/ref/generated/nominal.core.DatasetFile.md#nominal.core.DatasetFile "nominal.core.dataset_file.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.
