twb 3.9.3 → 3.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twb.rb +6 -2
- data/lib/twb/analysis/DataSources/parametersanalyzer.rb +95 -0
- data/lib/twb/analysis/Sheets/sheetfiltersanalyzer.rb +18 -309
- data/lib/twb/analysis/Sheets/sheetfiltersanalyzerA.rb +81 -0
- data/lib/twb/calculatedfield.rb +3 -1
- data/lib/twb/datasource.rb +26 -3
- data/lib/twb/groupfield.rb +55 -0
- data/lib/twb/parameter.rb +119 -0
- data/lib/twb/quickfilter.rb +442 -0
- data/lib/twb/tabtool.rb +13 -4
- data/lib/twb/workbook.rb +26 -5
- data/lib/twb/worksheet.rb +28 -4
- metadata +7 -6
- data/LICENSE.md +0 -1
- data/LICENSE.txt +0 -619
- data/README.md +0 -32
- data/lib/twb/dashboard.txt +0 -57
data/README.md
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# TWB - The Tableau Workbook Ruby gem.
|
2
|
-
|
3
|
-
This gem models Tableau workbooks and their major components. It's the result of years of writing similar code to access, interpret,
|
4
|
-
and manage Tableau workbooks.
|
5
|
-
|
6
|
-
## Philosophy
|
7
|
-
|
8
|
-
Tableau Workbook governance should be:
|
9
|
-
- simple and straightforward in the way that basic data analysis is simple and straightforward in Tableau,
|
10
|
-
- free, as in beer and speech, and
|
11
|
-
- constantly evolving to incorporate new and interesting things people can think of to see about do with their Workbooks.
|
12
|
-
|
13
|
-
The TWB gem is released to the Tableau community in the hope that it will prove to be useful and valuable,
|
14
|
-
that people will build useful things with it, and that they will offer improvements and extensions to it.
|
15
|
-
|
16
|
-
## History and rationale
|
17
|
-
|
18
|
-
A number of Ruby scripts that parse Workbooks and emit a variety of their contents/properties have been published at Tableau Friction, including a couple that identify Calculated fields and the fields they reference:
|
19
|
-
http://tableaufriction.blogspot.ca/2015/02/more-calculated-field-analysis-fields.html
|
20
|
-
http://tableaufriction.blogspot.ca/2014/09/do-you-know-what-your-calculated-fields.html
|
21
|
-
|
22
|
-
Other scripts find and record other useful information, others yet enable Workbook management, e.g. unhiding worksheets and making field comments consistent across workbook. One of them produces HTML pages with dynamic dashboard wire frames, making it easy to see what's in the dashboards and their properties
|
23
|
-
|
24
|
-
## TWIS - The Tableau Workbook Inventory System
|
25
|
-
There's also TWIS - the Tableau Workbook Inventory System, an application that parses workbooks and extracts most of their
|
26
|
-
important elements into CSV files, allowing one to see things such as which sheets are in which with dashboards,
|
27
|
-
the data sources they connect to, and which Workbooks they're in. TWIS also generates diagrams/maps of the Workbook - Dashboard - Worksheet - Data Source relationships, one for each Workbook in PDF, PNG, and SVG.
|
28
|
-
|
29
|
-
TWIS is described and available here: http://betterbi.biz/TWIS.html
|
30
|
-
|
31
|
-
I created TWIS in Java and am working to re-implement its functionality in Ruby with the intention of releasing it as a open source project. The initial Ruby Gem - "twb" - is already available on http://rubygems.org - and can be downloaded and used via "gem install twb". At this point it only represents Workbooks and Data Sources, but I'll be extending it pretty regularly and posting updates to Tableau Friction. Anyone who's interested can comment here or there.
|
32
|
-
|
data/lib/twb/dashboard.txt
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
# Copyright (C) 2014, 2015 Chris Gerrard
|
2
|
-
#
|
3
|
-
# This program is free software: you can redistribute it and/or modify
|
4
|
-
# it under the terms of the GNU General Public License as published by
|
5
|
-
# the Free Software Foundation, either version 3 of the License, or
|
6
|
-
# (at your option) any later version.
|
7
|
-
#
|
8
|
-
# This program is distributed in the hope that it will be useful,
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
-
# GNU General Public License for more details.
|
12
|
-
#
|
13
|
-
# You should have received a copy of the GNU General Public License
|
14
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
|
-
|
16
|
-
require 'nokogiri'
|
17
|
-
require 'digest/md5'
|
18
|
-
|
19
|
-
module Twb
|
20
|
-
|
21
|
-
class Dashboard
|
22
|
-
|
23
|
-
@@hasher = Digest::SHA256.new
|
24
|
-
|
25
|
-
attr_reader :node, :name, :caption, :uiname, :connHash, :class, :connection
|
26
|
-
|
27
|
-
def initialize dataSourceNode
|
28
|
-
@node = dataSourceNode
|
29
|
-
@name = @node.xpath('./@name').text
|
30
|
-
@caption = @node.xpath('./@caption').text
|
31
|
-
@uiname = if @caption.nil? || @caption == '' then @name else @caption end
|
32
|
-
processConnection
|
33
|
-
return self
|
34
|
-
end
|
35
|
-
|
36
|
-
def processConnection
|
37
|
-
@connHash = ''
|
38
|
-
@connection = @node.at_xpath('./connection')
|
39
|
-
if !@connection.nil? then
|
40
|
-
@class = @connection.attribute('class').text
|
41
|
-
dsAttributes = @node.xpath('./connection/@*')
|
42
|
-
dsConnStr = ''
|
43
|
-
dsAttributes.each do |attr|
|
44
|
-
dsConnStr += attr.text
|
45
|
-
# Note: '' attributes with value '' don't contribute to the hash
|
46
|
-
end
|
47
|
-
@connHash = Digest::MD5.hexdigest(dsConnStr)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
def Parameters?
|
52
|
-
@name == 'Parameters'
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|