Skip to content
Back to skills

Collection

ASecurity

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.

  • 24 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
datapythongobashsqldatabase

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-36825399/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-36825399)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dst-list-tables
description: 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.
---

# DST List Tables Skill

## Purpose

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.

## When to Use

- User asks "what data do we have?"
- Starting an analysis session
- Checking if specific data exists locally
- Exploring available tables
- Before deciding what to analyze
- Verifying data was stored successfully after fetch

## How to Use

### List All Tables

Show all tables stored locally:
```bash
python scripts/db/query_metadata.py --list-all
```

### Get Specific Table Metadata

Get detailed metadata for one table:
```bash
python scripts/db/query_metadata.py --table-id <TABLE_ID>
```

### JSON Output

Get machine-readable output:
```bash
python scripts/db/query_metadata.py --list-all --format json
```

## Expected Output

### List All Tables Format

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
================================================================================
```

### Metadata Fields

For each table, you'll see:
- **table_id**: Unique identifier (use in queries as `dst_{id}`)
- **table_name**: Human-readable description
- **record_count**: Number of rows in the table
- **last_updated**: When DST last updated the source data
- **fetch_timestamp**: When we downloaded it
- **age**: How old our local copy is (human-readable)

### Example Metadata Output

```
======================================================================
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
======================================================================
```

## Interpreting Results

### Table ID
- Use this for all queries
- Format in DuckDB: `dst_{table_id}` (lowercase)
- Example: FOLK1A → query as `dst_folk1a`

### Record Count
- Indicates dataset size
- Larger counts mean more data to analyze
- Compare with expected size to verify completeness

### Fetch Timestamp
- When data was downloaded from DST
- Indicates freshness of local copy
- Compare with last_updated to see if source changed

### Age
- Human-readable freshness indicator
- "5 days ago" means data is 5 days old locally
- Consider refreshing if too old for your needs

## Next Steps

### If Data Exists
Use query and analysis skills:
```bash
# 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"
```

### If Data Missing
Switch to Fetcher Agent to download:
```bash
python scripts/fetch_and_store.py --table-id <TABLE_ID>
```

### If Data Stale
Use **dst-check-freshness** skill to determine if refresh needed:
```bash
python scripts/db/query_metadata.py --table-id <TABLE_ID> --check-freshness --max-age-days 30
```

## Examples

### Example 1: List all stored tables
```bash
python scripts/db/query_metadata.py --list-all
```

### Example 2: Get specific table metadata
```bash
python scripts/db/query_metadata.py --table-id FOLK1A
```

### Example 3: JSON output for programmatic use
```bash
python scripts/db/query_metadata.py --list-all --format json
```

### Example 4: Check multiple tables
```bash
# 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
```

## Tips

### At Session Start
- **Always run --list-all first** to see what you have to work with
- Note table IDs for tables you want to analyze
- Check ages to identify stale data

### Data Quality
- Verify record counts seem reasonable
- Check fetch timestamps for freshness
- Compare last_updated vs fetch_timestamp

### Table Naming
- Remember: table IDs become `dst_{id}` in lowercase
- FOLK1A → dst_folk1a
- AUP01 → dst_aup01

### Empty Database
If no tables shown:
1. Verify database file exists
2. Use Fetcher Agent to download data
3. Check fetch operations completed successfully

## Common Workflows

### Workflow 1: Start Analysis
```bash
# 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
```

### Workflow 2: Verify After Fetch
```bash
# 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
```

## Troubleshooting

### "No tables found"
- Database may be empty
- Verify database file exists at path in .env
- Use Fetcher Agent to download data

### "Table not found"
- Check spelling of table ID (case-sensitive)
- Run --list-all to see what exists
- Table may not have been fetched yet

### Unexpected Record Counts
- May indicate partial fetch
- Check fetch logs for errors
- Consider re-fetching with --overwrite

### Old Fetch Timestamps
- Data may be stale
- Use dst-check-freshness to evaluate
- Consider refreshing with Fetcher Agent

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.