bfs_get_table_metadata
Retrieve BFS table metadata including title, source, and all dimension variables with their codes and value labels—essential for building accurate data query filters before fetching data."
Instructions
Get metadata for a BFS table: title, variables, and available filter values.
Essential step before calling bfs_get_data. Returns all dimension variables with their codes and value labels needed to construct data queries.
Args: params (GetTableMetadataInput): - table_id (str): BFS table ID, e.g. 'px-x-1504000000_173' - lang (str): Language for labels
Returns: str: JSON with table title, source, update date, and all variables with their codes and value options. Use variable codes in bfs_get_data filters.
Example output structure: { "title": "Lehrkräfte nach Schuljahr, Kanton...", "variables": [ { "code": "Schuljahr", "label": "Schuljahr", "n_values": 14, "values": [{"code": "0", "label": "2010/11"}, ...] } ] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | ||
| error | No | ||
| title | No | ||
| source | No | ||
| language | No | ||
| table_id | No | ||
| variables | No | ||
| theme_code | No | ||
| theme_name | No | ||
| usage_hint | No | ||
| n_variables | No | ||
| last_updated | No |