bfs_get_table_metadata
Retrieve a BFS table's metadata: title, variables, and filter values. Use variable codes from the response to build data queries.
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 |
|---|---|---|---|
| error | No | ||
| hint | No | ||
| table_id | No | ||
| title | No | ||
| source | No | ||
| last_updated | No | ||
| theme_code | No | ||
| theme_name | No | ||
| language | No | ||
| n_variables | No | ||
| variables | No | ||
| usage_hint | No |