Skip to content

Mihai-Canea/JsonToMSSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

     _ ___  ___  _  _   _         __  __ ___ ___  ___  _    
  _ | / __|/ _ \| \| | | |_ ___  |  \/  / __/ __|/ _ \| |   
 | || \__ \ (_) | .` | |  _/ _ \ | |\/| \__ \__ \ (_) | |__ 
  \__/|___/\___/|_|\_|  \__\___/ |_|  |_|___/___/\__\_\____|
                                                                                                                        

About

Simple tool for convert your JSON file into MSSQL table

Usage

[-t] [<DB table name>]: insert JSON file name from scrapy output

python main.py -t Colors.json

Example

From this:

[{
   "color": "red",
   "colorValue": "#f00"
}, {
   "color": "green",
   "colorValue": "#0f0"
}, {
   "color": "blue",
   "colorValue": "#00f"
}, {
   "color": "cyan",
   "colorValue": "#0ff"
}, {
   "color": "magenta",
   "colorValue": "#f0f"
}, {
   "color": "yellow",
   "colorValue": "#ff0"
}, {
   "color": "black",
   "colorValue": "#000"
}]

to this:

INSERT INTO [dbo].[Colors](
	color,
	colorValue
)
VALUES
('red','#f00'),
('green','#0f0'),
('blue','#00f'),
('cyan','#0ff'),
('magenta','#f0f'),
('yellow','#ff0'),
('black','#000');

About

Simple way to JSON to MSSQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages