Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Connect Local Filesystem

Connect Horizon Epoch to local filesystem storage for Delta Lake tables.

CLI Configuration

# Add local filesystem storage backend
epoch storage add local \
    --type local \
    --path "/data/horizon-epoch"

Use Cases

Development and Testing

Local storage is ideal for development:

epoch storage add dev \
    --type local \
    --path "./data"

epoch init my-repo --storage dev

Single-Machine Deployments

For applications that don’t need distributed storage:

epoch storage add data \
    --type local \
    --path "/var/lib/horizon-epoch"

Air-Gapped Environments

For environments without cloud access:

epoch storage add offline \
    --type local \
    --path "/mnt/data/epoch"

Register Delta Tables

epoch table add events \
    --location "local://local/events"

Table Storage Structure

Tables are stored as Delta Lake format:

/data/horizon-epoch/
  events/
    _delta_log/
      00000000000000000000.json
    part-00000-*.parquet
    part-00001-*.parquet
  users/
    _delta_log/
    part-00000-*.parquet

Configuration File

# ~/.epoch/config.toml
[storage.local.dev]
path = "/data/horizon-epoch"

Features

  • Delta Lake format - Same format as S3/Azure/GCS
  • SQL queries - Query via DataFusion
  • Copy-on-write - Efficient branching
  • Time travel - Access historical versions

Permissions

Ensure the Epoch process has read/write access:

# Create directory with proper permissions
mkdir -p /data/horizon-epoch
chown -R epoch:epoch /data/horizon-epoch
chmod 750 /data/horizon-epoch

Troubleshooting

Permission Denied

  • Check directory exists and is writable
  • Verify process user has access

Disk Full

  • Monitor disk space
  • Use epoch gc to clean up old versions
  • Configure retention policies

Path Not Found

  • Ensure parent directory exists
  • Use absolute paths to avoid ambiguity