1.0.0 • Published 1 year ago

mssql-to-json v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

MSSQL to JSON

MSSQL to JSON is a command-line tool that extracts data from a SQL Server database using a provided query and saves each row as a JSON file in a specified folder.

Usage

npx mssql-to-json <hostname> <database_name> <user>[:<password>] <query> <output_directory>

* <hostname>: The hostname of the SQL Server.
* <database_name>: The name of the SQL Server database.
* <user>[:<password>]: The SQL Server user, with an optional password after a colon (e.g., user:password). If the password is not provided, the program will prompt for it.
* <query>: The SQL query used to extract the data.
* <output_directory>: The folder where the JSON files will be saved.

If filename field is provided in the query, it will be used as the JSON filename, if not the row number will be used.

1.0.0

1 year ago