szymon_dybczak
Esteemed Contributor III

Hi @shubham007 ,

They made refactoring to that module in last month so that's why it stopped working. Probably Lakebridge for SQL Source System Migration module was recorded before that change.

And why they made change? It is explained here:

szymon_dybczak_0-1756815104306.png

Split recon execute into smaller modules (#1892) · databrickslabs/lakebridge@7caba7a · GitHub

So now the correct way to use this module is like this:

lakebridge/docs/lakebridge/docs/reconcile/index.mdx at 7caba7a3d6d96850f7b9662307ebdaad392bfc80 · da...

 

from databricks.labs.lakebridge import __version__
from databricks.sdk import WorkspaceClient

from databricks.labs.lakebridge.reconcile.trigger_recon_service import TriggerReconService
from databricks.labs.lakebridge.reconcile.exception import ReconciliationException

ws = WorkspaceClient(product="lakebridge", product_version=__version__)


try:
  result = TriggerReconService.trigger_recon(
            ws = ws,
            spark = spark, # notebook spark session
            table_recon = table_recon, # previously created
            reconcile_config = reconcile_config # previously created
          )
  print(result.recon_id)
  print(result)
except ReconciliationException as e:
    recon_id = e.reconcile_output.recon_id
    print(f" Failed : {recon_id}")
    print(e)
except Exception as e:
    print(e.with_traceback)
    raise e
    print(f"Exception : {str(e)}")