Archive for June 2013

Archiving a Twitter users timeline with Tweet-SQL 3.6

Warning: count(): Parameter must be an array or an object that implements Countable in /home/fbsqlcom/public_html/ on line 31

Here’s a quick update of a post I made way back in 2008 to archive a users timeline. This script will allow you download the tweets from any unprotected twitter account. Let’s get started! First create the following table in your Tweet-SQL database. ?View Code TSQLCREATE TABLE TwitterArchive ( created_at NVARCHAR(30), id BIGINT PRIMARY KEY CLUSTERED, […]

Tweet-SQL 3.6 Released!

The long overdue update for Tweet-SQL is here! This is a major update for version 1.1 of the Twitter API. A lot has changed in the twitter API and so has Tweet-SQL. Due to this the old scripts published on this site will no longer work. I’ll be posting a series of updates to old scripts […]

Using Hints in SQL Server

Query hints are bad right? I confess to using them on odd occasions but only when other attempts to find a solution have failed. Microsoft emphasize this themselves; Because the SQL Server query optimizer typically selects the best execution plan for a query, we recommend that <join_hint>, <query_hint>, and <table_hint> be used only as a […]

DBT2: ImportError: cannot open shared object file

Yet another error I encounter whilst running DBT2 tests. This time it was a problem with generating the final reports. They are generated using a Python library which uses R under the hood. This is the error. Traceback (most recent call last): File “/usr/local/bin/dbt2-post-process”, line 14, in import rpy2.robjects as robjects File “/usr/local/lib64/python2.7/site-packages/rpy2/robjects/”, line 15, […]

DBT2: stmt ERROR: 1406 Data too long for column ‘out_w_city’ at row 1

Another issue with the DBT2 benchmarking suite. mysql reports SQL STMT: stmt ERROR: 1406 Data too long for column ‘out_w_city’ at row 1 Just edit the payment stored procedure and change; ?View Code MYSQLDECLARE out_w_city VARCHAR(10); To; ?View Code MYSQLDECLARE out_w_city VARCHAR(20);