1
1
import datetime as dt
2
2
import logging
3
- from dataclasses import dataclass
4
3
5
4
from databricks .labs .lsql .backends import Dataclass , SqlBackend
6
5
from databricks .sdk .errors import InternalError
12
11
logger = logging .getLogger (__name__ )
13
12
14
13
15
- @dataclass
16
- class Record :
17
- workspace_id : int # The workspace id
18
- run_id : int # The workflow run id that crawled the objects
19
- run_start_time : dt .datetime # The workflow run timestamp that crawled the objects
20
- object_type : str # The object type, e.g. TABLE, VIEW. Forms a composite key together with object_id
21
- object_id : str # The object id, e.g. hive_metastore.database.table. Forms a composite key together with object_id
22
- object_data : str # The object data; the attributes of the corresponding ucx data class, e.g. table name, table ...
23
- failures : list # The failures indicating the object is not UC compatible
24
- owner : str # The object owner
25
- ucx_version : str # The ucx semantic version
26
- snapshot_id : int # An identifier for the snapshot
27
-
28
-
29
14
class HistoryInstallation :
30
15
"""Install resources for UCX's artifacts history.
31
16
@@ -40,7 +25,6 @@ def __init__(self, sql_backend: SqlBackend, ucx_catalog: str) -> None:
40
25
41
26
def run (self ) -> None :
42
27
self ._create_schema ()
43
- self ._create_table ("records" , Record )
44
28
logger .info ("Installation completed successfully!" )
45
29
46
30
@retried (on = [InternalError ], timeout = dt .timedelta (minutes = 1 ))
0 commit comments