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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tj_data_normalizer-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d7607cbcab1ba3d066206d2db4fd4f347fdc57cb77282fe5ee598e80ace87ee8
MD5 80e20cb02dd875a7f488bee4449bc4db
BLAKE2b-256 27d5c2c8c5530c45df2b031dd4bf7d9c43f6542ce8af88a2cee1bb325319aca3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tj_data_normalizer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6105eabd7494bc6c4a969d4f29a760520920342c015d90c2679c1eeac9910ed6
MD5 79425b19a80ae0394e7a7334c9cbe9bf
BLAKE2b-256 b84f79dca1cfc6c9ff6a5ac4bf1201f6d7c677a6a128edd4ae5212c150b8e47f

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