Metadata-Version: 2.4
Name: tablesqlconverter
Version: 1.3.1
Summary: SQL Dialect conversion tool - flat text / DDL / DataX interconversion
License-Expression: MIT
Project-URL: Home, https://github.com/user/table-sql-converter
Keywords: sql,dialect,converter,datax
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# TableSQLConverter

SQL Dialect conversion tool — convert between flat delimited text, SQL DDL, JSON intermediate form, and DataX configuration.

## Install

```bash
pip install tablesqlconverter
```

## Usage

```bash
# Flat text → JSON intermediate
tablesqlconverter flat2json input.txt --col-db 0 --col-table 1 --col-name 2 --col-type 3

# SQL DDL → JSON intermediate
tablesqlconverter sql2json input.sql

# JSON intermediate → SQL DDL
tablesqlconverter json2sql input.json --dialect mysql

# Convert between SQL dialects (type mapping)
tablesqlconverter convert input.json --source mysql --target hive

# JSON intermediate → DataX config
tablesqlconverter json2datax input.json
```

## API

```python
from tablesqlconverter import FlatTextParser, SqlParser, DdlGenerator, DialectConverter

parser = FlatTextParser(delimiter="\t", data_start_row=1)
tables = parser.parse(text, col_db=0, col_table=1, col_name=2, col_type=3)
```
