Richard Bucker

recursive query in SQLite

Posted at — Jun 28, 2015

I’m working on a SQL query that it not very complicated, however, normal SQL is just not going to do the trick. I have simple hierarchy graph data represented in a single table or DAG. Eventually I’m going to dump the data into json document that I will later load into javascript d3js web page in order to render the graph visually. The end result should left us look more closely at the data in order to clean things up and make certain determinations about the quality of the data.It was simple enough to dump the complete raw data without any processing, however, some simple reporting using recursion was possible using SQLite. This document explained the basics.export the datacreate the new tables in SQLiteimport the dataexecute and refine the SQLNow I need to take the resulting data and convert it from TSV to JSON and import the data into the web page (example)