databricks-sdk 0.26.0__py3-none-any.whl → 0.27.0__py3-none-any.whl

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.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

@@ -60,6 +60,10 @@ class CreatePipeline:
60
60
  id: Optional[str] = None
61
61
  """Unique identifier for this pipeline."""
62
62
 
63
+ ingestion_definition: Optional[ManagedIngestionPipelineDefinition] = None
64
+ """The configuration for a managed ingestion pipeline. These settings cannot be used with the
65
+ 'libraries', 'target' or 'catalog' settings."""
66
+
63
67
  libraries: Optional[List[PipelineLibrary]] = None
64
68
  """Libraries or code needed by this deployment."""
65
69
 
@@ -101,6 +105,7 @@ class CreatePipeline:
101
105
  if self.edition is not None: body['edition'] = self.edition
102
106
  if self.filters: body['filters'] = self.filters.as_dict()
103
107
  if self.id is not None: body['id'] = self.id
108
+ if self.ingestion_definition: body['ingestion_definition'] = self.ingestion_definition.as_dict()
104
109
  if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
105
110
  if self.name is not None: body['name'] = self.name
106
111
  if self.notifications: body['notifications'] = [v.as_dict() for v in self.notifications]
@@ -126,6 +131,8 @@ class CreatePipeline:
126
131
  edition=d.get('edition', None),
127
132
  filters=_from_dict(d, 'filters', Filters),
128
133
  id=d.get('id', None),
134
+ ingestion_definition=_from_dict(d, 'ingestion_definition',
135
+ ManagedIngestionPipelineDefinition),
129
136
  libraries=_repeated_dict(d, 'libraries', PipelineLibrary),
130
137
  name=d.get('name', None),
131
138
  notifications=_repeated_dict(d, 'notifications', Notifications),
@@ -262,6 +269,10 @@ class EditPipeline:
262
269
  id: Optional[str] = None
263
270
  """Unique identifier for this pipeline."""
264
271
 
272
+ ingestion_definition: Optional[ManagedIngestionPipelineDefinition] = None
273
+ """The configuration for a managed ingestion pipeline. These settings cannot be used with the
274
+ 'libraries', 'target' or 'catalog' settings."""
275
+
265
276
  libraries: Optional[List[PipelineLibrary]] = None
266
277
  """Libraries or code needed by this deployment."""
267
278
 
@@ -307,6 +318,7 @@ class EditPipeline:
307
318
  body['expected_last_modified'] = self.expected_last_modified
308
319
  if self.filters: body['filters'] = self.filters.as_dict()
309
320
  if self.id is not None: body['id'] = self.id
321
+ if self.ingestion_definition: body['ingestion_definition'] = self.ingestion_definition.as_dict()
310
322
  if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
311
323
  if self.name is not None: body['name'] = self.name
312
324
  if self.notifications: body['notifications'] = [v.as_dict() for v in self.notifications]
@@ -333,6 +345,8 @@ class EditPipeline:
333
345
  expected_last_modified=d.get('expected_last_modified', None),
334
346
  filters=_from_dict(d, 'filters', Filters),
335
347
  id=d.get('id', None),
348
+ ingestion_definition=_from_dict(d, 'ingestion_definition',
349
+ ManagedIngestionPipelineDefinition),
336
350
  libraries=_repeated_dict(d, 'libraries', PipelineLibrary),
337
351
  name=d.get('name', None),
338
352
  notifications=_repeated_dict(d, 'notifications', Notifications),
@@ -535,6 +549,27 @@ class GetUpdateResponse:
535
549
  return cls(update=_from_dict(d, 'update', UpdateInfo))
536
550
 
537
551
 
552
+ @dataclass
553
+ class IngestionConfig:
554
+ schema: Optional[SchemaSpec] = None
555
+ """Select tables from a specific source schema."""
556
+
557
+ table: Optional[TableSpec] = None
558
+ """Select tables from a specific source table."""
559
+
560
+ def as_dict(self) -> dict:
561
+ """Serializes the IngestionConfig into a dictionary suitable for use as a JSON request body."""
562
+ body = {}
563
+ if self.schema: body['schema'] = self.schema.as_dict()
564
+ if self.table: body['table'] = self.table.as_dict()
565
+ return body
566
+
567
+ @classmethod
568
+ def from_dict(cls, d: Dict[str, any]) -> IngestionConfig:
569
+ """Deserializes the IngestionConfig from a dictionary."""
570
+ return cls(schema=_from_dict(d, 'schema', SchemaSpec), table=_from_dict(d, 'table', TableSpec))
571
+
572
+
538
573
  @dataclass
539
574
  class ListPipelineEventsResponse:
540
575
  events: Optional[List[PipelineEvent]] = None
@@ -611,6 +646,35 @@ class ListUpdatesResponse:
611
646
  updates=_repeated_dict(d, 'updates', UpdateInfo))
612
647
 
613
648
 
649
+ @dataclass
650
+ class ManagedIngestionPipelineDefinition:
651
+ connection_name: Optional[str] = None
652
+ """Immutable. The Unity Catalog connection this ingestion pipeline uses to communicate with the
653
+ source. Specify either ingestion_gateway_id or connection_name."""
654
+
655
+ ingestion_gateway_id: Optional[str] = None
656
+ """Immutable. Identifier for the ingestion gateway used by this ingestion pipeline to communicate
657
+ with the source. Specify either ingestion_gateway_id or connection_name."""
658
+
659
+ objects: Optional[List[IngestionConfig]] = None
660
+ """Required. Settings specifying tables to replicate and the destination for the replicated tables."""
661
+
662
+ def as_dict(self) -> dict:
663
+ """Serializes the ManagedIngestionPipelineDefinition into a dictionary suitable for use as a JSON request body."""
664
+ body = {}
665
+ if self.connection_name is not None: body['connection_name'] = self.connection_name
666
+ if self.ingestion_gateway_id is not None: body['ingestion_gateway_id'] = self.ingestion_gateway_id
667
+ if self.objects: body['objects'] = [v.as_dict() for v in self.objects]
668
+ return body
669
+
670
+ @classmethod
671
+ def from_dict(cls, d: Dict[str, any]) -> ManagedIngestionPipelineDefinition:
672
+ """Deserializes the ManagedIngestionPipelineDefinition from a dictionary."""
673
+ return cls(connection_name=d.get('connection_name', None),
674
+ ingestion_gateway_id=d.get('ingestion_gateway_id', None),
675
+ objects=_repeated_dict(d, 'objects', IngestionConfig))
676
+
677
+
614
678
  @dataclass
615
679
  class ManualTrigger:
616
680
 
@@ -1283,6 +1347,10 @@ class PipelineSpec:
1283
1347
  id: Optional[str] = None
1284
1348
  """Unique identifier for this pipeline."""
1285
1349
 
1350
+ ingestion_definition: Optional[ManagedIngestionPipelineDefinition] = None
1351
+ """The configuration for a managed ingestion pipeline. These settings cannot be used with the
1352
+ 'libraries', 'target' or 'catalog' settings."""
1353
+
1286
1354
  libraries: Optional[List[PipelineLibrary]] = None
1287
1355
  """Libraries or code needed by this deployment."""
1288
1356
 
@@ -1322,6 +1390,7 @@ class PipelineSpec:
1322
1390
  if self.edition is not None: body['edition'] = self.edition
1323
1391
  if self.filters: body['filters'] = self.filters.as_dict()
1324
1392
  if self.id is not None: body['id'] = self.id
1393
+ if self.ingestion_definition: body['ingestion_definition'] = self.ingestion_definition.as_dict()
1325
1394
  if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
1326
1395
  if self.name is not None: body['name'] = self.name
1327
1396
  if self.notifications: body['notifications'] = [v.as_dict() for v in self.notifications]
@@ -1345,6 +1414,8 @@ class PipelineSpec:
1345
1414
  edition=d.get('edition', None),
1346
1415
  filters=_from_dict(d, 'filters', Filters),
1347
1416
  id=d.get('id', None),
1417
+ ingestion_definition=_from_dict(d, 'ingestion_definition',
1418
+ ManagedIngestionPipelineDefinition),
1348
1419
  libraries=_repeated_dict(d, 'libraries', PipelineLibrary),
1349
1420
  name=d.get('name', None),
1350
1421
  notifications=_repeated_dict(d, 'notifications', Notifications),
@@ -1436,6 +1507,40 @@ class PipelineTrigger:
1436
1507
  return cls(cron=_from_dict(d, 'cron', CronTrigger), manual=_from_dict(d, 'manual', ManualTrigger))
1437
1508
 
1438
1509
 
1510
+ @dataclass
1511
+ class SchemaSpec:
1512
+ destination_catalog: Optional[str] = None
1513
+ """Required. Destination catalog to store tables."""
1514
+
1515
+ destination_schema: Optional[str] = None
1516
+ """Required. Destination schema to store tables in. Tables with the same name as the source tables
1517
+ are created in this destination schema. The pipeline fails If a table with the same name already
1518
+ exists."""
1519
+
1520
+ source_catalog: Optional[str] = None
1521
+ """The source catalog name. Might be optional depending on the type of source."""
1522
+
1523
+ source_schema: Optional[str] = None
1524
+ """Required. Schema name in the source database."""
1525
+
1526
+ def as_dict(self) -> dict:
1527
+ """Serializes the SchemaSpec into a dictionary suitable for use as a JSON request body."""
1528
+ body = {}
1529
+ if self.destination_catalog is not None: body['destination_catalog'] = self.destination_catalog
1530
+ if self.destination_schema is not None: body['destination_schema'] = self.destination_schema
1531
+ if self.source_catalog is not None: body['source_catalog'] = self.source_catalog
1532
+ if self.source_schema is not None: body['source_schema'] = self.source_schema
1533
+ return body
1534
+
1535
+ @classmethod
1536
+ def from_dict(cls, d: Dict[str, any]) -> SchemaSpec:
1537
+ """Deserializes the SchemaSpec from a dictionary."""
1538
+ return cls(destination_catalog=d.get('destination_catalog', None),
1539
+ destination_schema=d.get('destination_schema', None),
1540
+ source_catalog=d.get('source_catalog', None),
1541
+ source_schema=d.get('source_schema', None))
1542
+
1543
+
1439
1544
  @dataclass
1440
1545
  class Sequencing:
1441
1546
  control_plane_seq_no: Optional[int] = None
@@ -1603,6 +1708,49 @@ class StopPipelineResponse:
1603
1708
  return cls()
1604
1709
 
1605
1710
 
1711
+ @dataclass
1712
+ class TableSpec:
1713
+ destination_catalog: Optional[str] = None
1714
+ """Required. Destination catalog to store table."""
1715
+
1716
+ destination_schema: Optional[str] = None
1717
+ """Required. Destination schema to store table."""
1718
+
1719
+ destination_table: Optional[str] = None
1720
+ """Optional. Destination table name. The pipeline fails If a table with that name already exists.
1721
+ If not set, the source table name is used."""
1722
+
1723
+ source_catalog: Optional[str] = None
1724
+ """Source catalog name. Might be optional depending on the type of source."""
1725
+
1726
+ source_schema: Optional[str] = None
1727
+ """Schema name in the source database. Might be optional depending on the type of source."""
1728
+
1729
+ source_table: Optional[str] = None
1730
+ """Required. Table name in the source database."""
1731
+
1732
+ def as_dict(self) -> dict:
1733
+ """Serializes the TableSpec into a dictionary suitable for use as a JSON request body."""
1734
+ body = {}
1735
+ if self.destination_catalog is not None: body['destination_catalog'] = self.destination_catalog
1736
+ if self.destination_schema is not None: body['destination_schema'] = self.destination_schema
1737
+ if self.destination_table is not None: body['destination_table'] = self.destination_table
1738
+ if self.source_catalog is not None: body['source_catalog'] = self.source_catalog
1739
+ if self.source_schema is not None: body['source_schema'] = self.source_schema
1740
+ if self.source_table is not None: body['source_table'] = self.source_table
1741
+ return body
1742
+
1743
+ @classmethod
1744
+ def from_dict(cls, d: Dict[str, any]) -> TableSpec:
1745
+ """Deserializes the TableSpec from a dictionary."""
1746
+ return cls(destination_catalog=d.get('destination_catalog', None),
1747
+ destination_schema=d.get('destination_schema', None),
1748
+ destination_table=d.get('destination_table', None),
1749
+ source_catalog=d.get('source_catalog', None),
1750
+ source_schema=d.get('source_schema', None),
1751
+ source_table=d.get('source_table', None))
1752
+
1753
+
1606
1754
  @dataclass
