twb 5.2.1 → 5.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/twb.rb +1 -0
- data/lib/twb.rb +1 -1
- data/lib/twb/{twbtest.rb → TwbTest.rb} +0 -0
- data/lib/twb/analysis/{annotatedfieldscsvemitter.rb → AnnotatedFieldsCSVEmitter.rb} +0 -0
- data/lib/twb/analysis/{calculatedfields/csvemitter.rb → CalculatedFields/CSVEmitter.rb} +0 -0
- data/lib/twb/analysis/{calculatedfields/calculatedfieldsanalyzer.rb → CalculatedFields/CalculatedFieldsAnalyzer.rb} +0 -0
- data/lib/twb/analysis/{calculatedfields/markdownemitter.rb → CalculatedFields/MarkdownEmitter.rb} +0 -0
- data/lib/twb/analysis/{calculatedfields → CalculatedFields}/dotanalyzer.rb +8 -3
- data/lib/twb/analysis/{calculatedfields → CalculatedFields}/fieldsaliasesanalyzer.rb +0 -0
- data/lib/twb/analysis/{calculatedfields → CalculatedFields}/groupfieldsanalyzer.rb +0 -0
- data/lib/twb/analysis/{calculatedfields → CalculatedFields}/t.rb +0 -0
- data/lib/twb/analysis/{datasources/datasourcefieldscsvemitter.rb → DataSources/DataSourceFieldsCSVEmitter.rb} +0 -0
- data/lib/twb/analysis/{datasources/datasourcetablefieldscsvemitter.rb → DataSources/DataSourceTableFieldsCSVEmitter.rb} +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/categoricalcolorcodinganalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/datasourcefieldsanalyzer.rb +2 -0
- data/lib/twb/analysis/{datasources → DataSources}/datasourcefilesanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/datasourceoriginsanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/datasourcesenumerator.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/datasourceslocationsanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/datasourcetablefieldsanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/extractsanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/fieldsaliasesanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/googlesheetdatasourcesanalyzer.rb +0 -0
- data/lib/twb/analysis/{datasources → DataSources}/parametersanalyzer.rb +0 -0
- data/lib/twb/analysis/{documentedfieldscsvemitter.rb → DocumentedFieldsCSVEmitter.rb} +0 -0
- data/lib/twb/analysis/{documentedfieldsmarkdownemitter.rb → DocumentedFieldsMarkdownEmitter.rb} +0 -0
- data/lib/twb/analysis/{sheets/worksheetdatastructurecsvemitter.rb → Sheets/WorksheetDataStructureCSVEmitter.rb} +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/analyzedashboardsheets.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/dashboardsummarizer.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/dashsheetsanalyzer.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/sheetfieldsanalyzer.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/sheetfiltersanalyzer.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/sheetfiltersanalyzera.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/sheetsintooltipanalyzer.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/sheetsourcesanalyzer.rb +0 -0
- data/lib/twb/analysis/{sheets → Sheets}/worksheetsummarizer.rb +0 -0
- data/lib/twb/columnfield.rb +75 -25
- data/lib/twb/countNodes.rb +98 -0
- data/lib/twb/datasource.rb +20 -6
- data/lib/twb/{finddsfields.rb → findDSFields.rb} +0 -0
- data/lib/twb/{identifyfields.rb → identifyFields.rb} +0 -0
- data/lib/twb/quickfilter.rb +1 -1
- data/lib/twb/util/{dotfilerenderer.rb → dotFileRenderer.rb} +0 -0
- data/lib/twb/util/{ftppublisher.rb → ftpPublisher.rb} +0 -0
- data/lib/twb/util/{joinutilities.rb → joinUtilities.rb} +0 -0
- data/lib/twb/util/{twbdashsheetdatadotbuilder.rb → twbDashSheetDataDotBuilder.rb} +0 -0
- data/lib/twb/util/{twbdashsheetdatadotrenderer.rb → twbDashSheetDataDotRenderer.rb} +0 -0
- data/lib/twb/util/{twbdashessheetdatadotbuilder.rb → twbDashesSheetDataDotBuilder.rb} +0 -0
- metadata +53 -52
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8286dfd0e2b2e3db602618786f3087a92b4931887b6e87fad02d81b16d7b802c
|
|
4
|
+
data.tar.gz: e6c7f04b46234ffb5422b7a3e3b015c213c58641b17d4e2844404caea1a341ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25c3e334c611cd8323a1bde1d47603687e13719b7bfe4363ae9cbe455e7cdd5051b59f4a818d439a1767969c5bebb3d834c74db4841f6c447f16b3c43b53ada9
|
|
7
|
+
data.tar.gz: a8029f92a80dd0fc2e8b6e9a587e0c0598a1286157e65b5af825c4b80120c517cd5a779ac0d3969cb8a691b937b849abb54d622bccfa54b103715b7bab83789b
|
data/bin/twb.rb
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
puts "\n TWB gem here. \n"
|
data/lib/twb.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/twb/analysis/{calculatedfields/markdownemitter.rb → CalculatedFields/MarkdownEmitter.rb}
RENAMED
|
File without changes
|
|
@@ -34,6 +34,10 @@ module CalculatedFields
|
|
|
34
34
|
@imageFiles = Array.new
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
def encode str
|
|
38
|
+
str.gsub('"', '\"')
|
|
39
|
+
end
|
|
40
|
+
|
|
37
41
|
def processTWB twb
|
|
38
42
|
# twb = File.basename(twb)
|
|
39
43
|
@twb = twb #Twb::Workbook.new twb
|
|
@@ -50,10 +54,11 @@ module CalculatedFields
|
|
|
50
54
|
ds.calculatedFields.each do |cf|
|
|
51
55
|
@cfCnt += 1
|
|
52
56
|
calcFields << cf.uiname
|
|
53
|
-
edges << " \"#{ds.uiname}\" -> \"#{cf.uiname}\" [tailport=e, headport=w] "
|
|
57
|
+
edges << " \"#{encode(ds.uiname)}\" -> \"#{encode(cf.uiname)}\" [tailport=e, headport=w] "
|
|
58
|
+
puts " \"#{encode(ds.uiname)}\" -> \"#{encode(cf.uiname)}\" [tailport=e, headport=w] "
|
|
54
59
|
cf.referencedFields.each do |rf|
|
|
55
60
|
refFields << rf.uiname
|
|
56
|
-
edges << " \"#{cf.uiname}\" -> \"#{rf.uiname}\" [tailport=e, headport=w] "
|
|
61
|
+
edges << " \"#{encode(cf.uiname)}\" -> \"#{encode(rf.uiname)}\" [tailport=e, headport=w] "
|
|
57
62
|
end
|
|
58
63
|
end # ds.calculatedFields.each
|
|
59
64
|
# "federated.17h7owt0rsacke17cql8o0w2ittk" -> "New AO Actuals Query in PP+ (AO Variance Data)::vs Prior Year [YTD]"
|
|
@@ -64,7 +69,7 @@ module CalculatedFields
|
|
|
64
69
|
@dotFile.puts " "
|
|
65
70
|
allFields = calcFields + refFields
|
|
66
71
|
allFields.each do |f|
|
|
67
|
-
@dotFile.puts "\t \"#{f}\" [label=\"#{f}\"]"
|
|
72
|
+
@dotFile.puts "\t \"#{encode(f)}\" [label=\"#{encode(f)}\"]"
|
|
68
73
|
end
|
|
69
74
|
endPointFields = allFields - calcFields
|
|
70
75
|
rankSame(endPointFields) unless endPointFields.nil? || endPointFields.empty?
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -72,6 +72,7 @@ module DataSources
|
|
|
72
72
|
'Default Format',
|
|
73
73
|
'Param-domain-type',
|
|
74
74
|
'Role',
|
|
75
|
+
'Semantic Role',
|
|
75
76
|
'Type',
|
|
76
77
|
'Calculated?',
|
|
77
78
|
'Value',
|
|
@@ -256,6 +257,7 @@ module DataSources
|
|
|
256
257
|
field.defaultFormat,
|
|
257
258
|
field.paramDomainType,
|
|
258
259
|
field.role,
|
|
260
|
+
field.semanticRole,
|
|
259
261
|
field.type,
|
|
260
262
|
!field.calcField.nil?,
|
|
261
263
|
field.value,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/twb/analysis/{documentedfieldsmarkdownemitter.rb → DocumentedFieldsMarkdownEmitter.rb}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/twb/columnfield.rb
CHANGED
|
@@ -62,7 +62,8 @@ module Twb
|
|
|
62
62
|
attr_reader :name, :caption, :uiname
|
|
63
63
|
attr_reader :hasaliases, :alias
|
|
64
64
|
attr_reader :dataType, :defaultFormat, :paramDomainType
|
|
65
|
-
attr_reader :role, :
|
|
65
|
+
attr_reader :role, :semanticRole
|
|
66
|
+
attr_reader :type, :value
|
|
66
67
|
attr_reader :alias, :semanticRole, :aggregation
|
|
67
68
|
attr_reader :autoColumn, :hidden, :datatypeCustomized
|
|
68
69
|
attr_reader :calcField
|
|
@@ -72,25 +73,27 @@ module Twb
|
|
|
72
73
|
def initialize(fieldNode, datasource=nil)
|
|
73
74
|
@datasource = datasource
|
|
74
75
|
@node = fieldNode
|
|
75
|
-
@name = load
|
|
76
|
+
@name = load('name').sub(/^\[/,'').sub(/\]$/,'')
|
|
76
77
|
@caption = load 'caption'
|
|
77
78
|
@uiname = @caption.nil? ? @name : @caption
|
|
78
|
-
|
|
79
|
-
@
|
|
80
|
-
@
|
|
81
|
-
@
|
|
82
|
-
@
|
|
83
|
-
@
|
|
84
|
-
@
|
|
85
|
-
@
|
|
86
|
-
@
|
|
87
|
-
@
|
|
88
|
-
@
|
|
79
|
+
#--
|
|
80
|
+
loadAttributes @node
|
|
81
|
+
# @dataType = load 'datatype'
|
|
82
|
+
# @userDataType = load 'user-datatype'
|
|
83
|
+
# @defaultFormat = load 'default-format'
|
|
84
|
+
# @paramDomainType = load 'param-domain-type'
|
|
85
|
+
# @type = load 'type'
|
|
86
|
+
# @value = load 'value'
|
|
87
|
+
# @alias = load 'alias'
|
|
88
|
+
# @semanticRole = load 'semantic-role'
|
|
89
|
+
# @aggregation = load 'aggregation'
|
|
90
|
+
# @autoColumn = load 'auto-column'
|
|
91
|
+
# @datatypeCustomized = load 'datatype-customized'
|
|
89
92
|
end
|
|
90
93
|
|
|
91
94
|
def id
|
|
92
95
|
@id ||= @id = @name.hash
|
|
93
|
-
end
|
|
96
|
+
end
|
|
94
97
|
|
|
95
98
|
def load nodeName
|
|
96
99
|
attr = @node.attribute(nodeName)
|
|
@@ -98,17 +101,56 @@ module Twb
|
|
|
98
101
|
return val
|
|
99
102
|
end
|
|
100
103
|
|
|
101
|
-
def
|
|
102
|
-
|
|
104
|
+
def loadAttributes node
|
|
105
|
+
# puts "augmenting with node:#{node}"
|
|
106
|
+
@node = node
|
|
107
|
+
if node.has_attribute?('aggregation') then @aggregation = node['aggregation'] end
|
|
108
|
+
if node.has_attribute?('alias') then @alias = node['alias'] end
|
|
109
|
+
if node.has_attribute?('auto-column') then @autoColumn = node['auto-column'] end
|
|
110
|
+
if node.has_attribute?('datatype') then @dataType = node['datatype'] end
|
|
111
|
+
if node.has_attribute?('datatype-customized') then @datatypeCustomized = node['datatype-customized'] end
|
|
112
|
+
if node.has_attribute?('default-format') then @defaultFormat = node['default-format'] end
|
|
113
|
+
if node.has_attribute?('param-domain-type') then @paramDomainType = node['param-domain-type'] end
|
|
114
|
+
if node.has_attribute?('role') then @role = node['role'] end
|
|
115
|
+
if node.has_attribute?('semantic-role') then @semanticRole = node['semantic-role'] end
|
|
116
|
+
if node.has_attribute?('type') then @type = node['type'] end
|
|
117
|
+
if node.has_attribute?('user-datatype') then @userDataType = node['user-datatype'] end
|
|
118
|
+
if node.has_attribute?('value') then @value = node['value'] end
|
|
119
|
+
# loadAttr @aggregation, 'aggregation'
|
|
120
|
+
# loadAttr @alias, 'alias'
|
|
121
|
+
# loadAttr @autoColumn, 'auto-column'
|
|
122
|
+
# loadAttr @dataType, 'datatype'
|
|
123
|
+
# loadAttr @datatypeCustomized, 'datatype-customized'
|
|
124
|
+
# loadAttr @defaultFormat, 'default-format'
|
|
125
|
+
# loadAttr @paramDomainType, 'param-domain-type'
|
|
126
|
+
# loadAttr @role, 'role'
|
|
127
|
+
# loadAttr @semanticRole, 'semantic-role'
|
|
128
|
+
# loadAttr @type, 'type'
|
|
129
|
+
# loadAttr @userDataType, 'user-datatype'
|
|
130
|
+
# loadAttr @value, 'value'
|
|
103
131
|
end
|
|
104
132
|
|
|
105
|
-
def
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
133
|
+
# def loadAttr property, attribute
|
|
134
|
+
# # puts " - def loadAttr attr:#{attribute}: prop:#{property}:"
|
|
135
|
+
# if @node.has_attribute? attribute
|
|
136
|
+
# # puts " - has"
|
|
137
|
+
# property = @node[attribute]
|
|
138
|
+
# # else
|
|
139
|
+
# # puts " - has not"
|
|
140
|
+
# # end
|
|
141
|
+
# end
|
|
142
|
+
|
|
143
|
+
# def role
|
|
144
|
+
# @role ||= loadRole
|
|
145
|
+
# end
|
|
146
|
+
|
|
147
|
+
# def loadRole
|
|
148
|
+
# role = @node['role']
|
|
149
|
+
# if role.nil?
|
|
150
|
+
# role = @@dataTypeRoleMap[@dataType].nil? ? @dataType : @@dataTypeRoleMap[@dataType]
|
|
151
|
+
# end
|
|
152
|
+
# return role
|
|
153
|
+
# end
|
|
112
154
|
|
|
113
155
|
def calcField
|
|
114
156
|
@calcField ||= loadCalcField
|
|
@@ -211,7 +253,7 @@ module Twb
|
|
|
211
253
|
end
|
|
212
254
|
|
|
213
255
|
def loadProperties
|
|
214
|
-
@properties= {}
|
|
256
|
+
@properties = {} if @properties.nil?
|
|
215
257
|
@node.attributes.each do |name,attr|
|
|
216
258
|
@properties[name] = attr.value
|
|
217
259
|
end
|
|
@@ -220,13 +262,21 @@ module Twb
|
|
|
220
262
|
end
|
|
221
263
|
|
|
222
264
|
def to_s
|
|
223
|
-
@name
|
|
265
|
+
"n:#{@name}: uin:#{uiname}: "
|
|
224
266
|
end
|
|
225
267
|
|
|
226
268
|
def <=>(other)
|
|
227
269
|
@name <=> other.name
|
|
228
270
|
end
|
|
229
271
|
|
|
272
|
+
def eql?(other)
|
|
273
|
+
@name == other.name
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
def hash
|
|
277
|
+
@name.hash
|
|
278
|
+
end
|
|
279
|
+
|
|
230
280
|
end # class ColumnField
|
|
231
281
|
|
|
232
282
|
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
require 'csv'
|
|
3
|
+
require 'twb'
|
|
4
|
+
|
|
5
|
+
def init
|
|
6
|
+
system 'cls'
|
|
7
|
+
$pFile = File.open('sqlFromTwbDc.txt','w')
|
|
8
|
+
|
|
9
|
+
sqiCSV = 'TWBFieldsByType.csv'
|
|
10
|
+
$fieldsCSV = CSV.open(sqiCSV, 'w')
|
|
11
|
+
$fieldsCSV << [
|
|
12
|
+
'TWB',
|
|
13
|
+
'Data Connection - UI',
|
|
14
|
+
'Field Name',
|
|
15
|
+
'Field Type',
|
|
16
|
+
]
|
|
17
|
+
$path = if ARGV.empty? then '**/*.twb' else ARGV[0] end
|
|
18
|
+
emit " "
|
|
19
|
+
emit " Generating SQL Create Table code for Tableau Workbook Data Connections (TWDCs)."
|
|
20
|
+
emit " Each TWDC will have it's own *.sql file containing the SQL code.\n "
|
|
21
|
+
emit " Looking for Workbooks matching: '#{$path}' - from: #{ARGV[0]}\n\n "
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def method_name
|
|
25
|
+
datasources = {}
|
|
26
|
+
dataSourcesNode = doc.at_xpath('//workbook/datasources')
|
|
27
|
+
dataSourcesNodes = doc.xpath('//workbook/datasources/datasource').to_a
|
|
28
|
+
puts " dsn: #{dataSourcesNodes}"
|
|
29
|
+
datasourceNodes.each do |node|
|
|
30
|
+
datasource = Twb::DataSource.new(node)
|
|
31
|
+
datasources[datasource.name] = datasource
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
$localEmit = true
|
|
36
|
+
def emit stuff
|
|
37
|
+
$pFile.puts stuff
|
|
38
|
+
puts stuff if $localEmit
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
$paths = {
|
|
42
|
+
'Relation Columns' => './connection/relation/columns/column',
|
|
43
|
+
'Metadata Records' => './connection/metadata-records/metadata-record',
|
|
44
|
+
'Columns' => './column',
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
def proc file
|
|
48
|
+
emit "\n == #{file}"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def process file
|
|
52
|
+
emit "\n == #{file}"
|
|
53
|
+
doc = Nokogiri::XML(open(file))
|
|
54
|
+
dataSourcesNodes = doc.xpath('//workbook/datasources/datasource')
|
|
55
|
+
dataSourcesNodes.each do |ds|
|
|
56
|
+
emit "\n dc: #{ds.attribute('caption')}"
|
|
57
|
+
emit " dn: #{ds.attribute('name')}\n ---"
|
|
58
|
+
typeCounts = {}
|
|
59
|
+
$paths.each do |type, path|
|
|
60
|
+
nodes = ds.xpath(path).to_a
|
|
61
|
+
# emit " : %3i %-17s %-s" % [nodes.size, type, path]
|
|
62
|
+
typeCnt = nodes.size
|
|
63
|
+
nodes.each do |n|
|
|
64
|
+
$fieldsCSV << [file,ds.attribute('name'),n.attribute('name'),type]
|
|
65
|
+
end
|
|
66
|
+
if type == 'Columns' then
|
|
67
|
+
calcCnt = 0
|
|
68
|
+
nodes.each do |n|
|
|
69
|
+
calc = n.xpath('./calculation')
|
|
70
|
+
# emit " c: #{calc.size} "
|
|
71
|
+
calcCnt += calc.size
|
|
72
|
+
end
|
|
73
|
+
# emit ' ---'
|
|
74
|
+
# emit " c#: %3i " % [calcCnt]
|
|
75
|
+
# emit " !c#: %3i " % [nodes.size - calcCnt]
|
|
76
|
+
typeCounts['Columns'] = nodes.size
|
|
77
|
+
typeCounts['Columns - calc'] = calcCnt
|
|
78
|
+
typeCounts['Columns - not calc'] = nodes.size - calcCnt
|
|
79
|
+
else
|
|
80
|
+
typeCounts[type] = typeCnt
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
# emit ' ---'
|
|
84
|
+
typeCounts.each do |t,c|
|
|
85
|
+
emit " tc: %3i %-s" % [c, t]
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
init
|
|
91
|
+
|
|
92
|
+
$paths.each do |path|
|
|
93
|
+
emit " p: #{path}"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
Dir.glob($path) {|twb| process twb }
|
|
97
|
+
|
|
98
|
+
emit "\n\n== Done ==\n "
|
data/lib/twb/datasource.rb
CHANGED
|
@@ -255,11 +255,23 @@ module Twb
|
|
|
255
255
|
@columnFieldsMap = {}
|
|
256
256
|
nodes = @node.xpath('.//column')
|
|
257
257
|
nodes.each do |n|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
@columnFieldsMap
|
|
258
|
+
# puts " "
|
|
259
|
+
# puts @columnFieldsMap.keys.inspect
|
|
260
|
+
name = n.attribute('name').text.sub(/^\[/,'').sub(/\]$/,'')
|
|
261
|
+
loaded = @columnFieldsMap.has_key? name
|
|
262
|
+
if loaded
|
|
263
|
+
# puts "LOADED"
|
|
264
|
+
field = @columnFieldsMap[name]
|
|
265
|
+
# puts "#{field.class}"
|
|
266
|
+
field.loadAttributes(n)
|
|
267
|
+
else
|
|
268
|
+
field = Twb::ColumnField.new n, self
|
|
269
|
+
@columnFieldsMap[field.uiname] = field
|
|
270
|
+
@columnFieldsMap[field.name] = field
|
|
271
|
+
end
|
|
272
|
+
# puts "name:#{name}: \t nn:#{field.name}:\t loaded?:#{loaded} node:#{n}:"
|
|
262
273
|
end
|
|
274
|
+
@columnFields = @columnFieldsMap.values
|
|
263
275
|
return @columnFields
|
|
264
276
|
end
|
|
265
277
|
|
|
@@ -448,8 +460,10 @@ module Twb
|
|
|
448
460
|
|
|
449
461
|
def loadAllFields
|
|
450
462
|
@allFields = SortedSet.new
|
|
451
|
-
@allFields <<
|
|
452
|
-
@allFields <<
|
|
463
|
+
# dbFields.each { |f| @allFields << f }
|
|
464
|
+
# calculatedFields.each { |f| @allFields << f }
|
|
465
|
+
@allFields.merge dbFields
|
|
466
|
+
@allFields.merge calculatedFields
|
|
453
467
|
end
|
|
454
468
|
|
|
455
469
|
def has_field? fieldName
|
|
File without changes
|
|
File without changes
|
data/lib/twb/quickfilter.rb
CHANGED
|
@@ -120,7 +120,7 @@ module Twb
|
|
|
120
120
|
# filter class='relative-date' column='[Sample - Superstore].[none:Order Date:qk]' first-period='1' include-future='true' include-null='false' last-period='1' period-type='year' />
|
|
121
121
|
def resolveRelativeDate
|
|
122
122
|
emit "resolveRelativeDate"
|
|
123
|
-
periodType = @node['period-type']
|
|
123
|
+
periodType = @node['period-type'].nil? ? '' : @node['period-type']
|
|
124
124
|
inclFuture = @node['include-future'] == 'true'
|
|
125
125
|
firstPeriod = @node['first-period'].to_i
|
|
126
126
|
lastPeriod = @node['last-period'].to_i
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Gerrard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-05-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: creek
|
|
@@ -34,22 +34,22 @@ dependencies:
|
|
|
34
34
|
name: kramdown
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '1.17'
|
|
40
37
|
- - ">="
|
|
41
38
|
- !ruby/object:Gem::Version
|
|
42
39
|
version: 1.17.0
|
|
40
|
+
- - "~>"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '1.17'
|
|
43
43
|
type: :runtime
|
|
44
44
|
prerelease: false
|
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
|
-
- - "~>"
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: '1.17'
|
|
50
47
|
- - ">="
|
|
51
48
|
- !ruby/object:Gem::Version
|
|
52
49
|
version: 1.17.0
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '1.17'
|
|
53
53
|
description: A sollection of Ruby classes designed for accessing and recording information
|
|
54
54
|
about, and for manipulating, Tableau Workbooks and their contents.
|
|
55
55
|
email: Chris@Gerrard.net
|
|
@@ -57,48 +57,51 @@ executables: []
|
|
|
57
57
|
extensions: []
|
|
58
58
|
extra_rdoc_files: []
|
|
59
59
|
files:
|
|
60
|
+
- bin/twb.rb
|
|
60
61
|
- lib/t.rb
|
|
61
62
|
- lib/tfl/Flow.rb
|
|
62
63
|
- lib/twb.rb
|
|
64
|
+
- lib/twb/TwbTest.rb
|
|
63
65
|
- lib/twb/action.rb
|
|
64
|
-
- lib/twb/analysis/
|
|
65
|
-
- lib/twb/analysis/
|
|
66
|
-
- lib/twb/analysis/
|
|
67
|
-
- lib/twb/analysis/
|
|
68
|
-
- lib/twb/analysis/
|
|
69
|
-
- lib/twb/analysis/
|
|
70
|
-
- lib/twb/analysis/
|
|
71
|
-
- lib/twb/analysis/
|
|
72
|
-
- lib/twb/analysis/
|
|
73
|
-
- lib/twb/analysis/
|
|
74
|
-
- lib/twb/analysis/
|
|
75
|
-
- lib/twb/analysis/
|
|
76
|
-
- lib/twb/analysis/
|
|
77
|
-
- lib/twb/analysis/
|
|
78
|
-
- lib/twb/analysis/
|
|
79
|
-
- lib/twb/analysis/
|
|
80
|
-
- lib/twb/analysis/
|
|
81
|
-
- lib/twb/analysis/
|
|
82
|
-
- lib/twb/analysis/
|
|
83
|
-
- lib/twb/analysis/
|
|
84
|
-
- lib/twb/analysis/
|
|
85
|
-
- lib/twb/analysis/
|
|
86
|
-
- lib/twb/analysis/
|
|
87
|
-
- lib/twb/analysis/
|
|
88
|
-
- lib/twb/analysis/
|
|
89
|
-
- lib/twb/analysis/
|
|
90
|
-
- lib/twb/analysis/
|
|
91
|
-
- lib/twb/analysis/
|
|
92
|
-
- lib/twb/analysis/
|
|
93
|
-
- lib/twb/analysis/
|
|
94
|
-
- lib/twb/analysis/
|
|
95
|
-
- lib/twb/analysis/
|
|
96
|
-
- lib/twb/analysis/
|
|
66
|
+
- lib/twb/analysis/AnnotatedFieldsCSVEmitter.rb
|
|
67
|
+
- lib/twb/analysis/CalculatedFields/CSVEmitter.rb
|
|
68
|
+
- lib/twb/analysis/CalculatedFields/CalculatedFieldsAnalyzer.rb
|
|
69
|
+
- lib/twb/analysis/CalculatedFields/MarkdownEmitter.rb
|
|
70
|
+
- lib/twb/analysis/CalculatedFields/dotanalyzer.rb
|
|
71
|
+
- lib/twb/analysis/CalculatedFields/fieldsaliasesanalyzer.rb
|
|
72
|
+
- lib/twb/analysis/CalculatedFields/groupfieldsanalyzer.rb
|
|
73
|
+
- lib/twb/analysis/CalculatedFields/t.rb
|
|
74
|
+
- lib/twb/analysis/DataSources/DataSourceFieldsCSVEmitter.rb
|
|
75
|
+
- lib/twb/analysis/DataSources/DataSourceTableFieldsCSVEmitter.rb
|
|
76
|
+
- lib/twb/analysis/DataSources/categoricalcolorcodinganalyzer.rb
|
|
77
|
+
- lib/twb/analysis/DataSources/datasourcefieldsanalyzer.rb
|
|
78
|
+
- lib/twb/analysis/DataSources/datasourcefilesanalyzer.rb
|
|
79
|
+
- lib/twb/analysis/DataSources/datasourceoriginsanalyzer.rb
|
|
80
|
+
- lib/twb/analysis/DataSources/datasourcesenumerator.rb
|
|
81
|
+
- lib/twb/analysis/DataSources/datasourceslocationsanalyzer.rb
|
|
82
|
+
- lib/twb/analysis/DataSources/datasourcetablefieldsanalyzer.rb
|
|
83
|
+
- lib/twb/analysis/DataSources/extractsanalyzer.rb
|
|
84
|
+
- lib/twb/analysis/DataSources/fieldsaliasesanalyzer.rb
|
|
85
|
+
- lib/twb/analysis/DataSources/googlesheetdatasourcesanalyzer.rb
|
|
86
|
+
- lib/twb/analysis/DataSources/parametersanalyzer.rb
|
|
87
|
+
- lib/twb/analysis/DocumentedFieldsCSVEmitter.rb
|
|
88
|
+
- lib/twb/analysis/DocumentedFieldsMarkdownEmitter.rb
|
|
89
|
+
- lib/twb/analysis/Sheets/WorksheetDataStructureCSVEmitter.rb
|
|
90
|
+
- lib/twb/analysis/Sheets/analyzedashboardsheets.rb
|
|
91
|
+
- lib/twb/analysis/Sheets/dashboardsummarizer.rb
|
|
92
|
+
- lib/twb/analysis/Sheets/dashsheetsanalyzer.rb
|
|
93
|
+
- lib/twb/analysis/Sheets/sheetfieldsanalyzer.rb
|
|
94
|
+
- lib/twb/analysis/Sheets/sheetfiltersanalyzer.rb
|
|
95
|
+
- lib/twb/analysis/Sheets/sheetfiltersanalyzera.rb
|
|
96
|
+
- lib/twb/analysis/Sheets/sheetsintooltipanalyzer.rb
|
|
97
|
+
- lib/twb/analysis/Sheets/sheetsourcesanalyzer.rb
|
|
98
|
+
- lib/twb/analysis/Sheets/worksheetsummarizer.rb
|
|
97
99
|
- lib/twb/analysis/workbooksummaryanalyzer.rb
|
|
98
100
|
- lib/twb/calculatedfield.rb
|
|
99
101
|
- lib/twb/codedfield.rb
|
|
100
102
|
- lib/twb/columnfield.rb
|
|
101
103
|
- lib/twb/connection.rb
|
|
104
|
+
- lib/twb/countNodes.rb
|
|
102
105
|
- lib/twb/dashboard.rb
|
|
103
106
|
- lib/twb/datasource.rb
|
|
104
107
|
- lib/twb/dbfield.rb
|
|
@@ -107,14 +110,14 @@ files:
|
|
|
107
110
|
- lib/twb/docdashboardwebvert.rb
|
|
108
111
|
- lib/twb/field.rb
|
|
109
112
|
- lib/twb/fieldcalculation.rb
|
|
110
|
-
- lib/twb/
|
|
113
|
+
- lib/twb/findDSFields.rb
|
|
111
114
|
- lib/twb/graph.rb
|
|
112
115
|
- lib/twb/graphedges.rb
|
|
113
116
|
- lib/twb/graphnode.rb
|
|
114
117
|
- lib/twb/groupfield.rb
|
|
115
118
|
- lib/twb/hashtohtml.rb
|
|
116
119
|
- lib/twb/htmllistcollapsible.rb
|
|
117
|
-
- lib/twb/
|
|
120
|
+
- lib/twb/identifyFields.rb
|
|
118
121
|
- lib/twb/listXMLNodePathsAndAttributes.rb
|
|
119
122
|
- lib/twb/localfield.rb
|
|
120
123
|
- lib/twb/mappedfield.rb
|
|
@@ -127,15 +130,14 @@ files:
|
|
|
127
130
|
- lib/twb/tabtool.rb
|
|
128
131
|
- lib/twb/there.rb
|
|
129
132
|
- lib/twb/twbcodedfield.rb
|
|
130
|
-
- lib/twb/twbtest.rb
|
|
131
133
|
- lib/twb/util/atomizecsvrecords.rb
|
|
132
134
|
- lib/twb/util/csvrecordsatomizer.rb
|
|
133
135
|
- lib/twb/util/cypher.rb
|
|
134
136
|
- lib/twb/util/cypherpython.rb
|
|
135
137
|
- lib/twb/util/docprep.rb
|
|
136
|
-
- lib/twb/util/
|
|
138
|
+
- lib/twb/util/dotFileRenderer.rb
|
|
137
139
|
- lib/twb/util/fielddomainloader.rb
|
|
138
|
-
- lib/twb/util/
|
|
140
|
+
- lib/twb/util/ftpPublisher.rb
|
|
139
141
|
- lib/twb/util/gml.rb
|
|
140
142
|
- lib/twb/util/gmledge.rb
|
|
141
143
|
- lib/twb/util/graph.rb
|
|
@@ -144,11 +146,11 @@ files:
|
|
|
144
146
|
- lib/twb/util/graphnode.rb
|
|
145
147
|
- lib/twb/util/hashtohtml.rb
|
|
146
148
|
- lib/twb/util/htmllistcollapsible.rb
|
|
147
|
-
- lib/twb/util/
|
|
149
|
+
- lib/twb/util/joinUtilities.rb
|
|
148
150
|
- lib/twb/util/tabgraph.rb
|
|
149
|
-
- lib/twb/util/
|
|
150
|
-
- lib/twb/util/
|
|
151
|
-
- lib/twb/util/
|
|
151
|
+
- lib/twb/util/twbDashSheetDataDotBuilder.rb
|
|
152
|
+
- lib/twb/util/twbDashSheetDataDotRenderer.rb
|
|
153
|
+
- lib/twb/util/twbDashesSheetDataDotBuilder.rb
|
|
152
154
|
- lib/twb/util/xraydashboards.rb
|
|
153
155
|
- lib/twb/window.rb
|
|
154
156
|
- lib/twb/workbook.rb
|
|
@@ -188,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
188
190
|
- !ruby/object:Gem::Version
|
|
189
191
|
version: '0'
|
|
190
192
|
requirements: []
|
|
191
|
-
|
|
192
|
-
rubygems_version: 2.7.6
|
|
193
|
+
rubygems_version: 3.0.3
|
|
193
194
|
signing_key:
|
|
194
195
|
specification_version: 4
|
|
195
196
|
summary: Classes for accessing Tableau Workbooks and their contents.
|