@@ -38,10 +38,39 @@ Saves any changes to the workbook to a new file specified by the `new_file` para
38
38
39
39
` self.filename: ` Returns the filename of the workbook.
40
40
41
+ ` self.shapes ` Returns a list of strings with the names of shapes found in the workbook.
42
+
41
43
## Datasources
42
44
``` python
43
45
class Datasource (dsxml , filename = None )
44
46
```
47
+ A class representing Tableau Data Sources , embedded in workbook files or in TDS files .
48
+
49
+ **Params :**
50
+
51
+ ** Raises:**
52
+
53
+ ** Methods:**
54
+
55
+ save
56
+
57
+ save_as
58
+
59
+ add_calculation
60
+
61
+ ** Properities:**
62
+
63
+ `self .name` Returns string with the name of datasource.
64
+
65
+ `self .version` Returns string of daatasource' s version.
66
+
67
+ `self .caption` Returns string of user defined name of datasource if exists.
68
+
69
+ `self .connections` Returns list of connections are used in workbook.
70
+
71
+ `self .fileds` Returns key- value result of field name and their attributes.
72
+
73
+ `self .calculations` Returns calculated field of the workbook.
45
74
46
75
# # Connections
47
76
```python
@@ -74,5 +103,48 @@ The Connection class represents a tableau data connection. It can be from any ty
74
103
75
104
# # Fields
76
105
```python
77
- class Workbook (column_xml = None , metadata_xml = None )
106
+ class Field (column_xml = None , metadata_xml = None )
78
107
```
108
+
109
+ Represents a field in a datasource
110
+
111
+ **Raises :**
112
+
113
+ ** Methods:**
114
+ `Field.create_field_xml()` Create field from scratch.
115
+
116
+ `Field.add_alias(self , key, value)` Add an alias for a given display value.
117
+
118
+ ** Properities:**
119
+
120
+ `self .name` Returns a string providing a nice name for the field which is derived from the alias, caption, or the id .
121
+
122
+ `self .id` Returns a string with name of the field as specified in the file , usually surrounded by [ ].
123
+
124
+ `self .xml` Returns a ElementTree object which represents an XML of the field.
125
+
126
+ `self .caption` Returns a string with the name of the field as displayed in Tableau unless an aliases is defined.
127
+
128
+ `self .alias` Returns a string with the name of the field as displayed in Tableau if the default name isn' t wanted.
129
+
130
+ `self .datatype` Returns a string with the type of the field within Tableau (string, integer, etc).
131
+
132
+ `self .role` Returns a string which identify field as a Dimension or Measure.
133
+
134
+ `self .type` Returns a string with type of field (quantitative, ordinal, nominal).
135
+
136
+ `self .aliases` Returns Key- value mappings of all aliases that are registered under this field.
137
+
138
+ `self .is_quantitative` Returns a boolean if field is quantitative.
139
+
140
+ `self .is_ordinal` Returns a boolean if field is categorical that has a specific order.
141
+
142
+ `self .is_nominal` Returns a boolean if field is categorical that does not have a specific order.
143
+
144
+ `self .calculation` Returns a string with the formula if this field is a calculated field.
145
+
146
+ `self .default_aggregation` Returns a string with he default type of aggregation on the field (e.g Sum, Avg).
147
+
148
+ `self .description` Returns a string with contents of the < desc> tag on a field.
149
+
150
+ `self .worksheets` Returns a list of strings with the worksheet' s names uses this field.
0 commit comments