tableau_datasources.Rd
For advanced use only; most shinytableau extensions should use the
choose_data()
module to allow the user to specify a data source.
tableau_datasources(session = shiny::getDefaultReactiveDomain())
tableau_datasource_info(id, session = shiny::getDefaultReactiveDomain())
session | The Shiny |
---|---|
id | A data source ID, as returned by |
tableau_datasources()
returns a character vector whose elements are
data source IDs.
tableau_datasource_info()
returns the metadata and schema for a specific
data source. Note that an extension instance can only access data sources
that are actually used by worksheets in the same dashboard. The return
value is a named list that contains the following fields:
id
- Unique ID for this data source.
fields
- data frame where each row is one of the fields in the data source, and these columns:
aggregation
- character - The type of aggregation used for this field. Possible values listed here, e.g. "attr"
, "avg"
, "count"
, ...
id
- character - The field id.
name
- character - The caption for this field.
description
- character - User description of the field, or ""
if there is none.
role
- character - "dimension"
, "measure"
, or "unknown"
.
isCalculatedField
- logical - Whether the field is a table calculation.
isCombinedField
- logical - Whether the field is a combination of multiple fields.
isGenerated
- logical - Whether this field is generated by Tableau. Tableau generates a number of fields for a data source, such as Number of Records, or Measure Values. This property can be used to distinguish between those fields and fields that come from the underlying data connection, or were created by a user.
isHidden
- logical - Whether this field is hidden.
isExtract
- TRUE
if this data source is an extract, FALSE
otherwise.
name
- The user friendly name of the data source as seen in the UI.
extractUpdateTime
- A POSIXlt indicating the time of extract, or NULL
if the data source is live.
logicalTables
- An unnamed list; each element is a data table schema.