Skip to main content

Extract field-level metadata from any Looker instance via the API

Project description

looker-fields

Extract field-level metadata from any Looker instance via the API.

Produces an accurate, de-duplicated inventory of every field (dimensions, measures, dimension_groups, filters, parameters) across all models, explores, and views — with correct model attribution.

Why

Parsing raw .lkml files cannot resolve include statements, leading to model misattribution and Cartesian duplication. This tool extracts the compiled truth directly from the Looker API — the final state after Looker's engine has resolved all includes, extensions, and refinements.

Install

pip install -e ".[dev]"

Setup

Create a .env file:

LOOKER_BASE_URL=https://your-instance.cloud.looker.com
LOOKER_CLIENT_ID=your_client_id
LOOKER_CLIENT_SECRET=your_client_secret

Usage

# Extract all fields (JSONL output)
looker-fields extract

# Extract as CSV
looker-fields extract --format csv --output fields.csv

# Extract specific model
looker-fields extract --model my_model

# Verify extraction against live API
looker-fields verify my_model my_explore

# Show instance info
looker-fields info

Output

Each row represents one field with grain (project, model, explore, field_name).

Supported formats: JSONL (default), CSV, Parquet, BigQuery.

See docs/FIELD_SPEC.md for the full output schema.

Architecture

src/looker_fields/
├── cli.py       # typer CLI
├── config.py    # .env + Settings
├── client.py    # Async httpx client
├── schema.py    # Output models + Swagger discovery
├── extract.py   # Core extraction logic
└── output.py    # Multi-sink writers

See gsd-lite/ARCHITECTURE.md for design decisions.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

looker_fields-0.1.1.tar.gz (262.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

looker_fields-0.1.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file looker_fields-0.1.1.tar.gz.

File metadata

  • Download URL: looker_fields-0.1.1.tar.gz
  • Upload date:
  • Size: 262.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for looker_fields-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0aa8c002b064133a677e6c566792282709e96dbafc3ab1d67b909c11d61b7453
MD5 21db75e7a9b194f1f0e83e4dcda35e21
BLAKE2b-256 d7b354f7faaf5ca42fbfc2ac75ca7e76da07500c595e6f2c50232461cdbb2ce3

See more details on using hashes here.

Provenance

The following attestation bundles were made for looker_fields-0.1.1.tar.gz:

Publisher: release.yaml on luutuankiet/looker-fields-extraction

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file looker_fields-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: looker_fields-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for looker_fields-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5966891af88852eb045f631c367e4969bd69a853a9559cd3b48aa711623a003d
MD5 617562e96b40b649081544d8dc03f0c2
BLAKE2b-256 770f56d6a11066e4b7f391d0714e4fcba977a3cc952252c37c3cacfee4b69f43

See more details on using hashes here.

Provenance

The following attestation bundles were made for looker_fields-0.1.1-py3-none-any.whl:

Publisher: release.yaml on luutuankiet/looker-fields-extraction

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page