doyevaristo / liquet-database
use mysql queries and and efficiently import thousands of records from csv
v1.0.1
2017-06-06 01:53 UTC
This package is not auto-updated.
Last update: 2025-02-16 05:20:56 UTC
README
Simple data MySQL query runner and imports database records from big data CSV.
Made this library for loading layer of Data Warehousing
Features:
- runs query in straight forward manner
- Import huge csv. Either update the existing record or add new records.
Usage:
use Doyevaristo\LiquetDatabase\CsvReader;
use Doyevaristo\LiquetDatabase\LiquetCSVImporter;
use Doyevaristo\LiquetDatabase\LiquetDatabase;
$liquetDatabase = new LiquetDatabase('db_username','db_password','db_database','db_hostname');
$csvReader = new CsvReader();
$csvImporter = new LiquetCSVImporter($liquetDatabase,$csvReader);
$csvImporter
->table('your_table_name')
->import($file);
Notes:
- CSV must have header same with table column name
To Do:
- Improve documentation
- Unit testing