DataAtlas: Automatic Generation of Data Dictionaries
DataAtlas is a Python package to automatically generate structured data dictionaries and schema insights from tabular datasets using large language models (LLMs).
It supports CSV, Excel, and JSON datasets, and produces rich metadata including column descriptions, table summaries, and inferred relationships.
Features
Metadata Generation
- Column Descriptions: AI-generated semantic meaning for each field
- Table Summaries: Context-aware descriptions of each table
- Smart Sampling: Automatic data type detection with representative values
- Pattern Recognition: Identification of IDs, timestamps, clinical codes, etc.
Relationship Inference
- Automatic detection of relationships across tables
- Cardinality estimation (1:1, 1:N, N:M)
- Deduplication of redundant relationships
- PostgreSQL schema generation
Multi-format Outputs
dictionary.json→ full structured metadatadictionary_summary.md→ human-readable documentationschema.json→ structured relationshipsschema.sql→ PostgreSQL schema
Flexible LLM Support
Supports multiple backends through a unified interface:
- OpenAI models (e.g., GPT-4o, GPT-4o-mini)
- Google Gemini models
- Local models via Ollama (recommended for privacy)
Installation
pip install data-atlas
LLM Setup (Important)
Option 1 — Local models (recommended)
Install :
# install ollama (see official website)
ollama pull llama3.1
Option 2 — API-based models
Set your API keys for:
- OpenAI
- Google Gemini
Usage
Command Line (main usage)
After installation, a command is automatically available:
generate-dictionary <folder_path> --output-dir <output_dir>
Example
generate-dictionary data/MIMIC --output-dir output --model llama3.1
Parameters
<folder_path>: Folder containing dataset files (CSV, Excel, JSON)--output-dir: Output directory--model: LLM model (default:llama3.1)--domain: Optional domain (e.g.,clinical)--no-schema: Disable relationship inference
Alternative Execution (if CLI not found)
If generate-dictionary is not recognized, run:
python -m data_dictionary_generator.generate_dictionary <folder_path> --output-dir <output_dir>
This avoids PATH issues.
Output Structure
After execution, the output directory will contain:
Data Dictionary
dictionary.jsondictionary_summary.md
Relationships
schema.json
Schema
schema.sql
Example Output
Table-level
- Table name
- Number of rows
- Table description
Column-level
- Column name
- Data type
- Sample values
- AI-generated description
- Null percentage
Relationships
- Source and target columns
- Relationship type (1:1, 1:N, N:M)
- PostgreSQL schema
Visualization
To visualize schema diagrams:
- Open https://dbdiagram.io/
- Import the PostgreSQL schema
- Export as PNG or SVG
Design Principles
- Augmentation, not replacement: supports expert workflows
- Scalable: handles large datasets via sampling
- Portable: no heavy system dependencies
- Privacy-aware: supports fully local execution
Troubleshooting
1. Command not found
If this fails:
generate-dictionary
Try:
python -m data_dictionary_generator.generate_dictionary ...
Or ensure your Python Scripts/ folder is in PATH.
2. Model errors
Ollama
ollama pull llama3.1
API models
Ensure API keys are set correctly.
3. Missing dependencies
Reinstall:
pip install --upgrade data-atlas
Contributing
- Fork the repository
- Create a branch
- Commit changes
- Push
- Open a pull request
License
MIT License — see LICENSE file.
Author
Raffaele Giancotti
Metadata
Release files for data-atlas 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| data_atlas-0.1.3.tar.gz | 21.4 kB | Without provenance | Details for data_atlas-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| data_atlas-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for data_atlas-0.1.3-py3-none-any.whl |
Total release size: 46.2 kB
Release files / data_atlas-0.1.3.tar.gz
| Download URL | data_atlas-0.1.3.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ab24bc3429b7b57a48c561bc51c8d779747319358a60aefd668f2200342d556
|
|
BLAKE2b-256 checksum How to use checksums |
ec21a55231db4dda1c3b43ca8dbef145be6f68b76219abdc03e7c155a5a423f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / data_atlas-0.1.3-py3-none-any.whl
| Download URL | data_atlas-0.1.3-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d845db03cdf4eb4c6e375dafce377baa14a37c3eae64faa6de862567de023f16
|
|
BLAKE2b-256 checksum How to use checksums |
9e15b487e1ebc62a509c2ef56e2cc6a5d7ee58c65843bd48fde9a5693a9f3369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for data-atlas 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.