0.5.2 • Published 2 years ago

csv-sql-gen v0.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

csv-sql-gen

This tool generate sql from csv file.

First, install the package.

$ npm install csv-sql-gen

You can easily run on CLI with csv-sql-gen.

$ csv-sql-gen

So you can set this command in your docker-compose command or build task.

Set csv-sql-gen.config.json

csv-sql-gen needs setting file named csv-sql-gen.config.json

Make json file named csv-sql-gen.config.json in your project root folder, Then fill it.

The rule is simple, please look below

[
  {
    "csv": "ken_all_rome.csv",
    "sql": "10_ken_all_r2ome.sql",
    "tableName": "ken_mst"
  },
  {
    "csv": "subway_stations.csv",
    "sql": "11_subway_stations.sql",
    "tableName": "subway_station_mst"
  }
]

Then write properties inside each of them.

Key and Value is meaning

KeyValue
csvPath to csv
sqlPath to sql what generated from this tool
tableNameName of the table (Insert target)
0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago