Table#
Bases: SsasRefreshRecord
TBD.
SSAS spec: Microsoft
Source code in pbi_core/ssas/model_tables/table/table.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
description
class-attribute
instance-attribute
#
A description of the table, which may be used in the hover tooltip in edit mode
exclude_from_model_refresh
class-attribute
instance-attribute
#
Controls whether this table is included in the model-wide refresh process
is_hidden
class-attribute
instance-attribute
#
Controls whether the table appears in the edit mode of the report
model_id
class-attribute
instance-attribute
#
The ID of the model this table belongs to
name
class-attribute
instance-attribute
#
The name of the table as it appears in the report
columns #
Get associated dependent partitions.
Returns:
| Type | Description |
|---|---|
set[Column]
|
A list of the columns in this table |
data #
Extracts records from the table in SSAS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
head
|
int
|
The number of records to return from the table. |
100
|
Returns:
| Type | Description |
|---|---|
list[dict[str, int | float | str]]
|
list[dict[str, int | float | str]]: A list of SSAS records in dictionary form. The keys are the field names and the values are the record values |
Source code in pbi_core/ssas/model_tables/table/table.py
hierarchies #
Get associated dependent hierarchies.
Returns:
| Type | Description |
|---|---|
set[Hierarchy]
|
A list of the hierarchies defined on this table |
Source code in pbi_core/ssas/model_tables/table/table.py
measures #
Get measures that logically depend on this table.
Examples:
print(measure.expression)
# sumx(example, [a])
Table(name=example).measures()
# [..., Measure(name='measure'), ...]
Args: recursive (bool): Whether to include measures that depend on other measures.
Returns:
| Type | Description |
|---|---|
set[Measure]
|
A list of measures that logically depend this table |
Note
These measures are not necessarily saved physically to this table. For that use table.table_measures()
Source code in pbi_core/ssas/model_tables/table/table.py
partitions #
Get associated dependent partitions.
Returns:
| Type | Description |
|---|---|
set[Partition]
|
A list of the partitions containing data for this table |
Source code in pbi_core/ssas/model_tables/table/table.py
refresh #
Needs a model refresh to properly propogate the update.
Source code in pbi_core/ssas/model_tables/table/table.py
set_name #
Renames the measure and update any dependent expressions to use the new name.
Since measures are referenced by name in DAX expressions, renaming a measure will break any dependent expressions.
Source code in pbi_core/ssas/model_tables/table/table.py
table_measures #
Get measures saved to this table.
These are the measures that can be found under the table in the model structure.
Returns:
| Type | Description |
|---|---|
set[Measure]
|
A list of measures saved to this table |
Note
These measures do not necessarily have calculations that depend on this table.
For that use table.measures()