List all Danmarks Statistik tables currently stored in DuckDB with metadata. Use when user wants to know what data is available locally or explore stored tables.
Discover what DST data is currently stored in the local DuckDB database. This is typically the first step in any analysis workflow - finding out what data you have to work with.
Show all tables stored locally:
python scripts/db/query_metadata.py --list-all
Get detailed metadata for one table:
python scripts/db/query_metadata.py --table-id <TABLE_ID>
Get machine-readable output:
python scripts/db/query_metadata.py --list-all --format json
Console-friendly table view:
================================================================================
DST TABLES IN LOCAL DATABASE
================================================================================
Found 3 table(s):
ID Name Records Age
--------------------------------------------------------------------------------
FOLK1A Population at first day 45231 5 days ago
AUP01 Employment statistics 12450 2 weeks ago
NABB3 Business statistics 8900 1 month ago
================================================================================
For each table, you'll see:
dst_{id})======================================================================
METADATA FOR TABLE: FOLK1A
======================================================================
Table ID: FOLK1A
Table Name: Population at the first day of the quarter
Record Count: 45231
Last Updated: 2025-10-15T10:30:00
Fetch Timestamp: 2025-10-25T09:15:00
Data Age: 5 days ago
======================================================================
dst_{table_id} (lowercase)dst_folk1aUse query and analysis skills:
# Get table summary
python scripts/db/table_summary.py --table-id <TABLE_ID>
# Run SQL query
python scripts/db/query_data.py --sql "SELECT * FROM dst_<table_id> LIMIT 10"
Switch to Fetcher Agent to download:
python scripts/fetch_and_store.py --table-id <TABLE_ID>
Use dst-check-freshness skill to determine if refresh needed:
python scripts/db/query_metadata.py --table-id <TABLE_ID> --check-freshness --max-age-days 30
python scripts/db/query_metadata.py --list-all
python scripts/db/query_metadata.py --table-id FOLK1A
python scripts/db/query_metadata.py --list-all --format json
# List all
python scripts/db/query_metadata.py --list-all
# Get details for each interesting table
python scripts/db/query_metadata.py --table-id FOLK1A
python scripts/db/query_metadata.py --table-id AUP01
dst_{id} in lowercaseIf no tables shown:
# 1. See what's available
python scripts/db/query_metadata.py --list-all
# 2. Get details on interesting table
python scripts/db/query_metadata.py --table-id FOLK1A
# 3. Check data age
python scripts/db/query_metadata.py --table-id FOLK1A --check-freshness
# 4. Proceed with analysis
python scripts/db/table_summary.py --table-id FOLK1A
# 1. Fetch data
python scripts/fetch_and_store.py --table-id FOLK1A
# 2. Verify it's there
python scripts/db/query_metadata.py --table-id FOLK1A
# 3. Check record count is reasonable