Skip to main content

CLI tool to normalize tabular data and generate schemas

Project description

Data Normalizer

Data Normalizer is a Python CLI tool for cleaning and normalizing tabular data from CSV or Excel files.

It profiles columns, infers data types, normalizes values (including mixed date formats), and generates:

  • Cleaned CSV output
  • JSON records
  • SQL CREATE TABLE schemas
  • JSON Schema definitions
  • A lightweight profiling report

The tool is designed to be deterministic, scriptable, and easy to integrate into data pipelines.

Usage

Run the CLI on a CSV or Excel file:

data-normalizer path/to/file.csv [OPTIONS]

output/<input_name>OUT_<YYYY-MM-DD>/

If `--out` is provided, outputs are written to:

output/<out>/<input_name>OUT_<YYYY-MM-DD>/

Each run folder contains:
- Normalized CSV data
- JSON records
- SQL schema
- JSON schema
- Profiling report

## Why this project exists

Real-world tabular data is often messy, inconsistent, and hard to load directly into databases.
This tool provides a repeatable way to normalize datasets and generate reliable schemas before ingestion.

### CLI Options

input_path  
Path to the input `.csv` or `.xlsx/.xls` file.

--sheet  
Excel sheet name or index (only for Excel files).  
Examples: Sheet1, 0

--preview-rows  
Number of rows to preview in the terminal (0–50).  
Default: 5

--table  
SQL table name used in the generated CREATE TABLE statement.  
Default: normalized_data

--show-schema / --no-show-schema  
Print generated SQL and JSON schemas to the terminal.  
Default: disabled

--export  
Write output files to disk.  
If not provided, no files are written.

--out  
Subfolder inside `./output` used to group runs.  
Example: results  
Outputs will be written to:  
output/results/<input_name>OUT_<YYYY-MM-DD>/

--overwrite / --no-overwrite  
Control whether existing run folders can be reused.  
Default: overwrite enabled

### Overwrite behavior

By default, outputs overwrite files in the run folder if it already exists.  
Use --no-overwrite to prevent replacing existing results.  
If the output folder already exists and overwrite is disabled, the command exits with an error.

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

tj_data_normalizer-0.1.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

tj_data_normalizer-0.1.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file tj_data_normalizer-0.1.4.tar.gz.

File metadata

  • Download URL: tj_data_normalizer-0.1.4.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tj_data_normalizer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7ad1a3c8b9f6dd55bbdb6d0fa21595bd83770d1313e1cc363d09d3e4ac20faf9
MD5 c87f6680e6cb8d87ca7513259a9dcb0d
BLAKE2b-256 39566420ddbe20c65374437e1901d849ca0989cfd94b7512eb040aa4baaf4faf

See more details on using hashes here.

File details

Details for the file tj_data_normalizer-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for tj_data_normalizer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4816c87c8b6875414776ab9d958951344f60ae9e188e3d2ac0165063d09c32
MD5 2acae1ac90b416e480c15df37f1f206a
BLAKE2b-256 b484cbf992d8364dcea30c5f7663e3b825f92b5486b31e52469511f065100041

See more details on using hashes here.

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