crossdsection / large_csv_upload

Import a large csv file using Laravel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a project for submission of a Machine Round, I never used Laravel before this -

Install

  • git clone https://github.com/crossdsection/large_csv_upload
  • composer install
  • php artisan key:generate
  • set MySql credentials in database.php
  • php artisan migrate

Usage

  • php artisan serve
  • php artisan queue:listen --timeout=0 //Run in seperate terminal
  • /uploadfile -> Submit Zip URL of File containing CSV // http://spotrix.itarmsg.com/app/task/dev.zip
    • This will trigger the downloading and extraction which is visible in the queue logs.
    • status property corresponding to the file in table files will convert to SUCCESS

Specific View For the Machine Round

  • After the importing of CSV is completed
    • Change MySql Configuration in my.ini and restart #[mysqld] //Config innodb_locks_unsafe_for_binlog=1

    • Run SQL query mentioned in file ./queries/viewCreated.sql

  • Open /analysis

About

Import a large csv file using Laravel.


Languages

Language:PHP 71.3%Language:Blade 27.5%Language:Shell 1.3%