1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Not Planned CSV Importer

Discussion in 'Sportsbook Closed Suggestions' started by Kintaro, May 19, 2013.

  1. Kintaro

    Kintaro Active Member AMS RMS Premium Showcase Sportsbook Pickem

    How about a CSV importer so it will be possible to import a large number of events and outcomes?
     
  2. Bob

    Bob Developer Staff Member

    Post a sample data source. Is it in Sportsbook format? If not, then I won't even consider it.
     
  3. Kintaro

    Kintaro Active Member AMS RMS Premium Showcase Sportsbook Pickem

    Hi Bob,
    I'm not talking of importing csv/xml from a source in particular. The csv/xml can can be made how you want.
    I don't know what's the Sportsbook format.

    In this way you can copy & past many outcomes, quote and other informations and import them all at once.
    Than, once you have your csv you can change for example the quotes in it and update them in bulk.
     
  4. Kintaro

    Kintaro Active Member AMS RMS Premium Showcase Sportsbook Pickem

    The data source could be a manual edited CSV file, for example.
    I don't know what's the SportBook format.
     
  5. Bob

    Bob Developer Staff Member

    I have not even had time to think about this request and probably won't for awhile (not until sometime after xf 1.2 has been released). Even then, I am not sure I am interested in doing it.
     
  6. Kintaro

    Kintaro Active Member AMS RMS Premium Showcase Sportsbook Pickem

    I asked before and maybe now it's a better moment.

    how about a "mass" CSV importer?
    In this way bookies (normally is the admin or one mod) can create wager with openoffice/google docs/office in CSV and then import them all at once, without repeat the same operation for every wager.

    Some other user interested?

    In case you're not interested can you give me some infos about the DB so I can do it manually importing directly in it without make a mess? :D
     
  7. Bob

    Bob Developer Staff Member

    This is open for discussion for others to give input on if they are interested.
     
  8. Bob

    Bob Developer Staff Member

    FWIW.... there is no simple way of a bulk insert as the outcomes are stored in a separate table and their primary key is the event_id (which is created when the event record is created). You'd have to write a script and you should really use the Sportsbook DataWriters (event datawriter for new events and the outcome datewriter for new outcomes).
     
  9. Kintaro

    Kintaro Active Member AMS RMS Premium Showcase Sportsbook Pickem

    Speaking of inserting manually via database:

    Are Primary key Event_id auto increment?
    If so taking note of the last event id and if there's no other user inserting events I think can be possible manually insert them (if no importer present).

    So there two tables involved? Events and outcomes?
     
  10. Bob

    Bob Developer Staff Member

    yes, event_id is an auto increment field. so is the outcome_id in the outcome table.

    no, the category table also comes into play as it stores cached data (3 fields) for the last event that was added along with the event count for all events in that category. The DataWriters handle all of this type of stuff. Same thing when adding an outcome, there are things that the DW does like change data in the event table for example.

    Also, you'll need to rebuild caches for sportsbook if you do any manual inserting.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.