https://github.com/kerrialn/static-data-importer-bundle
static data importer CLI - import csv, json or xml as entity objects
https://github.com/kerrialn/static-data-importer-bundle
data-importing symfony-bundle
Last synced: about 2 months ago
JSON representation
static data importer CLI - import csv, json or xml as entity objects
- Host: GitHub
- URL: https://github.com/kerrialn/static-data-importer-bundle
- Owner: Kerrialn
- License: mit
- Created: 2022-08-14T09:28:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-26T14:43:15.000Z (over 3 years ago)
- Last Synced: 2025-03-28T16:17:49.464Z (about 1 year ago)
- Topics: data-importing, symfony-bundle
- Language: PHP
- Homepage:
- Size: 95.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Static Data Importer Bundle
A Symfony CLI Bundle for importing json, csv and/or xml directly into a database via an entity object.
**Install**:
```bash
composer require kerrialn/static-data-importer-bundle
```
**Configure**: add json, xml or csv files to `./data` (name this anything you want) root directory in your project
1. File naming convention `{order number}_{entity name}.{format}` Eg... `10_Blog.json`, `20_category.csv` or `30_User.xml` (entity name is case-insensitive)
2. Change the import order, with the order number in the file name.
3. Add `_SKIP` (case-sensitive) to the filename to skip the file.
**Run**:
```bash
bin/console import data/
```
Please note: id fields will be ignored and will generate id as per your entity annotation/attribute definition.