Results 1 to 12 of 12
  1. #1
    Member bluewaves1's Avatar
    Join Date
    April 12th, 2007
    Location
    Utah
    Posts
    125
    Link to Import Datafeed
    Can someone please point me to the script or instructions on getting the .csv data feed file into my database. I have my database all set up and imported before, but it's been a while and I have to say, I've forgotten how to import it into my database.

    I thought it was an sql command that did it, but it's been so long.

    Can someone help me?

    Thanks...

  2. #2
    Full Member
    Join Date
    March 10th, 2006
    Posts
    466
    This one should do it. It's the one I'm familiar with.

    Here

  3. #3
    Member bluewaves1's Avatar
    Join Date
    April 12th, 2007
    Location
    Utah
    Posts
    125
    This script did it's job
    Thank you. I thought it was fairly easy. I'll have to keep this on file so I don't need to ask again.

    Thanks...

  4. #4
    Member bluewaves1's Avatar
    Join Date
    April 12th, 2007
    Location
    Utah
    Posts
    125
    More specifically a Shareasale Datafeed Import
    Sorry, I should have been more clear about this. I need that type of script that has all the fields that the Shareasale datafeeds have.

    Thanks...

  5. #5
    Full Member
    Join Date
    March 10th, 2006
    Posts
    466
    I see you were visiting the only other feed script I know about, but haven't used

    here
    on the Mobilebadboy thread.

    Does that one work for you?

  6. #6
    Member bluewaves1's Avatar
    Join Date
    April 12th, 2007
    Location
    Utah
    Posts
    125
    Importing text files into phpMYADMIN
    I did try that script and it wouldn't connect properly to shareasale.

    I decided to create my own table in phpMyADMIN with SQL.

    So I have the table ready and I've been trying to import the text file with the shareasale info.

    I use the import button and the CSV and Load Data feature...but I am not sure which choices to use for the various fields:

    Fields Terminated
    Fields Escaped
    Fields Enclosed
    Lines Escaped

    The closest I got to getting it right is to make all the choices |.

    I do get errors though...there are about three fields that don't upload into the right categories...

    This is the table I created:

    CREATE TABLE 4checks
    (ProductID int(11) NOT NULL default '0',
    Name varchar(255) NOT NULL default '',
    MerchantID varchar(50) NOT NULL default '',
    Merchant varchar(50) NOT NULL default '',
    Link text NOT NULL,
    Thumbnail text NOT NULL,
    BigImage text NOT NULL,
    Price varchar(50) NOT NULL default '',
    RetailPrice varchar(50) NOT NULL default '',
    Category varchar(50) NOT NULL default '',
    SubCategory varchar(50) NOT NULL default '',
    Description longtext NOT NULL,
    Custom1 text NOT NULL,
    Custom2 text NOT NULL,
    Custom3 text NOT NULL,
    Custom4 text NOT NULL,
    Custom5 text NOT NULL,
    LastUpdated varchar(100) NOT NULL default '',
    status varchar(50) NOT NULL default '',
    Company text NOT NULL,
    Custom6 text NOT NULL,
    Type text NOT NuLL,
    PRIMARY KEY (ProductID))

  7. #7
    Full Member
    Join Date
    March 10th, 2006
    Posts
    466
    Change only the first field to pipe "|" without quotes, leave the rest as default. That's how I usually do it.

    Fields Terminated |
    Fields Escaped "
    Fields Enclosed \
    Lines Escaped auto
    _______________________________________________________________

    Auto increment is off right...

    ...and you are using a raw text file and not some tab saved Excel file.

    Instead of
    Price varchar(50) NOT NULL default '',

    Try
    Price decimal(10,2) NOT NULL default '0.00' (Not 100% sure on '0.00' or 0.00)

    Do the same thing for "RetailPrice" use a decimal.

    Make sure Category and Subcategory are not hitting limitations with 50 char budget.

    Double check your column count and field count.

  8. #8
    Member bluewaves1's Avatar
    Join Date
    April 12th, 2007
    Location
    Utah
    Posts
    125
    That worked...
    That did work. Thanks...so much. You have no idea how it helped.

    I have one other question...I've found that some of the datafeeds need additional information to categorize them better. To do that, I want to open the .txt datafeed in Excel, add the additional information and then export the data so it's ready to be uploaded into phpMyADMIN.

    What I need to know is what type of file to save it to and then, what the configuration will be when I fill out the "fields terminated by" form...like we talked about above when I import the file.

    Can you help me with this? I have a feeling you'll be able to.

  9. #9
    Full Member
    Join Date
    March 10th, 2006
    Posts
    466
    The mechanics of modifying spreadsheet fields and importing a modified version in pipe delimited is possible.

    But what happens when the merchant decides to change the feed and adds products and takes them away...

    Then none of the rows in the original spreadsheet match up any more. This means you would have to add the categories every single time you get a new feed.

    Is that what you had in mind?

  10. #10
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by mr_jones
    The mechanics of modifying spreadsheet fields and importing a modified version in pipe delimited is possible.

    But what happens when the merchant decides to change the feed and adds products and takes them away...

    Then none of the rows in the original spreadsheet match up any more. This means you would have to add the categories every single time you get a new feed.

    Is that what you had in mind?
    Hi. I was just reading this thread and thought I'd jump in with a thought.

    If you really work carefully through the thread referenced in post #5 above, the thread started by Mobilebadboy, you've got everything you need there to 1) connect to SAS, 2) download the feed you need, 3) put it into a table in a database you've created on your server, and, 4) be able to update the SAS datafeed in the future using the same script.

    I know it works, because I have several modified versions of it I use on several domains to download several SAS datafeeds.

    But you have to work very carefully and thoroughly through all the posts in the thread to "get" what works and what doesn't.

    Look it over if you want something truly useful.

    That's just what I've found to be true on the matter. I know you'll find a lot of people on ABW who get it to work, and others who never did, or really didn't want what the script does.

    So -- up to you in the end.
    Generate more fake news.

  11. #11
    Full Member
    Join Date
    March 10th, 2006
    Posts
    466
    Hi Gary,

    I may use it some time in the future, but I'm not using it at the moment mainly because I need to import feeds from 4 networks and had to work out something else.

    If I'm looking at an SAS-only site in the future - and it's very possible - thanks for the recommendation. I'll certainly look at this particular script.

  12. #12
    Full Member
    Join Date
    March 10th, 2006
    Posts
    466
    I have one other question...I've found that some of the datafeeds need additional information to categorize them better. To do that, I want to open the .txt datafeed in Excel, add the additional information and then export the data so it's ready to be uploaded into phpMyADMIN.
    After opening the pipe delimited file, you should be able to save the text file as a tab delimited CSV in Excel.

    Then terminate the fields with "\t" without the quotes. At least I think it's a backslash "t".

  13. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Best way to import datafeed for performance
    By MoreBeer in forum Programming / Datafeeds / Tools
    Replies: 15
    Last Post: May 25th, 2010, 02:26 PM
  2. Help with datafeed import
    By adsw in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: September 26th, 2006, 02:05 PM
  3. Help with datafeed import
    By adsw in forum Midnight Cafe'
    Replies: 4
    Last Post: September 25th, 2006, 06:13 PM
  4. Datafeed Import Optimization
    By Snib in forum Programming / Datafeeds / Tools
    Replies: 31
    Last Post: May 8th, 2006, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •