The FrogPad
 
A forum to get help or talk about Roastmaster…or anything else coffee.

Export data  (Read 3702 times)

CoffeeMagic

  • (3 Posts)
  • *
  • Karma: 0
  • Micro roaster - UK
    • View Profile
I have been using the app for some time and created many blends. I want to be able to export the basic information regarding each blend - e.g. Bean name and percentage (or weight). At present I have to export the SQLite Db and then attempt to analyse what fields to query in Excel etc. Flexible but not practical.

In the meantime, is there docs for the db schema?
Sorry! I don't do skinny, soy, decaf latte.

Danny Hall

  • (383 Posts)
  • *****
  • Karma: 3
    • View Profile
    • Rainfrog
Hi

Sorry for the delay in responding - I was wrestling this weekend with a bug I found testing the next update. It was a rarely presenting bug with the new data logging option, but in need of fixing nonetheless.

There are no docs for the database schema at the moment, but enhancing the import/export is something I want to tackle soon. I try to go by popularity of requests, and that is one of the main ones after some the new features in the next update. Roasts are certainly the main request, but I can see the advantage of exporting blends as well.

In the mean time, you'd have to do the querying with SQL. The ZBLEND table uses a join table for its to-many relationships to beans and roasts - it's called ZBLENDEDITEM. I'm not sure how proficient you are with SQL, or if you have software to open SQLite databases, but a stripped down query would look something like...

select b.ZNAME, b.ZNOTES, bi.ZAMOUNT from ZBLEND b join ZBLENDEDITEM bi on bi.ZBLEND = b.Z_PK

That would just give you rows with blend name, notes and amount for each blended item. It gets complicated from there, because Roastmaster lets you blend either a roast or a bean, so to get anything useful, you'd have to join another table in based on whether it's a bean or a roast that you've blended - based on whichever column holds data out of ZBEAN or ZROAST. It can get complicated fast, especially considering recursion if you blend a roast of a blend of a roast of a... etc., so a home-rolled query may prove very difficult. But this is something the app already does for you behind the scenes, so adding support for blend export is not a monumental undertaking, which is why I'm considering it for roasts and blends.

DISCLAIMER : please don't ever modify data in any way outside of Roastmaster. Core Data on iOS is VERY finicky, and will refuse to work if even the smallest of database details is not in adherence to its own standards.

Sorry - this may not have been helpful to you. But, if you have a sample sheet, even with dummy data - I'd love to see an excel file to help me get a good picture of what you're after. Feel free to email to support@rainfroginc.com.

Cheers
Danny