11import logging
2+ from dataclasses import dataclass
23
34from databricks .labs .lsql .backends import SqlBackend
45from databricks .labs .lsql .deployment import SchemaDeployer
6+
7+ from databricks .labs .ucx .__about__ import __version__
58from databricks .labs .ucx .progress .workflow_runs import WorkflowRun
69
10+
711logger = logging .getLogger (__name__ )
812
913
14+ @dataclass (frozen = True , kw_only = True )
15+ class Historical :
16+ workspace_id : int
17+ """The identifier of the workspace where this historical record was generated."""
18+
19+ job_run_id : int
20+ """The identifier of the job run that generated this historical record."""
21+
22+ object_type : str
23+ """The inventory table for which this historical record was generated."""
24+
25+ object_id : list [str ]
26+ """The type-specific identifier for the corresponding inventory record."""
27+
28+ data : dict [str , str ]
29+ """Type-specific JSON-encoded data of the inventory record."""
30+
31+ failures : list [str ]
32+ """The list of problems associated with the object that this inventory record covers."""
33+
34+ owner : str
35+ """The identity that has ownership of the object."""
36+
37+ ucx_version : str = __version__
38+ """The UCX semantic version."""
39+
40+
1041class ProgressTrackingInstallation :
1142 """Install resources for UCX's progress tracking."""
1243
@@ -19,4 +50,5 @@ def __init__(self, sql_backend: SqlBackend, ucx_catalog: str) -> None:
1950 def run (self ) -> None :
2051 self ._schema_deployer .deploy_schema ()
2152 self ._schema_deployer .deploy_table ("workflow_runs" , WorkflowRun )
53+ self ._schema_deployer .deploy_table ("historical" , Historical )
2254 logger .info ("Installation completed successfully!" )
0 commit comments