import csv data into mysql

Completed Posted Dec 26, 2015 Paid on delivery
Completed Paid on delivery

please see attached csv and sql files.

[login to view URL]

should keep datasets.

[login to view URL]

should get all data values for datasets

[login to view URL]

is list of datasets.

col 1 is industry code (see below)

some datasets are 'parents' of others.

structure is defined by the number od dashes in front of dataset name.

i.e.

1,"-All holders"

is a subset of

101,"Mortgage Debt Outstanding"

6,"--Major financial institutions"

is a subset of

303,"-By type of holder"

superset_id should be set accordingly

'root' dataset should have 'parent_id' of '0'

[login to view URL]

has actual data values for all datasets.

Both empty cells and cells, that have zeroes should be considered as

missing values and skipped

[login to view URL]

contains very basic class with some

methods, that may help you working with datasets and values.

for example: Data in this datasets is available per quarter, and database

needs a value of month.

- use q2m(...) method to convert quarter to month.

- get_dataset_by_code(...) will give you dataset id by code (see how code is constructed below)

- delete_datasets_by_source(…) will delete all data and datasets

e.t.c.

please do a quick review of this code. You are free to add your changes

to existing methods and create new.

Quick overview of database schema:

in datasets table:

`code` should be set to ‘mdo_<industry_id>’. For example 'mdo_202'

`sort` = ‘0’ for all datasets

`name` from column 2 of [login to view URL]

`component_id` = ‘0’ for all datasets

`superset_id` should have id of parent dataset. “root” dataset should have ‘0’ here.

`industry_id` from column 1 of [login to view URL]

`source` = ‘mdo’ for all datasets

`nodata` datasets 101, 202 and 303 have no data so ‘nodata' field for them should be set to ‘1’ and ‘0’ for others

the rest may be left empty.

in data table:

- `county_id` for this dataset is fixed and should be ‘100'.

- `year`, `month` and `val` - based on [login to view URL]

- `statefp` =‘0’ for all records

- `dataset` = id from datasets table

- `derived` = ‘NULL’ for all records (default)

The script should run in command line mode.

i.e. #php [login to view URL] <paremeter>

and accept parameters:

“create_datasets" - to fill datasets table

"import_data" - to import data values for existing datasets

both should perform appropriate cleanup

(delete all datasets and data prior to creating datasets)

(delete all data prior to importing data)

Feel free to ask any questions.

We will be adding many more datasets into this structure. This job only includes files, that are attached.

The code should be reasonably commented.

Minimal code is welcome.

PHP Software Architecture

Project ID: #9196363

About the project

22 proposals Remote project Active Dec 27, 2015

Awarded to:

justTry

Hello! Just one question, as of now. The appropriate cleaning you mention, this should be 'purge before an import each time' or should be built as a parameter switch itself? One thing it's not mentined is how would t More

$60 USD in 1 day
(146 Reviews)
5.9

22 freelancers are bidding on average $104 for this job

rajeshsonisl

Hello! With 98% to 99% completion rate, 850+ successfully completed projects, and a 4.99 reputation (maximum possible, 5.0) (can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... y More

$184 USD in 1 day
(884 Reviews)
8.5
waelfree

let us start ..............................................................................................

$105 USD in 1 day
(190 Reviews)
7.9
arityinfoway

Hello, Hope You are doing well. ARITY INFOWAY is complete web based solutions company. We able to provide web solutions from scratch to hosting . We always go through every point of your projects scope and prov More

$94 USD in 3 days
(118 Reviews)
6.8
herpay

Hello, I'm an experienced php/mysql developer and so I can make the requested script within max a day after you accept my bid. Regards, Tamas

$66 USD in 1 day
(206 Reviews)
6.1
suraj2

Hi, I have 10 years core php experience and I am expert of developing custom web applications and I am expert of: - Password protected secure admin on bootstrap theme (php/mysql) - Complex SQL queries to filter data More

$100 USD in 5 days
(44 Reviews)
5.6
umarbsse

HI. I am Software Engineer and programmer .i can do that task within 24hours. I had developed the complete website which include both fronted and back-end also i had developed the desktop software applications. I had c More

$100 USD in 1 day
(45 Reviews)
5.3
vinaysinghh

A proposal has not yet been provided

$66 USD in 1 day
(17 Reviews)
4.6
bookshop1989

A proposal has not yet been provided

$105 USD in 1 day
(16 Reviews)
4.0
swarm22

A proposal has not yet been provided

$111 USD in 1 day
(4 Reviews)
3.8
thanhtuan5787

A proposal has not yet been provided

$45 USD in 1 day
(6 Reviews)
3.2
Smartwork7

Hello, Greetings! I am writing to express my interest in your project. I believe that my skills & qualifications make me an ideal candidate for this project. I possess 5 years experience as a PHP lead , we have More

$94 USD in 1 day
(2 Reviews)
1.7
Aleksandrow

A proposal has not yet been provided

$55 USD in 1 day
(2 Reviews)
1.9
resyltd

You don't need hire someone for this project. Import csv directly with phpMyAdmin and save it to sql file. To easy you can make it yourself. Happy new year!

$61 USD in 1 day
(0 Reviews)
0.0
zuongtd

A proposal has not yet been provided

$80 USD in 5 days
(0 Reviews)
0.0
rohit4uu07

A proposal has not yet been provided

$88 USD in 1 day
(0 Reviews)
0.0
mithunshastri

This can be done as per the requirement. PHP script that will be delivered can be run through command line for performing two actions: 1) create dataset 2)import data. Both these actions will first cleanup the existing More

$88 USD in 10 days
(0 Reviews)
0.0
majoseminan

I have 2 years of experience moving data from different sources to SQL server. I currently work with MySQL.

$100 USD in 2 days
(0 Reviews)
0.0
vishaltile

We are database professionals and we will deliver you in less time with quality for sure. we have experts more than 11 yrs. Let us know. Thanks

$111 USD in 1 day
(0 Reviews)
0.0
qalaktika

I have 5 years experience on PHP and databases (mysql,mssql), 3 years experience on C# and .net. I will prepare and send your complete script, after this you can pay

$45 USD in 1 day
(0 Reviews)
0.0