Initialize the parser from a .twb or .twbx path.
Return the TWBX manifest (if available).
Return TWBX extract entries.
Return TWBX image entries.
Extract files from the TWBX to disk.
Validate relationships; optionally stop on failure.
Print a concise summary of parsed content.
Arguments
- path
Path to a
.twbor.twbxfile.- types
Optional vector of types (e.g.,
"image","extract").- pattern
Optional regex to match archive paths.
- files
Optional explicit archive paths to extract.
- exdir
Output directory (defaults to parser's twbx dir or tempdir()).
- error
If
TRUE,stop()when validation fails.
Details
Create a parser for Tableau .twb / .twbx files. On initialization, the
parser reads the XML and precomputes relationships, joins, fields, calculated
fields, inferred relationships, and datasource details. For .twbx, it also
extracts the largest .twb and records a manifest.
Fields
- path
Path to the
.twbor.twbxfile on disk.- xml_doc
Parsed
xml2document of the workbook.- twbx_path
Original
.twbxpath if the workbook was packaged.- twbx_dir
Directory where the
.twbxwas extracted.- twbx_manifest
Tibble of
.twbxcontents fromtwbx_list().- relations
Tibble of
<relation>nodes fromextract_relations().- joins
Tibble of join clauses from
extract_joins().- relationships
Tibble of modern relationships from
extract_relationships().- inferred_relationships
Tibble of inferred relationship pairs by name and role.
- datasource_details
List containing
data_sources,parameters, andall_sources.- fields
Tibble of raw fields with table information.
- calculated_fields
Tibble of calculated fields.
- last_validation
Result from
validate()as list withokandissueselements.
Methods
- new(path)
Create a parser from
.twbor.twbxfile.- get_twbx_manifest()
Return
.twbxmanifest tibble.- get_twbx_extracts()
Return
.twbxextract entries.- get_twbx_images()
Return
.twbximage entries.- extract_twbx_assets(types, pattern, files, exdir)
Extract files from
.twbxarchive.- get_relations()
Return relations tibble.
- get_joins()
Return joins tibble.
- get_relationships()
Return modern relationships tibble.
- get_inferred_relationships()
Return inferred relationship pairs.
- get_datasources()
Return datasource details tibble.
- get_parameters()
Return parameters tibble.
- get_datasources_all()
Return all sources tibble.
- get_fields()
Return raw fields tibble.
- get_calculated_fields(pretty = FALSE, strip_brackets = FALSE, wrap = 100L)
Return calculated fields tibble. When
pretty = TRUE, includes aformula_prettycolumn with line breaks and indentation.- validate(error = FALSE)
Validate relationships. Stops execution if
error = TRUE.- summary()
Print a brief summary to console.
