1
- import datetime as dt
2
1
import logging
3
2
from dataclasses import dataclass
4
3
13
12
14
13
15
14
@dataclass (frozen = True , kw_only = True )
16
- class HistoricalRecord :
15
+ class Historical :
17
16
workspace_id : int
18
- """The identifier of the workspace where this record was generated."""
17
+ """The identifier of the workspace where this historical record was generated."""
19
18
20
19
job_run_id : int
21
- """The identifier of the job run that generated this record."""
20
+ """The identifier of the job run that generated this historical record."""
22
21
23
22
object_type : str
24
- """The inventory table for which this record was generated."""
23
+ """The inventory table for which this historical record was generated."""
25
24
26
25
object_id : list [str ]
27
- """The type-specific identifier for this inventory record."""
26
+ """The type-specific identifier for the corresponding inventory record."""
28
27
29
28
data : dict [str , str ]
30
29
"""Type-specific JSON-encoded data of the inventory record."""
@@ -39,7 +38,7 @@ class HistoricalRecord:
39
38
"""The UCX semantic version."""
40
39
41
40
snapshot_id : str | None = None
42
- """An identifier that is unique to the records produced for a given snapshot."""
41
+ """An identifier that is unique to the historical records produced for a given snapshot."""
43
42
44
43
object_type_version : int = 0
45
44
"""Versioning of inventory table, for forward compatibility."""
@@ -57,5 +56,5 @@ def __init__(self, sql_backend: SqlBackend, ucx_catalog: str) -> None:
57
56
def run (self ) -> None :
58
57
self ._schema_deployer .deploy_schema ()
59
58
self ._schema_deployer .deploy_table ("workflow_runs" , WorkflowRun )
60
- self ._schema_deployer .deploy_table ("historical_records " , HistoricalRecord )
59
+ self ._schema_deployer .deploy_table ("historical " , Historical )
61
60
logger .info ("Installation completed successfully!" )
0 commit comments