Here's how you can do it.
First, make sure you have a good editor, such as notepad++.
Now open the workbook with your editor. It's an XML file, so in notepad++ you want to select Language, XML to view the file in that language.
Collapsing all root elements should give you a view that looks like this:
Notice how the basic structure consists of Preferences, Data Sources, Worksheets, WIndows and Thumbnails. (my workbook did not have a Dashboard yet, otherwise you should have seen that too).
If you expand the DataSources element, you'll see an element for each data source:
My workbooks has 7 data sources that all connect to a PostgreSQL backend.
Let's take a look at the first data source named 'namelookup_cachepool'.
If you expand the element
Here's how mine was specified (I had to remove the '<' and '>'symbols to make it display on my blog):
' relation name='TableauSQL' type='text'select server, ts, value from ibmsur0001_dwh.statrep_entry
' /connection
Basically, this data source has two dimensions (servers and ts), and measures stored in a column named 'value'.
I created a Tableau Extract file from my data source to Postgres, and created a new workbook that now connects to this extract file. The connection element in the workbook file now looks different from my first example:
' datasource inline='true' name='NAMELOOKUPCACHEPOOL Extract' version='7.7'
' connection class='firebird' dbname='C:\Documents and Settings\wouter\My Documents\My Tableau Repository\Datasources\NAMELOOKUPCACHEPOOL.TDE' tablename='TableauExtract' username='SYSDBA'
' relation join='inner' type='join'
' clause type='join'
' expression op='='
' expression op='[TableauExtract].[fk:ts:0]'
' /expression
' expression op='[ts].[pk:ts:0]'
' /expression
' /expression
' /clause
' relation join='inner' type='join'
' clause type='join'
' expression op='='
' expression op='[TableauExtract].[fk:server:0]'
' /expression
' expression op='[server].[pk:server:0]'
' /expression
' /expression
' /clause
' relation name='TableauExtract' table='[TableauExtract]' type='table' /
' relation name='server' table='[server]' type='table' /
' /relation
' relation name='ts' table='[ts]' type='table' /
' /relation
' calculations
' calculation column='[Number of Records]' formula='1' /
' /calculations
' /connection
I did some testing by replacing everything in the
Over the next couple of days, I will be posting more on this topic.
Nice to meet next Tableau software user
ReplyDelete