|
|
Subject:
Ruby/Rails - Import Multi-Record Type CSV file
Category: Computers > Programming Asked by: handicapper-ga List Price: $100.00 |
Posted:
05 Aug 2006 12:37 PDT
Expires: 04 Sep 2006 12:37 PDT Question ID: 752905 |
I need a ruby on rails program that can import a text file into MySql tables. The program should enable the user to select a file and then import the information in the file to one of seven tables. The first character of each row within the file describes a certain type of data for the file. There are seven types of data: 1. H - Header Data - describe the race card. 2. R - Race - contains information about each race on a race card. 3. S - Starter/Horses - Contains info about each starter/horse on the card 4. E - Exotic Wagering - contains info about each exotic wager on the card 5. A - Attendance - recod contains info about the attendance and handle 6. C - Comments - contains comments about events occuring for a chart 7. F - Footnote - contains the chart footnote. The the number of fields for each record type is set forth below: 1. H - 7 Fields 2. R - 64 Fields 3. S - 93 Fields 4. E - 9 Fields 5. A - 8 Fields 6. C - 9 Fields 7. F - 4 Fields The program should include the script/code that creates the requisite tables and then then the code that actually inports the CSV file and inserts the records to the appropriate table and finally close the database tables and input file. Would be nice to display some sort of processing or percentage completed message but it certainly is not necessary. For your information and testing, I have included three files: 1. PDFChartfields.pdf - Record Descriptions by type. 2. textchartsdescriptions.pdf - Data definitions 3. SAR20060727.CSV - Ssmple CSV file Please email me if you have any questions or require any clarification. I would be willing to pay a bonus for a quick turnaround. Thanks |
|
There is no answer at this time. |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |