Dataflows Gen1
create_dataflow_gen1(workspace, display_name, item_definition, *, description=None, folder=None, df=True)
Creates a new dataflow in the specified workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
display_name
|
str
|
The display name of the dataflow. |
required |
description
|
str
|
A description for the dataflow. |
None
|
folder
|
str
|
The folder to create the dataflow in. |
None
|
item_definition
|
Dict[str, Any]
|
The definition of the dataflow. |
required |
df
|
Optional[bool]
|
If True or not provided, returns a DataFrame with flattened keys. If False, returns a list of dictionaries. |
True
|
Returns:
| Type | Description |
|---|---|
Union[DataFrame, Dict[str, Any], None]
|
The created dataflow details. |
Examples:
create_dataflow_gen1(
workspace='MyProjectWorkspace',
display_name='SalesDataflowGen1',
item_definition={...},
description='This is a sales dataflow',
folder='SalesDataflowsFolder'
)
Source code in src/pyfabricops/items/dataflows_gen1.py
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 | |
delete_dataflow_gen1(workspace, dataflow)
Deletes a dataflow from the specified workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The name or ID of the workspace. |
required |
dataflow
|
str
|
The name or ID of the dataflow to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
If the dataflow is successfully deleted. |
Examples:
delete_dataflow_gen1('MyProjectWorkspace', 'SalesDataflowGen1')
delete_dataflow_gen1('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflowGen1')
Source code in src/pyfabricops/items/dataflows_gen1.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
get_dataflow_gen1(workspace, dataflow, *, df=True)
Get a Power BI dataflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The name of the dataflow. |
required |
df
|
Optional[bool]
|
If True or not provided, returns a DataFrame with flattened keys. If False, returns a list of dictionaries. |
True
|
Returns:
| Type | Description |
|---|---|
Union[DataFrame, Dict[str, Any], None]
|
The dataflow. |
Examples:
get_dataflow_gen1('MyProjectWorkspace', 'SalesDataflowGen1')
get_dataflow_gen1('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflowGen1')
Source code in src/pyfabricops/items/dataflows_gen1.py
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 | |
get_dataflow_gen1_definition(workspace, dataflow)
Get the definition of a Power BI dataflow Gen1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The dataflow name or ID. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict | None
|
The dataflow definition. |
Examples:
get_dataflow_gen1_definition('MyProjectWorkspace', 'SalesDataflowGen1')
get_dataflow_gen1_definition('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflowGen1')
Source code in src/pyfabricops/items/dataflows_gen1.py
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 | |
get_dataflow_gen1_id(workspace, dataflow_name)
Retrieves the ID of a Gen1 dataflow by its name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataflow_name
|
str
|
The name of the dataflow. |
required |
Returns:
| Type | Description |
|---|---|
Union[str, None]
|
str | None: The ID of the dataflow if found, otherwise None. |
Source code in src/pyfabricops/items/dataflows_gen1.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
get_dataflow_gen1_transactions(workspace, dataflow, *, df=True)
Get transactions for a dataflow in a workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The dataflow name or ID. |
required |
df
|
Optional[bool]
|
If True or not provided, returns a DataFrame with flattened keys. If False, returns a list of dictionaries. |
True
|
Returns:
| Type | Description |
|---|---|
Union[DataFrame, List[Dict[str, Any]], None]
|
Union[DataFrame, List[Dict[str, Any]], None]: The dataflow transactions or None if not found. |
Examples:
get_dataflow_gen1_transactions('MyProjectWorkspace', 'SalesDataflowGen1')
get_dataflow_gen1_transactions('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflowGen1')
Source code in src/pyfabricops/items/dataflows_gen1.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | |
get_dataflows_gen1_datasources(workspace, dataflow, *, df=True)
Get the data sources for a dataflow in a workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The dataflow name or ID. |
required |
df
|
Optional[bool]
|
If True or not provided, returns a DataFrame with flattened keys. If False, returns a list of dictionaries. |
True
|
Returns:
| Type | Description |
|---|---|
Union[DataFrame, List[Dict[str, Any]], None]
|
Union[DataFrame, List[Dict[str, Any]], None]: The dataflow datasources or None if not found. |
Examples:
get_dataflows_gen1_datasources('MyProjectWorkspace', 'SalesDataflowGen1')
get_dataflows_gen1_datasources('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflowGen1')
Source code in src/pyfabricops/items/dataflows_gen1.py
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | |
list_dataflows_gen1(workspace, *, df=True)
Returns a list of Gen1 dataflows in a specified workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The name or ID of the workspace. |
required |
df
|
Optional[bool]
|
If True or not provided, returns a DataFrame with flattened keys. If False, returns a list of dictionaries. |
True
|
Returns:
| Type | Description |
|---|---|
Union[DataFrame, List[Dict[str, Any]], None]
|
A list of Gen1 dataflows or a DataFrame if df is True. |
Source code in src/pyfabricops/items/dataflows_gen1.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
refresh_dataflow_gen1(workspace, dataflow, *, process_type='default', notify_option='NoNotification')
Refresh a dataflow in the specified workspace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The name or ID of the dataflow to refresh. |
required |
process_type
|
str
|
The process type to use for the refresh. Defaults to 'default'. |
'default'
|
notify_option
|
Literal['MailOnFailure', 'NoNotification']
|
The notification option to use for the refresh. Defaults to 'NoNotification'. |
'NoNotification'
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
If the refresh was successful. |
Examples:
refresh_dataflow_gen1('MyProjectWorkspace', 'SalesDataflow')
refresh_dataflow_gen1('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflow')
Source code in src/pyfabricops/items/dataflows_gen1.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
resolve_dataflow_gen1(workspace, dataflow)
Resolves a dataflow name to its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The name or ID of the workspace. |
required |
dataflow
|
str
|
The name or ID of the dataflow. |
required |
Returns:
| Type | Description |
|---|---|
Union[str, None]
|
str | None: The ID of the dataflow if found, otherwise None. |
Source code in src/pyfabricops/items/dataflows_gen1.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
takeover_dataflow_gen1(workspace, dataflow)
Take over a dataflow in a workspace
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The dataflow name or ID. |
required |
Examples:
takeover_dataflow_gen1('MyProjectWorkspace', 'SalesDataflowGen1')
takeover_dataflow_gen1('123e4567-e89b-12d3-a456-426614174000', 'SalesDataflowGen1')
Source code in src/pyfabricops/items/dataflows_gen1.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |
update_dataflow_gen1(workspace, dataflow, *, display_name=None, description=None, df=True)
Updates the properties of the specified dataflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The name or ID of the dataflow to update. |
required |
display_name
|
str
|
The new display name for the dataflow. |
None
|
description
|
str
|
The new description for the dataflow. |
None
|
df
|
bool
|
Keyword-only. If True, returns a DataFrame with flattened keys. Defaults to False. |
True
|
Returns:
| Type | Description |
|---|---|
Union[DataFrame, Dict[str, Any], None]
|
The updated dataflow details if successful, otherwise None. |
Examples:
update_dataflow_gen1('MyProjectWorkspace', 'SalesDataflowGen1', display_name='UpdatedSalesDataflowGen1')
update_dataflow_gen1('MyProjectWorkspace', '123e4567-e89b-12d3-a456-426614174000', description='Updated description')
Source code in src/pyfabricops/items/dataflows_gen1.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
update_dataflow_gen1_definition(workspace, dataflow, item_definition)
Updates the definition of an existing dataflow in the specified workspace. If the dataflow does not exist, it returns None.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace
|
str
|
The workspace name or ID. |
required |
dataflow
|
str
|
The name or ID of the dataflow to update. |
required |
item_definition
|
Dict[str, Any]
|
The item_definition of the dataflow. |
required |
df
|
Optional[bool]
|
If True or not provided, returns a DataFrame with flattened keys. If False, returns a list of dictionaries. |
required |
Returns:
| Type | Description |
|---|---|
Union[DataFrame, Dict[str, Any], None]
|
The updated dataflow details if successful, otherwise None. |
Examples:
update_dataflow_gen1_definition(
workspace='MyProjectWorkspace',
dataflow='SalesDataflowGen1',
item_definition={...} # The definition of the dataflow
)
Source code in src/pyfabricops/items/dataflows_gen1.py
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 | |