# Query View Data

> `UiPath.Tableau.Activities.QueryViewData`

`UiPath.Tableau.Activities.QueryViewData`

Uses the Tableau [API](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#query_view_data) to get View data rendered as a CSV and download it to a folder you choose and/or retain the data in an in memory `DataTable` (**View Data**) variable.

## How it works

The following steps are an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

1. Complete the [Setup](https://docs.uipath.com/activities/other/latest/legacy-integrations/tableau-setup) steps.
2. Add the [Tableau Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/tableau-scope) activity to your project.
3. Add the **Query View Data** activity inside the **Tableau Scope** activity.
4. Create and enter values for the [Input](https://docs.uipath.com/activities/other/latest/legacy-integrations/tableau-query-view-data#query-view-data) properties.
5. Enter values for the [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/tableau-query-view-data#query-view-data) properties.
6. Create and enter an `ResponseStatus` variable for the [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/tableau-query-view-data#query-view-data) property.

## In the body of the activity

* **Site ID** - The ID of the site that contains the view. Enter a string or `String` variable or click the **Find** button to display the **Find site** window, where you can see all the site IDs found on the Tableau instance.
  1. Select a site ID and click **Done**. The **Site ID** property is automatically populated with the selected value.
  2. Copy the Site ID string, to use it in the **View ID** property.
* **View ID** - The ID of the view to render as data. Enter a string or `String` variable or click the **Find** button to display the **Find View** window.
  1. Paste the Site ID in the **Site ID** search field and click **Find**, to identify your View ID.
  2. Select your view and click **Done**. The **View ID** property is automatically populated with the correct value.
* **Folder Path** - The folder to download the report to. Enter a string or `String` variable.
* **File Name** - The filename you wish to use. Enter a string or `String` variable.
* **Filter Value** - The value of the field that you want to use to filter the workbook view. Enter a string or `String` variable. Format: `vf_<fieldname>=filter-value`. For example, a workbook with the filter `vf_year=2017` would only display data from the year 2017.
* **Max Age Minutes** - The maximum number of minutes view data will be cached before being refreshed. Enter a string or `String` variable. To prevent multiple view data requests from overloading the server, the shortest interval you can set is one minute. There is no maximum value.
* **View Data** - The view data of the report. Enter a `DataTable` variable.

## Properties

### Common

* **DisplayName** - The display name of the activity. This field supports only strings or `String` variables.

### Input

* **Client Timeout** - Defines the client read timeout in seconds. Default value is `100`.

### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

### Output

* **ResponseStatus** - The status of the request (success/failure information). This field supports only `ResponseStatus` variables.
