diff --git a/.github/workflows/sdk_protos_map.csv b/.github/workflows/sdk_protos_map.csv index 730eb6739e..20f6857c1f 100644 --- a/.github/workflows/sdk_protos_map.csv +++ b/.github/workflows/sdk_protos_map.csv @@ -380,6 +380,7 @@ billing,GetInvoicePdf,,get_invoice_pdf,, ## Data data,GetLatestTabularData,,get_latest_tabular_data,, +data,ExportTabularData,,export_tabular_data,, data,TabularDataByFilter,,tabular_data_by_filter,, data,TabularDataBySQL,,tabular_data_by_sql,, data,TabularDataByMQL,,tabular_data_by_mql,, diff --git a/static/include/app/apis/generated/data-table.md b/static/include/app/apis/generated/data-table.md index fe0ec702f2..4d8878ee9d 100644 --- a/static/include/app/apis/generated/data-table.md +++ b/static/include/app/apis/generated/data-table.md @@ -2,6 +2,7 @@ | Method Name | Description | | ----------- | ----------- | | [`GetLatestTabularData`](/dev/reference/apis/data-client/#getlatesttabulardata) | Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year. | +| [`ExportTabularData`](/dev/reference/apis/data-client/#exporttabulardata) | Obtain unified tabular data and metadata from the specified data source. | | [`TabularDataByFilter`](/dev/reference/apis/data-client/#tabulardatabyfilter) | Retrieve optionally filtered tabular data from the Viam app. | | [`TabularDataBySQL`](/dev/reference/apis/data-client/#tabulardatabysql) | Obtain unified tabular data and metadata, queried with SQL. | | [`TabularDataByMQL`](/dev/reference/apis/data-client/#tabulardatabymql) | Obtain unified tabular data and metadata, queried with MQL. | diff --git a/static/include/app/apis/generated/data.md b/static/include/app/apis/generated/data.md index 18c57c0cfc..3b482fe204 100644 --- a/static/include/app/apis/generated/data.md +++ b/static/include/app/apis/generated/data.md @@ -40,6 +40,46 @@ For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/ {{% /tab %}} {{< /tabs >}} +### ExportTabularData + +Obtain unified tabular data and metadata from the specified data source. + +{{< tabs >}} +{{% tab name="Python" %}} + +**Parameters:** + +- `part_id` ([str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The ID of the part that owns the data. +- `resource_name` ([str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The name of the requested resource that captured the data. +- `resource_subtype` ([str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The subtype of the requested resource that captured the data. +- `method_name` ([str](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)) (required): The data capture method name. +- `start_time` ([datetime.datetime](https://docs.python.org/3/library/datetime.html)) (optional): Optional start time for requesting a specific range of data. +- `end_time` ([datetime.datetime](https://docs.python.org/3/library/datetime.html)) (optional): Optional end time for requesting a specific range of data. + +**Returns:** + +- ([List[TabularDataPoint]](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.TabularDataPoint)): The unified tabular data and metadata. + +**Example:** + +```python {class="line-numbers linkable-line-numbers"} +tabular_data = await data_client.export_tabular_data( + part_id="", + resource_name="", + resource_subtype="", + method_name="", + start_time="" + end_time="" +) + +print(f"My data: {tabular_data}") +``` + +For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/app/data_client/index.html#viam.app.data_client.DataClient.export_tabular_data). + +{{% /tab %}} +{{< /tabs >}} + ### TabularDataByFilter Retrieve optionally filtered tabular data from the [Viam app](https://app.viam.com). diff --git a/static/include/app/apis/overrides/protos/data.ExportTabularData.md b/static/include/app/apis/overrides/protos/data.ExportTabularData.md new file mode 100644 index 0000000000..5f91cd5c52 --- /dev/null +++ b/static/include/app/apis/overrides/protos/data.ExportTabularData.md @@ -0,0 +1 @@ +Obtain unified tabular data and metadata from the specified data source.