View source: R/download_tableau_data.R
download_tableau_data | R Documentation |
Downloads the data from a Tableau view in Excel format.
download_tableau_data(
tableau,
view_id,
path_to_save,
api_version = 3.8,
filters = NULL,
max_age = NULL
)
tableau |
A list containing the Tableau authentication variables: 'base_url', 'token', 'user_id', and 'site_id'. |
view_id |
The ID of the view to download. |
path_to_save |
The directory to write the data Excel file to. |
api_version |
The API version to use (default: 3.8). |
filters |
A named list of filters to apply to the view data. The names should be the field names, and the values should be the filter values. |
max_age |
The maximum number of minutes view data will be cached before being refreshed (optional). |
This function uses the Tableau REST API to download data from a specified view in Excel format. It constructs the appropriate URL, applies any specified filters, and saves the data to the specified path.
For more information on the Tableau REST API, see the official documentation for this method: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#query_view_data
Other Tableau REST API:
add_tags_to_view()
,
add_tags_to_workbook()
,
add_user_to_group()
,
add_user_to_site()
,
authenticate_PAT()
,
authenticate_server()
,
create_group()
,
delete_group()
,
download_datasource()
,
download_filtered_tableau_image()
,
download_tableau_crosstab_excel()
,
download_workbooks_server()
,
download_workbooks_server_pdf()
,
download_workbooks_server_powerpoint()
,
get_groups_for_user()
,
get_mobile_security_settings()
,
get_server_connected_apps()
,
get_server_datasources()
,
get_server_groups()
,
get_server_info()
,
get_server_jobs()
,
get_server_projects()
,
get_server_refresh_tasks()
,
get_server_schedules()
,
get_server_user_favorites()
,
get_server_users()
,
get_server_views()
,
get_server_workbooks()
,
get_table_assets()
,
get_users_in_group()
,
query_user_on_site()
,
remove_user_from_group()
,
remove_user_from_site()
,
run_extract_refresh_task()
,
update_data_source_now()
,
update_group()
,
update_user()
,
update_workbook_now()
## Not run:
tableau <- list(
base_url = "https://your-tableau-server.com/",
token = "your-auth-token",
user_id = "your-user-id",
site_id = "your-site-id"
)
view_id <- "your-view-id"
path_to_save <- "path/to/save/"
filters <- list("Region" = "North America", "Category" = "Technology")
max_age <- 10
download_tableau_data(tableau, view_id, path_to_save, filters = filters, max_age = max_age)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.