So apart from needing to redesign/rebuild my site, I really need to start writing more about my experiments. More for my own record than a public one.
Recently started playing with the whole Nutch family (Hadoop, MapReduce, Hbase, Pig, Solr, Nutch,… etc). I finally got Nutch 2.1 set up with Cassandra 1.2 (that in itself should be another article) with the aim to run data extraction and post to Solr’s Lucene index. Initially I’ve just indexed my own site, but need to inspect the Cassandra data. Been playing with pycassa with some success (the library rocks I just suck at python), and looking at some gui’s. But now settling on CQL as a means to navigate the data. In this post I hope to record the queries I’m yet to use to inspect a Cassandra Nutch data store.
Quick update and interesting note. I’ve been blogging about AIR and SQLite databases, and recently I’ve had to put together an analytics tracking library for AIR (currently Google Analytics only supports Flex apps, it needs the DOM to function).
Wanting a better approaching to persistent data in AIR I started writing my own DataObject to handle saving and retrieving data. While writing it I thought surly someone had implemented something like this, and sure enough they have.
OK leading on from the previous post, here’s a solution for the INSERT or UPDATE if the row exists. Which is a fairly desirable behaviour for programmers. Saving an initial select if exists then update else insert routine.
This sounds like it would be an easy fix, but I must have been googling the wrong question because I couldn’t find one article relating to Adobe AIR/Flex insert or update. Reading the SQLite docs helped a whole bunch http://www.sqlite.org/lang_insert.html
With SQLite in Adobe AIR, I was running some initial tests to figure out a cleaver TRIGGER to UPDATE or INSERT appropriately.
So far I’ve been writing all my query’s in Flex, writing statements manually for instant feedback. I encountered the #3115 Error. Searching through google I see a lot of posts about this. The answer it seems is widely varied. Other possibilities include incorrect path to applicationStorageDirectory or invalid table names. My issue (to the best of my knowlodge) was a reserved word inside single quotes.