Em Andamento

Parse and write file scrape

This is a simple application that creates an attributes file. It works as follows.

File 1 is the source file and contains 3 columns for sku, color and size, this is a comma seperated file

File 2 is known as the attributes file and contains many columns (both attached) - this is a tab delimited file

Both files will be provided, file 1 is called [url removed, login to view] (eg. [url removed, login to view]) and file 2 [url removed, login to view] ([url removed, login to view])

The program is going to modify file 2 - the modification rule is as follows.

1. find the matching sku in file 1 and 2 (column2 in file 2) - this gives a row in file 2

2. first look in file 1 at the color line (column 2) and parse it out (comma separated)

3. then take one color at a time and look for the column v_attribute_values_name which has that color, exact match

4. now you should have one cell at the intersection of the sku and the color

5. in the cell just to the left of v_attribute_values_name which is v_attribute_values_price place the value 0 (zero)

6. now we repeat steps 2-6 but useing the size column in file 1 (which is column 3)

So new resulting file 2 will have zero's placed in columns which have a corresponding color and size.

The reason for this project is the file 2 get to large for spreadsheets, so I need a nice elegant script that can handle it. The script can run from the command line and give it two parameters for the two file names.

Habilidades: Perl, PHP

Ver mais: write names, look find write, intersection two line, intersection line, intersection and, find perl, find intersection, i write, write s, sku, s parameters, repeat, perl script modification, mep works, file source, cell names, project file, write script file, simple csv perl script, large file, tab separated, php run command, simple write, source file, line csv

Acerca do Empregador:
( 1 comentário ) Marietta, United States

ID do Projeto: #121022