1607
1755
  class UpdateInfo:
1608
1756
  cause: Optional[UpdateInfoCause] = None
@@ -1834,6 +1982,7 @@ class PipelinesAPI:
1834
1982
  edition: Optional[str] = None,
1835
1983
  filters: Optional[Filters] = None,
1836
1984
  id: Optional[str] = None,
1985
+ ingestion_definition: Optional[ManagedIngestionPipelineDefinition] = None,
1837
1986
  libraries: Optional[List[PipelineLibrary]] = None,
1838
1987
  name: Optional[str] = None,
1839
1988
  notifications: Optional[List[Notifications]] = None,
@@ -1872,6 +2021,9 @@ class PipelinesAPI:
1872
2021
  Filters on which Pipeline packages to include in the deployed graph.
1873
2022
  :param id: str (optional)
1874
2023
  Unique identifier for this pipeline.
2024
+ :param ingestion_definition: :class:`ManagedIngestionPipelineDefinition` (optional)
2025
+ The configuration for a managed ingestion pipeline. These settings cannot be used with the
2026
+ 'libraries', 'target' or 'catalog' settings.
1875
2027
  :param libraries: List[:class:`PipelineLibrary`] (optional)
1876
2028
  Libraries or code needed by this deployment.
1877
2029
  :param name: str (optional)
@@ -1905,6 +2057,7 @@ class PipelinesAPI:
1905
2057
  if edition is not None: body['edition'] = edition
1906
2058
  if filters is not None: body['filters'] = filters.as_dict()
1907
2059
  if id is not None: body['id'] = id
2060
+ if ingestion_definition is not None: body['ingestion_definition'] = ingestion_definition.as_dict()
1908
2061
  if libraries is not None: body['libraries'] = [v.as_dict() for v in libraries]
1909
2062
  if name is not None: body['name'] = name
1910
2063
  if notifications is not None: body['notifications'] = [v.as_dict() for v in notifications]
@@ -2233,6 +2386,7 @@ class PipelinesAPI:
2233
2386
  expected_last_modified: Optional[int] = None,
2234
2387
  filters: Optional[Filters] = None,
2235
2388
  id: Optional[str] = None,
2389
+ ingestion_definition: Optional[ManagedIngestionPipelineDefinition] = None,
2236
2390
  libraries: Optional[List[PipelineLibrary]] = None,
2237
2391
  name: Optional[str] = None,
2238
2392
  notifications: Optional[List[Notifications]] = None,
@@ -2274,6 +2428,9 @@ class PipelinesAPI:
2274
2428
  Filters on which Pipeline packages to include in the deployed graph.
2275
2429
  :param id: str (optional)
2276
2430
  Unique identifier for this pipeline.
2431
+ :param ingestion_definition: :class:`ManagedIngestionPipelineDefinition` (optional)
2432
+ The configuration for a managed ingestion pipeline. These settings cannot be used with the
2433
+ 'libraries', 'target' or 'catalog' settings.
2277
2434
  :param libraries: List[:class:`PipelineLibrary`] (optional)
2278
2435
  Libraries or code needed by this deployment.
2279
2436
  :param name: str (optional)
@@ -2307,6 +2464,7 @@ class PipelinesAPI:
2307
2464
  if expected_last_modified is not None: body['expected_last_modified'] = expected_last_modified
2308
2465
  if filters is not None: body['filters'] = filters.as_dict()
2309
2466
  if id is not None: body['id'] = id
2467
+ if ingestion_definition is not None: body['ingestion_definition'] = ingestion_definition.as_dict()
2310
2468
  if libraries is not None: body['libraries'] = [v.as_dict() for v in libraries]
2311
2469
  if name is not None: body['name'] = name
2312
2470
  if notifications is not None: body['notifications'] = [v.as_dict() for v in notifications]