<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gobán Saor &#187; xLite</title>
	<atom:link href="http://blog.gobansaor.com/category/xlite/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gobansaor.com</link>
	<description>A country datasmith.</description>
	<lastBuildDate>Fri, 27 Jan 2012 10:22:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.gobansaor.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/67e164f5d51c2b3115a7819b84505c13?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Gobán Saor &#187; xLite</title>
		<link>http://blog.gobansaor.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.gobansaor.com/osd.xml" title="Gobán Saor" />
	<atom:link rel='hub' href='http://blog.gobansaor.com/?pushpress=hub'/>
		<item>
		<title>MicroETL Alpha Release</title>
		<link>http://blog.gobansaor.com/2010/10/15/microetl-alpha-release/</link>
		<comments>http://blog.gobansaor.com/2010/10/15/microetl-alpha-release/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 17:22:26 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[microETL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=1179</guid>
		<description><![CDATA[As per my last post here&#8217;s an Alpha release of the MicroETL &#8220;SQL &#38; Sequencing&#8221; tool for Excel http://bit.ly/boVxll This zip file contains a 32bit version of the MicroETL add-in.  It includes Python support but to activate that you require the &#8230; <a href="http://blog.gobansaor.com/2010/10/15/microetl-alpha-release/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1179&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.gobansaor.com/2010/10/12/manipulating-excel-tables-with-sql/">As per my last post </a> here&#8217;s an Alpha release of the MicroETL &#8220;SQL &amp; Sequencing&#8221; tool for Excel <a href="http://bit.ly/boVxll">http://bit.ly/boVxll</a></p>
<p>This zip file contains a 32bit version of the MicroETL add-in.  It includes Python support but to activate that you require the latest V2.7 of Python.</p>
<p>The add-in (MicroETL.xla) can be &#8220;installed&#8221; in the normal fashion but make sure all the associated DLLs (Sqlite3.dll, xLiteSQLit3.dll) are in the same folder. For Python support you&#8217;ll also need pydbVT.DLL and the initmicroETL.py file.</p>
<p>If you don&#8217;t wish to install the add-in, the example workbooks (TimeDimensionExample.xlma &amp; TimeDimesnion97-2003Exmple.xls) contain Open_Workbook code that will load the add-in (providing they&#8217;re in the same folder).</p>
<p>The example is a classic ETL task, creating a Time Dimension. The 2010/2007 version takes advantage of the new Excel Table functionality, while the 97-2003 uses plain-old-Excel-ranges. The 97-2003 also outputs the dimension as a CSV file which will most likely end up in your MyDocuments folder.</p>
<p>Here&#8217;s the 64bit version  <a href="http://bit.ly/8Y0owq">http://bit.ly/8Y0owq</a> (no Python). To use this version you must have a 64bit OS AND a 64bit install of Excel.</p>
<p>The Excel project is password protected, if you need access to the code contact me and I&#8217;ll send you the password.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/1179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/1179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/1179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/1179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/1179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/1179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/1179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/1179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1179&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/10/15/microetl-alpha-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
		<item>
		<title>Manipulating Excel tables with SQL</title>
		<link>http://blog.gobansaor.com/2010/10/12/manipulating-excel-tables-with-sql/</link>
		<comments>http://blog.gobansaor.com/2010/10/12/manipulating-excel-tables-with-sql/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 20:00:36 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[microETL]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[Extract transform load]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=1164</guid>
		<description><![CDATA[Having upgraded xLite to be 64bit compatible and as a result having to re-test it, I decided to make some significant changes to how it works. Although xLite was, and is, SQLite embedded in Excel, having access to SQLite databases is &#8230; <a href="http://blog.gobansaor.com/2010/10/12/manipulating-excel-tables-with-sql/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1164&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_1169" class="wp-caption alignleft" style="width: 310px"><a href="http://gobansaor.files.wordpress.com/2010/10/sql.png"><img class="size-medium wp-image-1169" title="SQL" src="http://gobansaor.files.wordpress.com/2010/10/sql.png?w=300&#038;h=225" alt="microETL SQL Window" width="300" height="225" /></a><p class="wp-caption-text">microETL SQL Window</p></div>
<p><a href="http://blog.gobansaor.com/2010/09/25/the-64-bit-question-and-the-birth-of-microetl/">Having upgraded xLite to be 64bit compatible</a> and as a result having to re-test it, I decided to make some significant changes to how it works. Although xLite was, and is, <a class="zem_slink" title="SQLite" href="http://sqlite.org/" rel="homepage">SQLite</a> embedded in Excel, having access to SQLite databases is not the reason I&#8217;ve combined the two products. The manipulation of Excel tables using a SQL dialect, all the while operating in memory, is my goal.</p>
<p>Having the ability to access external disk-based SQLite databases can be useful (particularly when dealing with very large fact-like tables) but it&#8217;s a perk not the primary use-case. The main aim is to bring the data-handling power of a SQL engine  to  bear on Excel tabular datasets; if Excel offered this by default, I would not be embedding SQLite. SQLite is a means to an end.</p>
<p>So what changes have I made?</p>
<ul>
<li>First off, I&#8217;ve added a SQL helper form (right-click on cell context menu, and pick SQL). The form not only makes issuing SQL statements easier but also holds a history of commands if required.</li>
<li>Secondly, I&#8217;ve introduced a pre/post processor for the SQL() function.</li>
<li>I&#8217;ve also added two SQLScript (new name for xLiteScript) helper forms. One to run a SQLScript from the right-click context menu, plus a lookup form to help select the required microETL function along with a description of the parameters required.</li>
</ul>
<p>Examples of the new SQL() pre-processor in action:</p>
<p style="padding-left:30px;"><em>=SQL(&#8220;Select * from TABLE(Sheet2!A1)&#8221;,&#8221;Sheet1!B17&#8243;)</em></p>
<p style="padding-left:30px;"><em>This will paste the table found at position Sheet2!A1 to Sheet1!B17.</em></p>
<p style="padding-left:30px;"><em>=SQL(&#8220;Insert into TABLE(Sheet1!B17) Select * from TABLE(Sheet2!A1))</em></p>
<p style="padding-left:30px;"><em>This will do the same as above, difference being that for this to work, an existing Excel table at Sheet1!B17 of the same structure (i.e. same headings) as Sheet2!A1 must first exist.</em></p>
<p>The TABLE(&#8230;) command tells SQL() to go fetch the relevant Excel ranges, loads the &#8220;tables&#8221; into SQLite; when the SQL command finishes it writes back the data (if changed) to the originating Excel address, and cleans up any temporary SQLite-side tables. Nearly all SQL commands can be issued against the resulting tables, including UPDATE, DELETE, DROP and CREATE TRIGGERS etc.</p>
<p>Two other pre-processor commands are CELL(&#8230;) and CELLS(&#8230;). Similar to TABLE(&#8230;), data is loaded from the Excel addresses specified and placed in the SQL  statement. CELL takes a single cell reference while CELLS will iterate through a multi-cell range and insert a comma-separated list into the SQL statement (in a format suitable for IN (&#8230;) expressions).</p>
<p>SQLScript is a simple table-based command sequencer  (<a class="zem_slink" title="Extract, transform, load" href="http://en.wikipedia.org/wiki/Extract%2C_transform%2C_load" rel="wikipedia">ETL</a> is primarily a step-by-step process) which can be used as an alternative to VBA  when a simple set of events needs to happen in sequence. The optional  SQL history generated by the SQL helper form is held in a SQLScript format and written back to an Excel table on exit, allowing for the creation of repeatable scripts based on previous SQL commands.</p>
<p>I still need to fully test the new functionality and will do so over the next few weeks before I publish a beta version. If anybody wants to try the un-tested alpha version let me know and I&#8217;ll send you a copy. <a href="http://blog.gobansaor.com/2010/10/15/microetl-alpha-release/">you can find it here</a>.</p>
<p>Update:</p>
<p>See <a href="http://blog.gobansaor.com/2011/03/09/microetls-sql-function/">http://blog.gobansaor.com/2011/03/09/microetls-sql-function/</a> for a more detailed description of the =SQL() function.</p>
<p>Update:</p>
<p>The table() command now supports virtual tables e.g. &#8220;select * from table(vtCSV,C:\data\myData.csv)&#8221; see <a href="http://blog.gobansaor.com/2011/05/05/excel-document-oriented-database-with-python-map-sql-reduce/">http://blog.gobansaor.com/2011/05/05/excel-document-oriented-database-with-python-map-sql-reduce/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/1164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/1164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/1164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1164&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/10/12/manipulating-excel-tables-with-sql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>

		<media:content url="http://gobansaor.files.wordpress.com/2010/10/sql.png?w=300" medium="image">
			<media:title type="html">SQL</media:title>
		</media:content>
	</item>
		<item>
		<title>The 64-bit question, and the birth of MicroETL</title>
		<link>http://blog.gobansaor.com/2010/09/25/the-64-bit-question-and-the-birth-of-microetl/</link>
		<comments>http://blog.gobansaor.com/2010/09/25/the-64-bit-question-and-the-birth-of-microetl/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 17:36:39 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[microETL]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[64-bit]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=1151</guid>
		<description><![CDATA[Like the original $64 question, I have for a long time being pondering the Excel 64-bit question. Whether &#8220;To take it, or leave it&#8221;? When first announced, I believed 64bit Excel would only be of interest to a minority of demented quants &#8230; <a href="http://blog.gobansaor.com/2010/09/25/the-64-bit-question-and-the-birth-of-microetl/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1151&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.gobansaor.com/2010/09/25/the-64-bit-question-and-the-birth-of-microetl/64or32-clear/" rel="attachment wp-att-1674"><img class="alignleft size-medium wp-image-1674" title="64or32-clear" src="http://gobansaor.files.wordpress.com/2010/09/64or32-clear.png?w=180&#038;h=90" alt="" width="180" height="90" /></a>Like the <a href="http://answers.yahoo.com/question/index?qid=20060827112827AAcfNx8">original $64 question</a>, I have for a long time being pondering the Excel 64-bit question. Whether &#8220;To take it, or leave it&#8221;?</p>
<p>When first announced, I believed 64bit Excel would only be of interest to a minority of demented quants in investment banks hacking their way to yet another evil model to bankrupt the world. The problem of incompatible add-ins, COM controls etc. would also make its widespread adoption less likely.</p>
<p>But three things changed my mind:</p>
<ul>
<li>first, the appearance of <a class="zem_slink" title="Windows 7" href="http://www.microsoft.com/windows/windows-7/default.aspx" rel="homepage">Windows 7</a> powered 64-bit PCs on many worker&#8217;s desks</li>
<li>second, my embedding of SQLite into Excel which enables me to effectively use the extra memory available to a 64-bit instance to hold, analyse and transform a huge amount of raw relational data (in the form of a &#8220;:memory:&#8221; database)</li>
<li>and finally, the arrival on the scene of <a class="zem_slink" title="PowerPivot" href="http://www.powerpivot.com/" rel="homepage">PowerPivot</a>.</li>
</ul>
<p>Although a PowerPivot workbook doesn&#8217;t allow more than 4Gig of memory to be addressed (this is a SharePoint restriction, as a 4G workbook is likely to compress down to &lt;= the 2G upload limit imposed by SharePoint), this represents a doubling of the 32bit limits in memory terms, but much more in raw data terms as PowerPivot can achieve up to 10x-20x times data compression.</p>
<p>So, I decided to bite the bullet; fired up an <a href="http://aws.amazon.com/ec2/instance-types/">AWS 64-bit image</a> and started to upgrade my xLite code-base to handle this new world.</p>
<p>I decided on the<a href="http://tdm-gcc.tdragon.net/"> TDN-GCC MinGW-w64</a> distro to re-compile 64-bit versions of my SQLite wrapper  libraries, and set about converting  my <a href="http://msdn.microsoft.com/en-us/library/ee691831.aspx">VBA code to handle both 64-bit and 32-bit dlls</a>. So far, easy peasy.</p>
<p>The problems started when I went to convert my JavaScript &amp; Python wrappers. I couldn&#8217;t get <a href="http://blog.gobansaor.com/2010/06/04/javascript-as-an-excel-scripting-language-via-jsdb/">JSDB</a> to compile to either 32-bit or 64-bit using MinGW-w64, so I abandoned the attempt as my main use of JSDB is as a &#8220;command-line data-crunching tool&#8221; similar to, and used along side, <a href="http://code.google.com/p/csvfix/">CSVFix</a> and <a href="http://stahlworks.com/dev/swiss-file-knife.html">SFK (Swiss File Knife)</a>. Having the ability to call JavaScript in-process was relatively new and I could live without it.</p>
<p>More worrying was the problem with Python embedding, in-process Python would be harder to live without. The<a href="http://code.google.com/p/apsw/"> APSW SQLite library </a>which I had used is 32-bit only. Luckily the Python 2.7 version of its SQLite3 standard module  (aka pysqlite) now allows the loading of SQLite C extensions. This enables me to load databases under Python and extract the C handle using a specially written extension, thus enabling Excel/VBA to attach to a Python opened SQLite shared memory.</p>
<p>Without this new  loaded extension trick I would have had to modify the SQLite3 library itself as the previous 2.6 version would not divulge SQLite&#8217;s handle, while APSW did, which was  the reason I picked APSW in the first place.  As a result, xLite&#8217;s Python functionality now requires <a href="http://python.org/download/releases/2.7/">Python 2.7</a>.</p>
<p>So the end result is a somewhat reduced-functionality xLite  (no in-process JavaScript, missing APSW functionality such as Python-based SQLite virtual tables), but running on the ultimate data-smithing platform:</p>
<ul>
<li>Excel 64-bit combining with</li>
<li>the relational power of SQLite 64bit,</li>
<li>the fast and easy scripting power of Python 64-bit,</li>
<li>and topped off with the king of pivots, 64-bit PowerPivot.</li>
</ul>
<p><span style="font-family:Georgia, 'Bitstream Charter', serif;line-height:23px;font-size:14px;"> A week well spent, I think!</span></p>
<p>Oh, I&#8217;ve also decided to rename the add-in to MicroETL. This is mainly to reflect the fact that xLite (SQLite embedded in Excel) is just one element within the tool. The  pure-VBA <a href="http://www.4guysfromrolla.com/webtech/080101-1.shtml">detached-ADO</a> recordset functionality, embedded Python and xLiteScript elements can exist independently of xLite.  That, and I&#8217;m fed-up getting enquiries about X-Lite <a href="http://www.counterpath.com/x-lite.html">http://www.counterpath.com/x-lite.html</a> and I own the http://www.microETL.com URL <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/1151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/1151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/1151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/1151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/1151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/1151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/1151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/1151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1151&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/09/25/the-64-bit-question-and-the-birth-of-microetl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>

		<media:content url="http://gobansaor.files.wordpress.com/2010/09/64or32-clear.png?w=300" medium="image">
			<media:title type="html">64or32-clear</media:title>
		</media:content>
	</item>
		<item>
		<title>Micro ETL in the PowerPivot age</title>
		<link>http://blog.gobansaor.com/2010/08/20/micro-etl-in-the-powerpivot-age/</link>
		<comments>http://blog.gobansaor.com/2010/08/20/micro-etl-in-the-powerpivot-age/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 18:23:24 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[microETL]]></category>
		<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[decision support]]></category>
		<category><![CDATA[micro ETL]]></category>
		<category><![CDATA[Star Schema]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=1089</guid>
		<description><![CDATA[Although PowerPivot has many of the characteristics of an ETL tool, i.e. the ability to connect to disparate datasources, to filter that data and to transform it, it will still hit a brick wall when confronted by the typical data spewed &#8230; <a href="http://blog.gobansaor.com/2010/08/20/micro-etl-in-the-powerpivot-age/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1089&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Although <a class="zem_slink" title="PowerPivot" href="http://www.powerpivot.com/" rel="homepage">PowerPivot</a> has many of the characteristics of an ETL tool, i.e. the ability to connect to disparate datasources, to filter that data and to transform it, it will still hit a brick wall when confronted by the typical data spewed out by operational systems. I&#8217;m sure this is by design as a sophisticated ETL tool is both complex to design and, probably even more relevant, is difficult to use.</p>
<p>Mind you, a few years back we IT pros would have said the same about front-end BI cube configuration, and behold today we have tools such as PowerPivot that prove that this doesn&#8217;t always hold true. Perhaps subsequent versions of PowerPivot will do the same for ETL as it has for BI cubes. In the mean time much of the necessary ETL will have to take place prior to loading into PowerPivot.  But where?</p>
<p>First off, what&#8217;s ETL?</p>
<p>The term ETL applies to one of the trinity of activities that have, over the last two decades or so, been at the heart of reporting/decision support systems. The other two terms: DW (data warehousing)  &amp; BI (business intelligence), are sometimes used to refer to the whole process but can also be used to refer to two distinct sub-processes. Confused? Well, so you should be; these terms have been abused and redefined by scores of vendors over the years but for our purpose here we&#8217;ll stick to their roles as acronyms for the two of the  processes involved in the preparation &amp; presentation of reporting data.</p>
<p>BI is the term now most commonly associated by non-IT folks with decision support systems, as it&#8217;s role is the most obvious i.e. front-end presentation and manipulation of data; the dashboards, pivots, charts, summary lists etc&#8230;</p>
<p>DW, data warehousing, is the term that most IT people who&#8217;ve been in the business for a while would use to describe the techniques, best practice etc. associated with this area. The heart of traditional DW was the data warehouse itself, a mighty repository of historical data optimized for reporting purposes. When DW as a concept started it was very rare indeed for operational (OLTP) systems to hold transactional data for more that a few weeks, usually just long enough to get through month-end.  Such specially built datastores&#8217; days may be numbered as the data capacity of operational systems grow and the data munching ability of new ETL techniques (<a href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a> for example) to transform vast amounts of data continues to increase.</p>
<p>ETL stands for Extract,Transform and Load; sometimes also styled, ELT, extract load &amp; transform (PowerPivot would fall into this catergory). This is the process which traditionally swallowed most of the development budget in DW/BI projects (and kept me gainfully employed for years). It was the area where the dark arts of datasmiths collided with the often frightening reality of raw untamed data, with the added venom of corporate-politics-driven &#8220;data ownership&#8221; battles.  A messy business, and continues to be, even in these days of open data and open <a class="zem_slink" title="Application programming interface" href="http://en.wikipedia.org/wiki/Application_programming_interface" rel="wikipedia">APIs</a>.</p>
<p>ETL tools vary from text-editor written SQL to hugely expensive point&#8217;n'click ETL packages. Packaged ETL vendors promised (and continue to do so) that their tools would vanquish the dark arts of datasmiths with products that were so easy to use that the CEO would chip in with a few scripts to get the project finished. The reality was that IT types  found they had to learn yet another sub-optimal &#8220;language&#8221; and more often than not had to drop-down to &#8220;proper&#8221; languages to actually drive the thing to completion. ETL was (and still largely is) the preserve of IT.</p>
<div id="attachment_1100" class="wp-caption alignleft" style="width: 310px"><a href="http://gobansaor.files.wordpress.com/2010/08/herding-cats.jpg"><img class="size-medium wp-image-1100 " title="Herding Cats" src="http://gobansaor.files.wordpress.com/2010/08/herding-cats.jpg?w=300&#038;h=173" alt="" width="300" height="173" /></a><p class="wp-caption-text">ETL is easier than herding cats but just about ...</p></div>
<p>The tools have improved a lot since those early days and open source has at least removed for some the 6 figure licensing costs from the equation. ETL, <a href="http://technologizer.com/2010/08/13/google-app-inventor/">like programming in general</a>, is hard, so get over it. Tools, basic knowledge of SQL and data modelling skills can help to make ETL approachable to non-IT types, but it still has the potential to make your head hurt.</p>
<p>So what&#8217;s a PowerPivot&#8217;r to do?</p>
<p>If your organisation already has a data warehouse in place you&#8217;re in luck as it&#8217;s quite likely a lot of the data you require will exist in the optimal PowerPivot import format, <a href="http://blog.gobansaor.com/2010/07/09/star-schemas-to-boldly-go-where-no-excel-spreadsheet-has-gone-before/">i.e. a star schema</a>. You might be out of luck though, a significant percentage of DWs will not have used dimensional modeling and you could find yourself looking a complex <a href="http://en.wikipedia.org/wiki/Online_transaction_processing">OLTP like</a> data model. In that case, and in the case of pulling the data directly from an operational system, you&#8217;re in the micro ETL business. Even if your IT infrastructure provides you with cleansed and understandable data, you&#8217;ll be faced with integrating external or<a href="http://vaughanmerlyn.com/2008/07/22/shadow-it-the-good-the-bad-and-the-ugly/"> shadow-IT</a> data (probably one of the main reasons why PowerPivot appeals); again you&#8217;ll either need IT support or else you must learn how to do it yourself.</p>
<p>Long before the likes of PowerPivot appeared I regularly found myself  in need of a micro ETL toobox i.e. a set of tools that would enable me to quickly and cost-effectively prepare data for loading into some system or other. Nine out of ten times that system was an Excel <a class="zem_slink" title="Pivot table" href="http://en.wikipedia.org/wiki/Pivot_table" rel="wikipedia">PivotTable</a> (the rest of the time it was usually a master data take-on task or some variation of systems&#8217; commissioning). Although the consumers of my datasmithing services would most likely assume that I used Excel alone to perform these works of wonder, I usually had an Oracle database (along with its data loaders and superb PL/SQL language) as my secret ingredient. This combination of Excel and Oracle served me (and my clients) well, but it wasn&#8217;t the Oracle bit that gave me the edge; I could, and did, substitute SQL Server and MS Access for the SQL layer. The real trick was the combination of Excel&#8217;s flexibility/presentational strengths with SQL&#8217;s list handling power.</p>
<p>The problem with this approach was that the interface between the SQL engines &amp; the spreadsheets often involved quite a number of manual steps, and the presence of database software (even MS Access) could not always be depended on. It took my discovery of <a class="zem_slink" title="SQLite" href="http://sqlite.org/" rel="homepage">SQLite</a> to enabled me to finally combine the two worlds; <a href="http://www.gobansaor.com/microetl/">microETL was born</a>!</p>
<p>This combination of Excel, and an in-process SQL engine (provided by SQLite) with the added optional ability to call either VBA or Python scripts, has provided me with a hugely flexible and powerful micro ETL tool. Now, with the arrival of PowerPivot, I have both the micro ETL and micro BI tools to build cost-effective Excel-based decision support systems.</p>
<p>Being Excel based, means that the end result is delivered in a format that many business people are comfortable with; PowerPivot is designed very much with &#8220;civilian&#8221; datasmiths in mind. Likewise, microETL&#8217;s ability to use VBA, simple SQL and Excel formula to perform data transformations makes a large part (if not all) of the ETL process &#8220;civilian friendly&#8221;.</p>
<p>I&#8217;m not saying that everything I can do with microETL will be as easy for an non-IT datasmith; many datasources are either too difficult and/or extremely time consuming for end-users to navigate; but much of the business logic can be expressed in Excel terms with the highly technical or time-consuming tasks handled by SQL or VBA/Python/JavaScript. <a href="http://www.gobansaor.com/microetl/?1">MicroETL</a> is not only for once-off transformations but can also be used to automate ETL, report generation and refresh tasks (including refreshing PowerPivot itself).</p>
<p>So, if you&#8217;re thinking about utilising PowerPivot, but need help in preparing your data and automating the tasks involved, <a href="http://www.gobansaor.com/microETL-fix-my-list/?1">perhaps we should talk.</a></p>
<p>UPDATE:</p>
<p>I&#8217;m in the process of developing an off-shoot of mciroETL called HAMMER which I believe will be even more suitable as a micro ETL tool for the PowerPivot age. You can follow it&#8217;s progress <a href="http://blog.gobansaor.com/category/hammer/">here &#8230;</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/1089/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=1089&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/08/20/micro-etl-in-the-powerpivot-age/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>

		<media:content url="http://gobansaor.files.wordpress.com/2010/08/herding-cats.jpg?w=300" medium="image">
			<media:title type="html">Herding Cats</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript as an Excel scripting language via JSDB</title>
		<link>http://blog.gobansaor.com/2010/06/04/javascript-as-an-excel-scripting-language-via-jsdb/</link>
		<comments>http://blog.gobansaor.com/2010/06/04/javascript-as-an-excel-scripting-language-via-jsdb/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 17:44:59 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSDB]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=953</guid>
		<description><![CDATA[A few years back I posted about JavaScript as an Excel scripting language via ExcelDNA. That involved using JavaScript (in the guise of JScript.NET) as an ExcelDNA scripting language. It was purely an academic exercise to prove it could be done, I continued &#8230; <a href="http://blog.gobansaor.com/2010/06/04/javascript-as-an-excel-scripting-language-via-jsdb/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=953&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few years back I posted about <a href="http://blog.gobansaor.com/2007/10/04/javascript-as-an-excel-scripting-language-via-exceldna/">JavaScript as an Excel scripting language via ExcelDNA</a>. That involved using JavaScript (in the guise of JScript.NET) as an <a href="http://exceldna.typepad.com/">ExcelDNA </a> scripting language. It was purely an academic exercise to prove it could be done, I continued to use C# (or increasingly VB.NET) to build .NET user defined functions. This time however, I&#8217;ve managed to embed JavaScript (in the guise of <a href="http://www.mozilla.org/js/spidermonkey/">Mozilla Foundation&#8217;s SpiderMonkey</a>) directly via a native C interface not to prove I could do it (even though there&#8217;s a definite satisfaction in simply doing it) but to use it.</p>
<p>Why add another scripting language to xLite, hasn&#8217;t it already got Python?</p>
<p>True, Python is and remains a very powerful add-on to <a href="http://www.gobansaor.com/xlite">xLite</a>. It&#8217;s a mature and long-established language, popular amongst IT professionals and &#8220;citizen programmers&#8221; alike. But, it&#8217;s a bit of a monster and can be awkward to package, particularly on Windows. By using <a href="http://www.py2exe.org/index.cgi/Tutorial">Py2Exe</a> and after a lot of digging on <a href="http://groups.google.com/group/wxPython-users/msg/dfad0122afda5d21?pli=1">the issue of manifest files</a> I have managed to package and isolate xLite&#8217;s Pythonic bits so that it can be used on a PC without first installing the required Python version (<del datetime="2010-06-11T10:46:38+00:00">I&#8217;ve only tested against V2.6, Python&#8217;s lack of a side-by-side Windows installation capability is a major pain-in-the-butt</del> bad news: tested against Python 2.5 &amp; it doesn&#8217;t work; good news: side-by-side is possible; simply change the system path to reflect which-ever version you wish to run at the command line; xLite will (must) continue to use V2.6). <del datetime="2010-06-11T10:47:57+00:00">This &#8220;version-hell&#8221; mitigates against using Python as a core-element of xLite, fine for those of us who are comfortable with and require the full power of Python, but not as the tool&#8217;s primary scripting environment.</del></p>
<p>No, what I need is:</p>
<ul>
<li>a light (single EXE or DLL preferably) and an approachable popular language,</li>
<li>with native SQLite support,</li>
<li>runable as standalone executable (on both Windows &amp; Linux),</li>
<li>embeddable (is that a word?) in Excel via VBA-friendly DLL.</li>
</ul>
<p>Add to that essential list some nice-to-haves such as:</p>
<ul>
<li>native COM-interface support (for the likes of ADO etc.),</li>
<li>native networking support, for HTTP, raw TCP sockets etc.,</li>
<li>native (and easy to use) XML and JSON parsers and emitters,</li>
<li>ability to spawn detached/attached command line processes and the ability to stream data to and from such processes; allowing me to easily orchestrate &amp; provide a &#8220;grid&#8221; of processes (scripted, command line executables, Excel instances) both local and remote (with remote being either traditional servers, http servers or <a href="http://hadoop.apache.org/common/docs/current/streaming.html">Hadoop Streaming</a> grids).</li>
</ul>
<p>While looking at the various implementations of Javascipt as a server/shell language, I came across <a href="http://www.jsdb.org/">JSDB &#8211; JavaScript for Databases</a>. It&#8217;s a C++ wrapper around Mozilla&#8217;s SpiderMonkey, with lots of useful data related utility classes added. To make JSDB a perfect fit it simply required:</p>
<ul>
<li>a few minor changes to the <a href="http://www2.gobansaor.com/share/wrap_sqlite.cpp">SQlite class</a> (allow the loading of Virtual Table extensions, add the ability to pass in the address of already open SQLite memory structures);</li>
<li>a linker change to use the DLL version of SQLite;</li>
<li>plus a <a href="http://bit.ly/aNYRCk">VBA-friendly DLL wrapper</a> ( &amp; <a href="http://bit.ly/dynHWD">VBA declares</a>, to call the <a href="http://bit.ly/arH2fB">DLL</a>) to replace the JSDB shell when embedding in Excel.</li>
</ul>
<p>From my <a href="http://blog.gobansaor.com/2009/03/14/sqlite-as-the-mp3-of-data/">SQLite as the MP3 of Data</a> post:  &#8221;<em>Just as &#8220;fractional horsepower” electrical motors revolutionised manufacturing and eventually all our lives (car starter-motors, fridge motors, washing machines etc.), “fractional horsepower” databases can do the same for data. Distributing data to where it is needed.&#8221; </em>I can now add a distributed &#8220;fractional horsepower&#8221; processing engine for that distributed data. This transforms <a href="http://www.gobansaor.com/xlite">xLite</a> from a micro-ETL platform into one capable of handling (or at least orchestrating) practically any ETL (Extract, Transform &amp; Load),DI (data integration) or &#8220;Time Asset&#8221; (<a href="http://blog.gobansaor.com/2010/05/12/time-assets/">see this post</a>) process.</p>
<p>UPDATE:</p>
<p>Here&#8217;s a VBA source with examples of using the embedded JSDB engine:</p>
<p><a href="http://www2.gobansaor.com/share/example_jsdb_vb_embed.bas">http://www2.gobansaor.com/share/example_jsdb_vb_embed.bas</a></p>
<p>&#8230; and the source code for the DLL wrapper:</p>
<p><a href="http://www2.gobansaor.com/share/wrap_sqlite.cpp">http://www2.gobansaor.com/share/wrap_sqlite.cpp</a></p>
<p>&#8230; plus the VBA Declares and helper Windows APIs:</p>
<p><a href="http://www2.gobansaor.com/share/jsdb.bas">http://www2.gobansaor.com/share/jsdb.bas</a></p>
<p>UPDATE:</p>
<p>See JSDB being used to front-end Excel as a web service <a href="http://blog.gobansaor.com/2011/02/06/excel-as-a-diy-web-service/">http://blog.gobansaor.com/2011/02/06/excel-as-a-diy-web-service/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/953/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=953&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/06/04/javascript-as-an-excel-scripting-language-via-jsdb/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
		<item>
		<title>SAX and Bugs and XBRuLe</title>
		<link>http://blog.gobansaor.com/2010/05/06/sax-and-bugs-and-xbrool/</link>
		<comments>http://blog.gobansaor.com/2010/05/06/sax-and-bugs-and-xbrool/#comments</comments>
		<pubDate>Thu, 06 May 2010 12:26:10 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[business reporting]]></category>
		<category><![CDATA[SAX]]></category>
		<category><![CDATA[SAX2 MSXML]]></category>
		<category><![CDATA[XBRL]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=908</guid>
		<description><![CDATA[Okay, the XBRuLe is a bit laboured, should be SAX &#38; bugs &#38; XBRL, but any excuse to play some Ian Dury Bugs (the programming type, not the creepy-crawlies), Simple API for XML and Extended Business Reporting Language;  these represented &#8230; <a href="http://blog.gobansaor.com/2010/05/06/sax-and-bugs-and-xbrool/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=908&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay, the XBRuLe is a bit laboured, should be <a href="http://en.wikipedia.org/wiki/Simple_API_for_XML">SAX</a> &amp; bugs &amp; <a href="http://www.xbrl.org/Home/">XBRL</a>, but any excuse to play some Ian Dury <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<span style="text-align:center; display: block;"><a href="http://blog.gobansaor.com/2010/05/06/sax-and-bugs-and-xbrool/"><img src="http://img.youtube.com/vi/gBLeVcP_JQg/2.jpg" alt="" /></a></span>
<p>Bugs (the programming type, not the creepy-crawlies), Simple API for XML and Extended Business Reporting Language;  these represented the trinity of my concerns for the last three weeks  or so.</p>
<h3>First, the bugs:</h3>
<p>Several weeks back, I decided that the C portion of <a href="http://www.gobansaor.com/xLite">xLite</a> needed an overhaul. The codebase contained a lot of stuff that I no longer used and also contained code that I&#8217;d written when I first re-started using C (after a lapse of 20 years or so, the phrase &#8220;I&#8217;d forgotten more than I&#8217;d ever known&#8221; sums up the experience best); some of this code was <a href="http://en.wikipedia.org/wiki/Memory_leak">memory-leaking</a> like a sieve.</p>
<p>Also, the original Pivotal Solutions code was not UTF-8 enabled, instead it used the host pc&#8217;s default character set codepage, this needed to change (if you don&#8217;t know what I&#8217;m talking about see <a href="http://www.joelonsoftware.com/articles/Unicode.html">Joel Spolsky&#8217;s lecture </a>to the developers of the world &#8211; well actually, primarily to those of us in the Anglo-Saxon &#8220;ascii-will-do-fine&#8221; world).</p>
<p>The bugs I introduced as a result of this upgrade were not of the logical kind but of a much nastier type, peculiar to the low-level world of C, &#8220;bad free()&#8221; bugs!</p>
<p>Excel was no longer leaking memory (well no more than it normally does) but it was crashing randomly (usually in a DDL called VB7, 1st upgrade to classic VB in over a decade!), a sure sign I was freeing memory that was not mine to free. Two days later, I&#8217;d tracked the bugs down, but only by a painful line by line code walk-through. If you&#8217;ve no idea what I&#8217;m talking about here, count your blessings and move on.</p>
<p>The other major change I added to xLite is the ability to code <a href="http://www.drdobbs.com/database/202802959">SQLite Virtual Tables</a> in VBA. The Python side of xLite has always had that facility, but I look on Python as a nice-to-have add-on, not as a core component. The growing need for &#8220;core&#8221; virtual tables meant either coding them in C or in VBA, see previous paragraphs for why VBA won the day.</p>
<p>The immediate driver for adding both UTF-8 support and quick-to-build virtual tables was the need to better handle XML data within xLite.</p>
<h3>&#8230; then the SAX:</h3>
<p>For small XML/HTML datasets, I, like the rest of the world, use DOM manipulation; but for larger sets I&#8217;ve tended to go down the <em>brute force and ignorance</em> approach of hand coded File I/O combined with <a href="http://blog.gobansaor.com/2008/07/01/regular-expressions-as-an-end-user-programming-tool/">regular expressions</a> to efficiently parse out the data required.</p>
<p>Last week, an email from a datasmith name Cathy prompted me to look into using Sax for loading XML. Cathy, like most datasmiths, is not a professional programmer, she has a &#8220;real job&#8221;; part of that job is analysing large datasets, she&#8217;s learned enough programming (mainly Access &amp; Excel) to do that job more efficiently. The data she needed to parse this time was encoded in XML, but being very large and built on a schema that constantly changed, the default <a href="http://en.wikipedia.org/wiki/Document_Object_Model">DOM</a> approach overpowered both Access and Excel.</p>
<p>Cathy had originally contacted me looking for information on using <a href="http://blog.gobansaor.com/2008/08/02/talend-sqlite-groovy-the-new-oracle/">Talend</a> to read the data and it looked like she was about to start a new side-career as a Java programmer. I figured there must be a way for her to leverage her existing skill-set (VBA) &amp; this led me to <a href="http://msdn.microsoft.com/en-us/library/ms762776(VS.85).aspx">MSXML&#8217;s implementation of SAX2</a>. She was delighted; although many of the concepts would have been new to her, at least they were bounded within a world she was already comfortable with (the basis of how we all manage to incrementally expand our knowledge).</p>
<p>The only problem was, the example code no longer existed (it would have been in VB6, but who uses that these days, other than a few million VBA para-programmers, <em>let them eat the .NET cake</em>). So I coded up the first example in Excel/VBA and <a href="http://bit.ly/bdLBJS">here it is if you need a quick-start to the joys of SAX2</a>.</p>
<h3>Which leads me on to XBRuLe:</h3>
<h6><em>&#8220;One XML to rule</em><em> them all, One XML to find them, One XML to bring them all and in the darkness bind them&#8230;&#8221;</em></h6>
<p>A former colleague of mine when explaining his computer science studies to <a href="http://en.wikipedia.org/wiki/County_Meath">Meath</a> farmers whom he regularly met while hitch-hiking home from college (mid-1970s) was usually met with the response: <em>&#8220;Ah computers, dere de </em><em>comin</em><em>&#8216; </em><em>t&#8217;ing</em><em>&#8220;</em>. XBRL has been the <em>coming thing</em> for quite a while now.</p>
<p>Being in the business of Business Reporting, XBRL has always been on the radar, and of late, the radar is showing incoming fire. First the <a href="http://hitachidatainteractive.com/2010/01/11/xbrl-filings-for-the-sec-not-for-the-faint-of-heart-part-iv/">SEC</a>, and now the <a href="http://www.hmrc.gov.uk/ebu/ct_techpack/index.htm">UK&#8217;s </a><a href="http://www.hmrc.gov.uk/ebu/ct_techpack/index.htm">HMRC</a>, are mandating it as a filing method. Whether this is a good thing or not, is open to question. As this article puts it: &#8220;XBRL is a  case study in complexity&#8221; <a rel="nofollow" href="http://bit.ly/951oEY" target="_blank">http://bit.ly/951oEY</a> &#8220;the producer of the sample must have suffered a polymorphic recursive brain meltdown&#8221;.</p>
<p>But needs be; I&#8217;m in the business of shaping difficult data, so I&#8217;ve started to re-acquaint myself with the subject (last time I looked at XBRL in any depth was 2004). Part of that process will be to beef-up xLite&#8217;s XML capability, which, with me being on the table side of the <a href="http://blog.gobansaor.com/2007/03/03/tables-vs-xml-the-data-lingua-franca-debate/">&#8220;Tables Vs. XML; the data lingua franca debate</a>&#8220;, will involve getting the data into a relational form at the earliest possible moment. For example, for discovery I would use a classic parent-child recursive structure, but not having something like <a href="http://www.adp-gmbh.ch/ora/sql/connect_by.html">Oracle&#8217;s Start-with</a>, adding  a virtual table to make navigating such hierarchies easier with SQLite.</p>
<p>If anybody is peddling to you the concept that this brave new word of XBRL powered reporting will make your business reporting life easier, they&#8217;re either lying or don&#8217;t fully understand what they&#8217;re selling. As 19th century industrialists were wont to say: &#8220;Where there&#8217;s muck, there&#8217;s brass&#8221;; and with XBRL, you&#8217;ll be up to your <a href="http://www.medterms.com/script/main/art.asp?articlekey=25484">oxters</a> in muck, but with the brass all flowing to others, perhaps even to me!</p>
<div><span style="font-family:'Lucida Grande', sans-serif;line-height:16px;font-size:14px;"><span class="status-content" style="margin:0;padding:0;"><span class="entry-content" style="margin:0;padding:0;"><br />
</span></span></span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/908/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/908/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/908/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/908/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/908/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/908/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/908/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/908/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=908&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/05/06/sax-and-bugs-and-xbrool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
		<item>
		<title>Excel as a document-oriented NoSQL database</title>
		<link>http://blog.gobansaor.com/2010/03/02/excel-as-a-document-oriented-nosql-database/</link>
		<comments>http://blog.gobansaor.com/2010/03/02/excel-as-a-document-oriented-nosql-database/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:48:44 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[data]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[CouchDb]]></category>
		<category><![CDATA[document oriented]]></category>
		<category><![CDATA[NoSQL]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=877</guid>
		<description><![CDATA[I&#8217;ve been a long time fan of CouchDB, one of the many NoSQL databases to appear in the last few years. CouchDB is a document-oriented database, which with solid B-tree indexing and easy replication, topped off by a MapReduce style view &#8230; <a href="http://blog.gobansaor.com/2010/03/02/excel-as-a-document-oriented-nosql-database/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=877&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a <a href="http://blog.gobansaor.com/2007/09/14/couchdb-doucument-centric-ods/">long time fan of CouchDB</a>, one of the many <a href="http://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a> to appear in the last few years. <a href="http://couchdb.apache.org/">CouchDB</a> is a document-oriented database, which with solid <a href="http://en.wikipedia.org/wiki/B-tree">B-tree indexing</a> and easy replication, topped off by a <a href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a> style view mechanism, puts it up there as a best-of-breed noSQL datastore.</p>
<p>Now it may seem strange that somebody whose <em><strong><a href="http://blog.gobansaor.com/2008/12/18/sql-does-exactly-what-it-says-on-the-tin/">SQL &#8211; does exactly what it says on the tin</a></strong></em> post clearly marks him out as an RDBMS fanboy, can also sing the praises of a noSQL database. Are they not mutually exclusive? To many, particularly in the noSQL world, this appears to be the case, with some clearly determined to re-invent the wheel, ignoring the lessons learned by relational database practitioners.</p>
<p>The main advantage to me of document-oriented databases, such as CouchDB, is the ease of setup and subsequent pain-free evolution of data models that comes with a <a href="http://blog.mongodb.org/post/119945109/why-schemaless">schema-less</a> database. The main disadvantage is the relative rigidity of downstream analysis built into most such databases. MapReduce, such as used by CouchDB, is fine for predefined views developed by programmers, but as we know, reporting never stops; datastores front-ended by a SQL interpreter open up the data within to a much wider audience (be that through hand-crafted SQL queries or more likley via reporting-tool generated SQL)</p>
<p>Of course document-oriented, noSQL, schema-less datastores have been all the rage with end-users for close on 30 years. They&#8217;re called spreadsheets. Excel has over the years added features (such as list handing &amp; filtering) that have made the spreadsheet the database of choice for millions. Anybody who deals in corporate data is aware (sometimes painfully aware) of just how much data is stored in these Data Populi repositories.</p>
<p>I, as an IT professional, am aware that Excel workbooks as books-of-record, have been, and continue to be, the cause of many data quality problems. Yet, I&#8217;ve also seen, and am myself responsible for, many successful Excel &#8216;database implementations&#8217;. Take for example, my filing system.</p>
<p>I don&#8217;t have a filing cabinet, instead I use small stackable cardboard boxes to store documents. As I receive or generate documents I simply place them in the current open box. Every so often, usually prompted by a VAT or other tax return deadline looming, I record what&#8217;s in the box, and if the box is looking full or maybe it&#8217;s end-of-year, I&#8217;ll &#8216;close&#8217; the box and open a new one.</p>
<p>Each box is represented by a separate workbook, each document by a separate worksheet. Some documents such as electronic Sales Invoices may not require a physical copy simply a link to a PDF, but I still tend to store a printed copy. Others, such as Purchase Invoices, have their details manually copied from the original paper based document, I usually also add a hyperlink to an image of the source document. (I no longer use my scanner, instead I use my phone camera to record paper documents).</p>
<p>Bank reconciliation involves recording the bank item ref against the appropriate document and linking back to the Bank Statement worksheet  (which as I still receive paper-statements consists simply of a link to a photo of the statement and basic info such as date of statement and whether or not I&#8217;ve reconciled it).</p>
<p><a href="http://www.revenue.ie/en/tax/vat/index.html">VAT Return</a> documents are generated using links back to source documents and a link to an image of the completed paper return (not yet signed up for <a href="http://www.revenue.ie/en/online/ros/index.html">ROS</a>). Similar documents are generated for year-end tax returns &amp; accounts.</p>
<p>So my &#8216;filing system&#8217; is also my &#8216;accounts system&#8217;. This is common practice amongst small (and not so small) businesses. The advantage of this approach rather than using a &#8220;proper accounts system&#8221;  is the simplicity and the in-depth knowledge it forces me to have of &#8216;my data&#8217;.</p>
<p>But can this type of thing scale, and what of the businesses that are using similar systems to manage thousands or indeed 10s of thousands of documents or transactions? The simple answer is no,  at least not without a semi-automated process and a cost-effective means of analysing the data; many such systems are on the road to disaster. That disaster may take the form of data quality issues or the significant (and often hidden) cost of operating such systems (often the operators are highly paid accounting staff or managers whose cost is buried in general overhead costs, unlike internal or external IT resources whose time tends to be project allocated).</p>
<p>But again, I and others, have managed to setup systems such as these that were  cost-effective (not just in initial construction but in ongoing running costs) and managed to maintain data quality. This usually involved building a simple work-flow process, automating to some degree but keeping the human touch as much as possible. My <a href="http://www.gobansaor.com/xlite">xLite datasmithing platform</a> had its beginnings in such RSS (Really Simple Systems) scenarios. Many such &#8220;systems&#8221; were IT driven <a href="http://en.wikipedia.org/wiki/Extract,_transform,_load">ETL</a> processes or data cleansing initiatives, others, business initiatives such as sales planning/budgeting or customer surveys.</p>
<p>I haven&#8217;t used <a href="http://www.gobansaor.com/xlite">xLite</a> to automate my filing system (my transactional volumes are too low and my motto when it comes to systems is, &#8220;good enough&#8221; will do), instead, relying on standard spreadsheet formulas and few bits of VBA, but if I suddenly found myself at the business end of a fire-hose of documents I could easily do so.</p>
<p>Much like CouchDB, I could  create &#8216;map&#8217; views of my documents, but instead of MapReduce Javascript code, I&#8217;d  load the documents into SQLite tables (using a <a href="http://en.wikipedia.org/wiki/Duck_typing">duck typing approach</a>; if the document had the required data, e,g, Invoice No, etc. for Sales Invoices, load, otherwise ignore). The &#8216;reduce&#8217; part would then be standard SUM(), Group By SQL statements.</p>
<p>I could also mine the documents for text and then use SQLite&#8217;s <a href="http://sqlite.org/fts3.html">FTS full-text searching</a> to create a free-format search index or use<a href="http://blog.gobansaor.com/2009/09/29/tag-cubes-sqlite-star-query-part-iii/"> xLite&#8217;s TAG Cube functionality</a> for a more formal, hierarchy supporting, tagging index.</p>
<p>If I needed to share the system with others in my organisation I could use a light simple distributed version control system such the<a href="http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki"> SQLite based  Fossil</a>. This would allow for many of the replication benefits that CouchDB offers.</p>
<p>In fact, if I wanted to backend the system with a server based database I could call in the services of CouchDB itself. Easily done as xLite has inbuilt Python support and the library that xLite uses to interact with SQLite on the Python side is <a href="http://code.google.com/p/apsw/">APSW</a>. And guess what, APSW now includes a <a href="http://apsw.googlecode.com/svn/publish/vtable.html#virtualtables">virtual table implementation</a> that lets you <a href="http://apsw.googlecode.com/svn/publish/couchdb.html">access CouchDB databases from SQLite</a>. Excel as a front-end to CouchDB!</p>
<p>If the &#8216;<a href="http://ronanfitzgerald.net/everythingelse/?p=8">it does exactly what it says on the tin</a>&#8216;  Ronseal catch-phrase epitomises SQL  then perhaps <a href="http://www.comparethemeerkat.com/my-tv-ads">&#8216; Simples</a>&#8216; as <a href="http://www.guardian.co.uk/media/2010/jan/16/aleksander-orlov-price-comparison-ads">Alexandr the Meerkat</a> might say epitomises the potential of document-based databases.</p>
<p style="padding-left:30px;"><strong>For more of the same see <a href="http://blog.gobansaor.com/2011/05/05/excel-document-oriented-database-with-python-map-sql-reduce/">Excel &#8211; Document Oriented database with Python Map Reduce</a></strong></p>
<p style="text-align:right;"><em>Why not join me on Twitter at </em><a href="http://www.twitter.com/gobansaor"><em>gobansaor</em></a><em>?</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/877/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=877&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/03/02/excel-as-a-document-oriented-nosql-database/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
		<item>
		<title>Excel 2010 Application.Caller Bug</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/</link>
		<comments>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 20:45:04 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[Application.Caller]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[Excel 2010]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851</guid>
		<description><![CDATA[I&#8217;ve just released another xLite &#8220;introduction&#8221;, this time the xLiteWorkbookFunction function. I&#8217;ve had most of the now released functionality working (and in use) for quite a while but had delayed publishing until I&#8217;d installed Excel 2010 as I&#8217;d wished to &#8230; <a href="http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=851&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released another <a href="http://www.gobansaor.com/xlite">xLite &#8220;introduction&#8221;</a>, this time the <a href="http://www.gobansaor.com/introducing-xlite/xliteworkbookfunction">xLiteWorkbookFunction</a> function. I&#8217;ve had most of the now released functionality working (and in use) for quite a while but had delayed publishing until I&#8217;d installed Excel 2010 as I&#8217;d wished to test against a modern Excel version.</p>
<p>I&#8217;d not bothered with Excel 2007, as I couldn&#8217;t see the advantage over Excel 2003, but Excel&#8217;s new <a href="http://www.powerpivot.com/">PowerPivot</a> is one hell of a reason to upgrade to 2010. I&#8217;d preformed a quick test against 2007 by installing a trial version on an EC2 Window&#8217;s image and it had appeared to work fine; but it was a different story under 2010,strange things started to happen.</p>
<p>The core functionality, as tested by VBA code, worked OK but when I tested using xLite.SQL as a UDF (a user defined &#8220;formula&#8221;) things fell apart. For an explanation of what the xLite.SQL function is and why I wasn&#8217;t that surprised when it started to act up, <a href="http://www.gobansaor.com/introducing-xlite/introducingthesqlfunction">see here</a>. As xLite.SQL plays to the rules rather than the spirit of a UDF, I assumed it was pay back time  for my blasé ignoring of functional programming constraints and I set about tracking down the cause.</p>
<p>It turns out the cause is a change in behaviour (a bug) whereby in certain circumstances the cell range returned by Application.Caller is not, as one would expect, the cell hosting the called UDF but that cell more usually associated with Application.ActiveCell (i.e. most likely the cell where the cursor currently resides).</p>
<p>Why is this a problem and what is Application.Caller usually used for? The most common use I&#8217;ve made of Application.Caller is to determine whether a VBA function had been called from a cell as a UDF or from a menu, button or some VBA code. This is important because when called in UDF mode, a function must be side-effect free, i.e. its only affect on the workbook is the return value; attempting anything else will silently fail (or in extreme cases, abort Excel). This functionality is not affected by &#8220;the bug&#8221; as the usual method of achieving this is by &#8230;</p>
<p>If IsObject(Application.Caller) Then</p>
<p>&#8230; this will work even if Application.Caller returns .ActiveCell, as both are objects.</p>
<p>If however, various properties of that range need to be interrogated (such as the actual address or the formula text that xLite.SQL requires) then Application.Caller in certain circumstances returning the .ActiceCell range rather than the calling cell&#8217;s range causes problems. I&#8217;ve managed to get around these problems by adding an extra parameter (homeCell) to xLite.SQL which the function will auto populate on first entry (when Application.Caller and .ActiveCell are guaranteed to be the same object). For example, a SQL call entered in cell A2 of Sheet1 as ..</p>
<p>=SQL(&#8220;Select name from sqlite_master&#8221;)</p>
<p>is automatically rewritten as &#8230;</p>
<p>=SQL(&#8220;Select name from sqlite_master&#8221;,,,,,,&#8221;[test.xls]Sheet1!$A$2&#8243;)</p>
<p>Not ideal but it gets around the problem in the short term.  Long term I may do a version for sub-2010 reverting back to original dependence on Application.Caller. As xLite studiously avoids Excel&#8217;s UI features such as menus/ribbons I&#8217;d hope to avoid different versions for pre/post ribbon editions, but needs must.</p>
<p>The xLiteWorkbook example (test_call_workbook_function.xls calling test_workbook_function.xls) consistently generates the bug (there&#8217;s a SQL call against the log database at the end to test for this). Executing the same logic manually on the called workbook (test_workbook_function.xls) generally doesn&#8217;t, but it has done so occasionally!</p>
<p>I&#8217;ve messed around changing the .xls files to .xlsm in case of compatibility problems but it doesn&#8217;t appear to affect the outcome.</p>
<p>If anybody else has come across this problem or has an alternative to using Application.Caller to return a UDF&#8217;s calling cell&#8217;s range, do let me know.</p>
<p>UPDATE:</p>
<p><a rel="external nofollow" href="http://hoadley.net/">Peter Hoadley</a> suggests a workaround by using Application.ThisCell, see comments below &#8230;</p>
<p>UPDATE: March 19th 2010</p>
<div id="_mcePaste">Danny Khen from Microsoft has emailed me to say &#8230;</div>
<div></div>
<div id="_mcePaste">&#8220;<strong>This is a known Beta bug which has since been fixed. So you should expect it to go away when Office 2010 ships</strong>&#8220;</div>
<p style="text-align:right;"><em>Why not join me on Twitter at </em><a href="http://www.twitter.com/gobansaor"><em>gobansaor</em></a><em>?</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/851/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=851&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
		<item>
		<title>xLite Beta Updated &#8211; adds Python as an Excel Scripting Language</title>
		<link>http://blog.gobansaor.com/2010/02/07/xlite-beta-updated-adds-python-as-an-excel-scripting-language/</link>
		<comments>http://blog.gobansaor.com/2010/02/07/xlite-beta-updated-adds-python-as-an-excel-scripting-language/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 17:02:37 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[microETL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[xLite]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=846</guid>
		<description><![CDATA[I&#8217;ve updated the xLite Beta with bug fixes and added a new page introducing xLite&#8217;s Excel/VBA and Python extensions to SQLite. See http://www.gobansaor.com/xlite (UPDATE: xLite now microETL http://blog.gobansaor.com/category/microetl/) The u() function allows any VBA UDF (user defined functions) to be called &#8230; <a href="http://blog.gobansaor.com/2010/02/07/xlite-beta-updated-adds-python-as-an-excel-scripting-language/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=846&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the xLite Beta with bug fixes and added a new page introducing xLite&#8217;s Excel/VBA and Python extensions to SQLite.</p>
<p>See <a style="text-decoration:line-through;" href="http://www.gobansaor.com/xlite">http://www.gobansaor.com/xlite</a> (UPDATE: xLite now microETL <a href="http://blog.gobansaor.com/category/microetl/">http://blog.gobansaor.com/category/microetl/</a>)</p>
<p>The u() function allows any VBA UDF (<a href="http://www.ozgrid.com/VBA/Functions.htm">user defined functions</a>) to be called from SQLite.</p>
<p>The x() function allows an inbuilt function or indeed most any formula (but not a UDF, use u() instead) to be called from SQLite.</p>
<p>The f() function allows for standard worksheet cascading formulas to be referenced by SQL, in effect, <em>worksheet user defined functions</em>.  Really useful in building &amp; testing workbook code/models.</p>
<p>Finally, xLitePyScript is a UDF that allows Python to be used as an Excel scripting language.  Can either be inserted into a SQL statement wrapped by the u() function or called like a regular function from VBA or as a cell formula.</p>
<p><a href="http://blog.gobansaor.com/category/microetl/">Have fun &#8230;</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/846/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/846/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/846/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/846/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/846/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/846/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/846/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/846/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=846&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2010/02/07/xlite-beta-updated-adds-python-as-an-excel-scripting-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
		<item>
		<title>TAG Cubes &#8211; SQLite Star Query Part III</title>
		<link>http://blog.gobansaor.com/2009/09/29/tag-cubes-sqlite-star-query-part-iii/</link>
		<comments>http://blog.gobansaor.com/2009/09/29/tag-cubes-sqlite-star-query-part-iii/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 13:36:16 +0000</pubDate>
		<dc:creator>gobansaor</dc:creator>
				<category><![CDATA[ETL]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[olap]]></category>
		<category><![CDATA[Palo]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[xLite]]></category>
		<category><![CDATA[hypercube]]></category>
		<category><![CDATA[Mondrian]]></category>
		<category><![CDATA[TAG Cube]]></category>

		<guid isPermaLink="false">http://blog.gobansaor.com/?p=738</guid>
		<description><![CDATA[It&#8217;s no secret that I&#8217;m a huge fan of SQLite and Excel, particularly when used in combination. I also greatly admire the open source BI engines, Palo and Mondrian. Mondrian appeals because of its &#8220;ROLAP with a cache&#8221; architecture and &#8230; <a href="http://blog.gobansaor.com/2009/09/29/tag-cubes-sqlite-star-query-part-iii/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=738&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no secret that <a href="http://blog.gobansaor.com/2009/03/14/sqlite-as-the-mp3-of-data/">I&#8217;m a huge fan of SQLite</a> and Excel, particularly when used in combination. I also greatly admire the open source BI engines, <a href="www.jedox.com">Palo</a> and <a href="http://sourceforge.net/projects/mondrian/">Mondrian</a>. Mondrian appeals because of its &#8220;ROLAP with a cache&#8221; architecture and its implementation of MS&#8217;s excellent<a href="http://en.wikipedia.org/wiki/Multidimensional_Expressions"> </a><a href="http://en.wikipedia.org/wiki/Multidimensional_Expressions">MDX</a> language. When I say MDX is excellent I&#8217;m talking with my professional programmer&#8217;s hat on, as an end-user tool it&#8217;s a non-runner. This is where Palo comes in, building on the <a href="http://en.wikipedia.org/wiki/Hypercube">hypercube</a> concepts pioneered by the likes of  <a href="http://en.wikipedia.org/wiki/Applix">TM1</a> and <a href="http://en.wikipedia.org/wiki/Essbase">ESSbase</a>, it presents a designview that&#8217;s approachable by a vastly greater percentage of &#8220;civilians&#8221; than is the case with<a href="http://en.wikipedia.org/wiki/ROLAP"> </a><a href="http://en.wikipedia.org/wiki/ROLAP">ROLAP-based</a> solutions.</p>
<p>The trick behind TM1, Essbase, Palo etc. is the extension of the spreadsheet metaphor from two to multiple dimensions, while still binding the interface closely to the familiar spreadsheet (which for most of the business world is still Excel).</p>
<p>So where does <a href="http://www.sqlite.org/">SQLite</a> come in all this?</p>
<p><a href="http://blog.gobansaor.com/2007/08/30/sqlite-star-query/">At first glance</a>, SQLite lacks the s<a href="http://www.sqlite.org/optoverview.html">ophisticated join functionality</a> to support star-queries, but of course, if the dataset is small then a full-table scan of a fact table, or better still, loading the fact table into memory negates any such short-comings.</p>
<p>In fact, all traditional ROLAP engines have problems with dimensional models, particularly when you reach the point of using summary tables or query re-writes, that&#8217;s why the emerging SQL-speaking <a href="http://www.information-management.com/blogs/columnar_databases_column_major_data_warehouse_startup_analytics-10015473-1.html">columnar-databases</a> are such a godsend for ROLAP data warehouses.</p>
<p>It was SQLite combined with Excel acting as a data prep platform that was originally my main interest, so for pivoting, Excel&#8217;s own pivot table would have to do.  Nevertheless, I felt the tool was incomplete without the ability to directly pivot the underlying SQLite database.</p>
<p>Why not use Palo or Mondrian as a pivot tool? Well yes, where a fixed permanent &#8220;solution&#8221; is required then the extra moving parts of either approach would be justified and indeed necessary but that is to miss the essence of what I call datasmithing.</p>
<p>Datasmithing is not data warehousing nor is it the provision of solutions (which, for example, Palo superbly enables in multi-user budgeting situations). Datasmithing, as a skill, is of course part of the process of both, but it&#8217;s on the edges, at perhaps the planning or consumption stages.</p>
<p>Datasmiths deal in the unknown, in change, in disaster recovery, in systems&#8217; commissioning, in the never-ending barely-repeatable processes thrown up by daily business life.  For that, the toolset required must be as simple as possible (but no simpler), self-contained, document-oriented, secureable (is that a word?) and easily archived and retrieved. Excel and file-based DBMSs such as MSAccess or SQLite fit the bill nicely, server-based technologies such as DBA controlled database servers or IT installed &#8220;solutions&#8221;, less so.</p>
<p>Jedox has made Palo relatively easy to install (and likewise, Canada&#8217;s SQLPower has made Mondrian setup a painless exercise via their excellent <a href="http://www.sqlpower.ca/page/wabit">Wabit reporting too</a>l), but, the zero-install, email friendly document approach that spreadsheets are famous (and infamous) for, is preferable in many situations. This is something that Microsoft have recognised in their <a href="http://blog.gobansaor.com/2009/04/01/project-gemini-xxl-excel-on-steroids/">Gemini add-in for Excel 2010</a>, but Excel 2010 is a not here yet and it&#8217;s likely to be five years or more before it&#8217;s as common as Excel 2003 is today.</p>
<p>The inclusion of <a href="http://sqlite.org/fts3.html">FTS full-text searching</a> with SQLite triggered an ah-ah moment with regards to pivot-enabling SQLite.</p>
<p>The usual method that hypercube-like excel-friendly OLAP tools use to return data is via a UDF like so&#8230;</p>
<p style="text-align:center;"><em>=DATA(&#8220;CubeName&#8221;,&#8221;value1&#8243;,value2&#8243;,&#8230;)</em></p>
<p>&#8230;where valueN represents dimensional elements, so&#8230;</p>
<p style="text-align:center;"><em>=DATA(&#8220;SalesCube&#8221;,&#8221;Beer&#8221;,&#8221;Profit&#8221;,&#8221;Jan 09&#8243;,&#8221;Actual&#8221;)</em></p>
<p>&#8230;is the Actual Profit for Beer sales in Jan 09. The dimensional elements act as &#8220;tags&#8221; to locate a particular value, there is of course much more to tools like Palo; hierarchies, intra-cube rules etc. but in essence most OLAP tools are like <a href="http://delicious.com/">www.delicious.com</a> for number crunchers. This method of retrieving data fits well with how people use Excel and not just for pivots, but for embedding OLAP aggregated cells in <em>lists</em>.  For example, a CRM scenario; a Sales Rep makes a list of her &#8216;best&#8217; (subjective) customers, but needs hard (objective) stats, to be placed alongside the list to convince the boss or to track actuals against expectation.</p>
<p>Dimensional elements as tags; FTS3 virtual tables as fact table indexes; the concept of a TAG Cube was born.</p>
<p>In the above example &#8220;Profit&#8221; would most likely be described as a <em>measure</em> (Palo, a near pure hypercube does not distinguish between Measure and other Dimensional coordinates). Dimensions, measures and attributes are in reality interchangeable (a Customer ID can act as a dimension or an attribute, but by applying a  Count Distinct to it, it&#8217;s a measure) but most OLAP solutions treat &#8220;Measure Dimensions&#8221; as different, and so do TAG Cubes.</p>
<p>By using the default fact table structure (a single-columned table) and querying using the default measure (which translates to the SUM() of that single value) a &#8216;pure&#8217; approach can be used. But, ROLAP is tightly bound to the concept of a fact table, and since SQLite is relational, TAG Cubes offer the ability to use a wide fact table approach and I think gains considerably in flexibility by so going.</p>
<p>The above example of using Count Distinct, or the simple creation of calculated measures are examples of this flexibility. Another, is a measure based on SQLite&#8217;s concat_group aggregate function to provide a drill-down facility, e.g.</p>
<p style="text-align:center;"><em>=DATA(&#8220;SalesCUBE&#8221;,&#8221;ROWIDList,&#8221;Beer&#8221;,&#8221;Jan 09&#8243;,&#8221;Actual&#8221;)</em></p>
<p>&#8230;where &#8220;ROWIDList&#8221; would be setup as <em>concat_group(rowid,&#8217;,') </em>and will return a comma separated list of the underlying fact table ROWIDs.</p>
<p>A major reason for rolling my own pivot engine was to add a concept of <a href="http://en.wikipedia.org/wiki/Namespace_(computer_science)">&#8220;namespaces&#8221; </a>and to separate the implementation of these namespaces from the actual pivot.  When a tag (or a predefined hierarchy of tags) is assigned to a cube, it&#8217;s also assigned to a namespace, in many cases namespace and cube would be synonymous, but in some cases a more sophisticated approach is required:</p>
<ul>
<li>Multiple cubes sharing the same set of conformed dimensions would be best served by such cubes sharing a common namespace, and so they can.</li>
<li>Different consumers of the pivot may require the use of a different language, be that a spoken language or a different &#8216;business language&#8217; e.g. Manufacturing Product Codes V Consumer Product Names. Again, easily done.</li>
<li>Sometimes identifying data can&#8217;t be shared with the datasmith or the numerical analyst working on a problem; in such cases being able to replace  the actual namespace with an obfuscated one can be very useful. Or, for added security, the namespace might only be issued to approved  PCs while the tag index and fact table are stored on a shared drive.  Needs some more work to make managing such scenarios secure and easy to use but the structure is there.</li>
</ul>
<p>As hinted on above, the three elements of a Tag Cube, the namespace, tag index and fact table can be assigned to different databases (i.e. files). Due to the wonders of SQLite&#8217;s <a href="http://www.sqlite.org/lang_attach.html">ATTACH statement</a> and the <a href="http://www.sqlite.org/backup.html">backup API&#8217;s</a> ability to quickly load/unload databases in/out of memory, it&#8217;s possible, for example, to load namespace and tag index (i.e. the &#8216;dimensions&#8217;) into a memory database, while a very large (i.e. too big to fit to memory) fact table remains on disk. Fast and cheap <a href="http://en.wikipedia.org/wiki/Solid-state_drive">SSDs</a> will add further configuration options.</p>
<p>Although most of the TAG Cube functionality is available only within Excel, I&#8217;ve built a C based SQLite Virtual Table (cFact) to allow the tag index to used outside xLite. This means that SQLite drivers for ODBC (for use as a Pivot Table source, for example) or JDBC (for use in  SQLPower Wabit perhaps) can efficiently access data models built using xLite.</p>
<p><em>I had to revert to using C rather than my preferred Python (did I mention that xLite now embeds Python in Excel, no, well it does, <a href="http://blog.gobansaor.com/2008/04/11/python-the-new-vba/">Python the newVBA ?</a>), having failed to get around multi-threading issues with callbacks to Python in both the </em><a href="http://www.ch-werner.de/sqliteodbc/"><em>ODBC</em></a><em> and </em><a href="http://www.zentus.com/sqlitejdbc/"><em>JDBC</em></a><em> drivers. I&#8217;d make a career promise to myself many years ago, not to having anything to do with printers or threads, and I think I&#8217;ll stick with it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p>TAG Cubes are the latest addition (still WIP actually) to be added to xLite, adding to:</p>
<ul>
<li>VBA coded SQLite SQL functions.</li>
<li>Worksheet Functions; call out to a &#8216;function&#8217; built using Excel formula, passing a parameter list and returning a value.</li>
<li>Workbook Functions; like Worksheet Functions, but loading a new Workbook, passing in parameters, passing back a value (or tables) and closing the Workbook when finished.</li>
<li>XLiteScript; xLite exposes its functionality via VBA coded UDFs, which can be called like any other formula, but data prep activities often require sequential procedural logic, xLiteScript is a <a href="http://blog.gobansaor.com/2007/03/03/tables-vs-xml-the-data-lingua-franca-debate/">table-oriented</a> scripting mechanism offering basic flow-control logic.</li>
<li>pyScript; I embedded Python into xLite to take advantage of Python&#8217;s speed in developing Virtual Tables, SQL Functions and extensions to SQLite and to tap in the wonderful world of Python code. I&#8217;ve also added the ability to use Python from scripts defined within Excel (to indent, tab to the next cell!).</li>
<li>Fast load/unload to/from CSV.</li>
<li>Load from any ADO source.</li>
<li>Remove xLite formulae and rename and save Workbook, very handy when used via Workbook Functions to mass produce Excel &#8220;reports&#8221;.</li>
<li>Other WIP items are; load from SAP, load/unload to/from Amazon S3, use Palo cubes as TAG Cube &#8220;facts&#8221;, slot in/out Palo for TAG Cubes, auto-generate Mondrian XML based on TAG Cubes, write-back and splash, Python &amp; VBA TAG Cube &#8220;rules&#8221;.</li>
</ul>
<p><a href="http://www.gobansaor.com/xlite">I&#8217;ve started the process of releasing the beta code here &#8230;</a></p>
<p style="text-align:right;"><em>Why not join me on Twitter at </em><a style="text-decoration:none;color:#265e15;border-bottom-color:#996633;border-bottom-width:1px;border-bottom-style:dashed;margin:0;padding:0;" href="http://www.twitter.com/gobansaor"><em>gobansaor</em></a><em>?</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gobansaor.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gobansaor.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gobansaor.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gobansaor.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gobansaor.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gobansaor.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gobansaor.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gobansaor.wordpress.com/738/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gobansaor.com&amp;blog=110633&amp;post=738&amp;subd=gobansaor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gobansaor.com/2009/09/29/tag-cubes-sqlite-star-query-part-iii/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<georss:point>53.204039 -6.574340</georss:point>
		<geo:lat>53.204039</geo:lat>
		<geo:long>-6.574340</geo:long>
		<media:content url="http://1.gravatar.com/avatar/b714f82b5e24beb3b74779615b6ad969?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">gobansaor</media:title>
		</media:content>
	</item>
	</channel>
</rss>
