Skip to contents

Generates DIL-backed synthetic BLADE tables from the business source-of-truth spine. The business spine is created first if it is not already present in the active run directory. Generated tables follow the April 2026 BLADE DIL schemas and derive generic time fields from each table's public available periods. The optional Appendix key products are the public BLADE correspondences; _system/plida-blade-link.parquet is a local fplida linkage artifact for person-to-business training examples.

Usage

generate_blade(
  business_spine = NULL,
  spine = NULL,
  seed = 42L,
  tables = "all",
  n_businesses = NULL,
  output_dir = NULL,
  format = c("parquet", "csv"),
  return_data = FALSE,
  sample_rate = 1,
  max_rows = 10000L,
  include_keys = TRUE,
  years = NULL
)

Arguments

business_spine

Data.frame or NULL. If NULL, uses the existing _system/business-spine.parquet or creates one from the person spine.

spine

Optional person spine used when the business spine must be created.

seed

Integer. Random seed.

tables

"all" or a vector of BLADE table numbers, table names, or generated product names.

n_businesses

Optional business universe size when the business spine must be created.

output_dir

Character or NULL. Base output directory.

format

Character. Currently parquet only.

return_data

Logical. If TRUE, returns generated data.frames.

sample_rate

Numeric row sampling rate applied to BLADE survey tables. Administrative/key tables are generated for the full business spine so every bn is present in administrative BLADE records.

max_rows

Integer maximum rows per emitted BLADE survey table. Administrative/key tables ignore this cap.

include_keys

Logical. If TRUE, writes BLADE Appendix 1 and Appendix 2 key products for bn/id/bg_id and cn/bn correspondences.

years

Integer vector or NULL. Retain reporting periods with these ending years. NULL retains each table's full supported range.

Value

If return_data = TRUE, a named list of data.frames keyed by BLADE product name. Otherwise an invisible metadata list.

Dataset and variable information

The ABS BLADE overview gives information about this dataset. Use dataset_info("BLADE") for dataset information. Use variable_info("BLADE") for variables, sources, value support, and topic tags.