https://github.com/andywer/json-sql-import
Small PHP tool to import JSON data into database tables using transformation rules.
https://github.com/andywer/json-sql-import
Last synced: 10 months ago
JSON representation
Small PHP tool to import JSON data into database tables using transformation rules.
- Host: GitHub
- URL: https://github.com/andywer/json-sql-import
- Owner: andywer
- License: mit
- Created: 2013-09-30T15:32:51.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-30T18:16:25.000Z (over 12 years ago)
- Last Synced: 2025-07-28T07:36:04.814Z (11 months ago)
- Language: PHP
- Size: 117 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
json-sql-import
===============
Small PHP command line tool to import JSON data into database tables using transformation rules (templated SQL queries).
Usage
-----
```php
php json-import.php
```
Omit the options to print the help / usage notice.
Example
-------
Have a look at the [demo ruleset](https://github.com/andywer/json-sql-import/blob/master/rulesets/demo/test.json).
You would use this ruleset using `php json-import.php import demo/test path/to/data.json`. An appropriate JSON data file would have to look like this:
```json
[
{
"somevar": "hello world",
"somearray": [
{ "name": "somenumber", "value": 123.45 },
...
]
},
...
]
```
License
-------
This software is released under the MIT license. See [license](https://raw.github.com/andywer/json-sql-import/master/LICENSE).