import csv data into mysql

please see attached csv and sql files.

[url removed, login to view]

should keep datasets.

[url removed, login to view]

should get all data values for datasets

[url removed, login to view]

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.


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'

[url removed, login to view]

has actual data values for all datasets.

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

missing values and skipped

[url removed, login to view]

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


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 [url removed, login to view]

`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 [url removed, login to view]

`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 [url removed, login to view]

- `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 [url removed, login to view] <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.

Taidot: PHP, tietojärjestelmäarkkitehtuuri

Näytä lisää: use of data structure, type of data structure in c, type of data structure, table data structure, set in data structure, set data structure, quick sort in data structure with example, quick sort data structure, questions of data structure, php script null, new data structure, list of data structure, list in data structure, list data structure, import csv into mysql php script, how to null php script, how to null a script, how to null a php script, data structure type, data structure sort, data structure set, data structure quick sort, data structure questions, data structure list, data structure example

Tietoa työnantajasta:
( 33 arvostelua ) Lakeland, United States

Projektin tunnus: #9196363

Myönnetty käyttäjälle:


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 Lisää

60 $ USD 1 päivässä
(139 arvostelua)

23 freelanceria on tarjonnut keskimäärin 102 $ tähän työhön


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 !!)... y Lisää

184 $ USD 1 päivässä
(817 arvostelua)

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

105 $ USD 1 päivässä
(191 arvostelua)

11+ years of experience in programming PHP/MYSQL/API/WEB SCRAPING/DEBUG EXPERT/ANY KIND OF FIX IN [url removed, login to view] PHP CODING You can check my profile for my reputation and ranking .

444 $ USD 1 päivässä
(334 arvostelua)

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 Lisää

94 $ USD 3 päivässä
(111 arvostelua)

Hello there, I have reviewed your job description as well and very confident to handle this project perfectly. I am expert in Web designing/developing.I believe that I can be the best productive candidate for Lisää

80 $ USD 1 päivässä
(153 arvostelua)

Hello, I would love to work on your interesting project. If you hire me, then I'll make sure you never get disappointed and are always happy with the result. Here is my terms of service: • Guaranteed refund if not sat Lisää

55 $ USD 1 päivässä
(64 arvostelua)

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 1 päivässä
(205 arvostelua)

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 Lisää

100 $ USD 5 päivässä
(44 arvostelua)

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 Lisää

100 $ USD 1 päivässä
(45 arvostelua)

A proposal has not yet been provided

66 $ USD 1 päivässä
(15 arvostelua)

A proposal has not yet been provided

105 $ USD 1 päivässä
(16 arvostelua)

A proposal has not yet been provided

111 $ USD 1 päivässä
(4 arvostelua)

A proposal has not yet been provided

45 $ USD 1 päivässä
(6 arvostelua)

A proposal has not yet been provided

55 $ USD 1 päivässä
(2 arvostelua)

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 Lisää

94 $ USD 1 päivässä
(2 arvostelua)

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 1 päivässä
(0 arvostelua)

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 Lisää

88 $ USD 10 päivässä
(0 arvostelua)

A proposal has not yet been provided

88 $ USD 1 päivässä
(0 arvostelua)

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

100 $ USD 2 päivässä
(0 arvostelua)

A proposal has not yet been provided

80 $ USD 5 päivässä
(0 arvostelua)