buchin/jl-importer

Import JSON Line into MySQL database

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Language:Julia

Type:package

dev-master 2016-11-23 15:39 UTC

This package is auto-updated.

Last update: 2024-11-15 19:16:34 UTC


README

Import existing JSON Lines into MySQL database

Installation

composer require buchin/jl-importer

Usage

<?php
use Buchin\Jl\Importer;

// Initialize importer
$importer = new Importer;

// define parameters
$source = '/Path/to/jlfile.jl';
$dsn = 'mysql:unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock;dbname=test';
$user = 'mysql_user';
$password = 'mysql_password';

// start importing
$importer->import($source, $dsn, $user, $password);

Test

./vendor/bin/kahlan --reporter=verbose