Skip to content

Commit f47d2cb

Browse files
committed
Document the datasources.update_hyper_data method
1 parent 147d585 commit f47d2cb

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

docs/api-ref.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,44 @@ An updated `ConnectionItem` for the data source.
748748
See the `update_connection.py` sample in the Samples directory.
749749

750750

751+
<br>
752+
<br>
753+
754+
#### datasource.update_hyper_data
755+
756+
```py
757+
datasource.update_hyper_data(datasource_or_connection_item, *, request_id, actions, payload=None)
758+
```
759+
760+
Updates the data contained within a published live-to-Hyper datasource.
761+
762+
REST API: [Update Data in Hyper Data Source](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#update_data_in_hyper_data_source)
763+
764+
**Version**
765+
766+
This endpoint is available with REST API version 3.13 and up.
767+
768+
**Parameters**
769+
770+
Name | Description
771+
:--- | : ---
772+
`datasource_or_connection_item` | Either a `DataSourceItem` or a `ConnectionItem`. If the datasource only contains a single connection, the `DataSourceItem` is sufficient to identify which data should be updated. Otherwise, for datasources with multiple connections, a `ConnectionItem` must be provided.
773+
`request_id` | User supplied arbitrary string to identify the request. A request identified with the same key will only be executed once, even if additional requests using the key are made, for instance, due to retries when facing network issues.
774+
`actions` | a list of actions (insert, update, delete, ...) specifying how to modify the data within the published datasource
775+
`payload` | an (optional) Hyper file containing tuples to be inserted/deleted or other payload data used by the `actions`.
776+
777+
For more information on the `actions`, see the [REST API docs on "Action batch description"](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_how_to_update_data_to_hyper.htm#action-batch-descriptions).
778+
To create a `payload` Hyper file, you can use [Hyper API](https://help.tableau.com/current/api/hyper_api/en-us/index.html) or [pantab](https://github.com/innobi/pantab).
779+
780+
**Returns**
781+
782+
A `JobItem` for the update job on the server. Upon completion of this job, the data was updated.
783+
784+
**Example**
785+
786+
See the `update_datasource_data.py` sample in the Samples directory.
787+
788+
751789
<br>
752790
<br>
753791

docs/samples.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ The following list describes the samples available in the repository:
5959
* `set_http_options.py` Demonstrates HTTP options for the server and specifically for downloading workbooks.
6060
* `set_refresh_schedule.py` Sets the schedule to refresh a workbook or datasource.
6161
* `update_connection.py` Updates and embeds connection credentials of a datasource.
62+
* `update_datasource_data.py` Updates the data within a published live-to-Hyper datasource.
6263

6364
**Note**: For all of the samples, ensure that your Tableau Server user account has permission to access the resources. Also keep in mind that some example operations (like create group) are not allowed on Tableau Online.

0 commit comments

Comments
 (0)