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.3.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.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tj_data_normalizer-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 770956b564efdc0bd7586c6e64cce31cbde99cc93d06e93c75c291379b17320e
MD5 6699c3757ff8c76a870b0d80dea1a694
BLAKE2b-256 b652061ec896d1b54fc35f4d773472d917b40283ca3bb4d85a9d5b29c00f0814

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tj_data_normalizer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 610b9053eb2f5a4eb34d2a184f2c5c53696638959085addb9b2bb0db36551bd2
MD5 bc3e2351bfd4f9b42d1a2c5c5dbe54c2
BLAKE2b-256 4ab7a5b025d41c9cceaf0ec8c81715e080572601441142ec2acf526db138db80

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