cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Lakeflow Connect – Hard Deletion Sync: GA Timeline and Production Readiness

faruk
Contributor II

Hello Databricks Community,

We are using a Lakeflow Connect managed ingestion pipeline with the query-based connector to ingest Oracle tables via Unity Catalog foreign catalogs (Lakehouse Federation) on Azure Databricks.

One of our requirements is to capture rows that have been physically deleted from the source Oracle tables.

To achieve this, we configure the hard_deletion_sync_min_interval_in_seconds parameter via the API for each table that has both a cursor column and primary keys. We noticed that this feature is currently documented as Beta.

We would appreciate some clarification on the following points:

  1. GA timeline: Is there an estimated timeline for General Availability (GA)?

  2. Potential changes: Are there any planned changes to this parameter or its behaviour before GA that we should be aware of or prepare for?

  3. Production readiness: Is this Beta feature currently supported for production workloads? Are there any known limitations or recommendations, particularly regarding performance when dealing with large tables or a high number of tables within a single pipeline?

Any insights or feedback from the Databricks team or the community would be greatly appreciated.

Thank you in advance for your help!

Best regards,

2 ACCEPTED SOLUTIONS

Accepted Solutions

NinaThoni
Databricks Employee
Databricks Employee
Hi @faruk,

Thanks for the detailed questions. You're right that hard-deletion tracking (hard_deletion_sync_min_interval_in_seconds) is still in Beta.

GA timeline: There's no public GA date yet. The release notes and the query-based connector reference will reflect any change in status.
Potential changes: Beta features can change before GA, so it's worth checking the reference page when you upgrade. Today the parameter needs primary keys on the table, is set through the API only, and isn't supported with SCD_TYPE_2.
Production readiness: Beta features aren't intended for production use and aren't covered by the SLA.

A few points that help with performance:
  • The scan is a full primary key comparison. On each sync, the connector reads all primary keys from the source table and compares them with the destination, so the cost grows with table size.
  • Control when it runs. The interval is a minimum, and the scan only happens during a pipeline run. To run it once a night, set the value just under 24 hours (for example 85800) and schedule the pipeline at the time you want the scan.
  • Enable it only on the tables that need it. Tables without physical deletes don't need it.
Thanks again for raising it.

Cheers,
Nina

References
Nina Thoni
Databricks Senior Solutions Engineer

View solution in original post

faruk
Contributor II

@NinaThoni Thank you for your response.

I believe the best approach would be to implement a custom primary key reconciliation mechanism and optimize its performance by limiting the comparison to the last two months of data. In our case, older data cannot be deleted, as you mentioned.

I also agree that this feature should only be enabled for selected tables.

Regarding controlled runs, unfortunately, this approach would not work for me, as I need up-to-date data for my reports. Therefore, the reconciliation process should run automatically according to the reporting frequency.

What do you think ? 

View solution in original post

3 REPLIES 3

NinaThoni
Databricks Employee
Databricks Employee
Hi @faruk,

Thanks for the detailed questions. You're right that hard-deletion tracking (hard_deletion_sync_min_interval_in_seconds) is still in Beta.

GA timeline: There's no public GA date yet. The release notes and the query-based connector reference will reflect any change in status.
Potential changes: Beta features can change before GA, so it's worth checking the reference page when you upgrade. Today the parameter needs primary keys on the table, is set through the API only, and isn't supported with SCD_TYPE_2.
Production readiness: Beta features aren't intended for production use and aren't covered by the SLA.

A few points that help with performance:
  • The scan is a full primary key comparison. On each sync, the connector reads all primary keys from the source table and compares them with the destination, so the cost grows with table size.
  • Control when it runs. The interval is a minimum, and the scan only happens during a pipeline run. To run it once a night, set the value just under 24 hours (for example 85800) and schedule the pipeline at the time you want the scan.
  • Enable it only on the tables that need it. Tables without physical deletes don't need it.
Thanks again for raising it.

Cheers,
Nina

References
Nina Thoni
Databricks Senior Solutions Engineer

faruk
Contributor II

@NinaThoni Thank you for your response.

I believe the best approach would be to implement a custom primary key reconciliation mechanism and optimize its performance by limiting the comparison to the last two months of data. In our case, older data cannot be deleted, as you mentioned.

I also agree that this feature should only be enabled for selected tables.

Regarding controlled runs, unfortunately, this approach would not work for me, as I need up-to-date data for my reports. Therefore, the reconciliation process should run automatically according to the reporting frequency.

What do you think ? 

NinaThoni
Databricks Employee
Databricks Employee
Hi @faruk,

Thanks for the follow-up. Your reasoning makes sense. The built-in hard-deletion tracking compares all the primary keys in the source table with the destination, and it can't be limited to part of a table, such as a date range. So if you only need to check the last two months, a custom approach is a reasonable option.
The usual pattern is to read the primary keys for the period you care about from the source, compare them with the destination using an anti-join, and remove the keys that no longer exist in the source. We'd suggest applying these deletes to a downstream table rather than to the table the connector writes to. To keep it in line with your reporting, you can run the ingestion pipeline and the check as tasks in the same job.
As this is a custom approach, please test it on your own data and volumes before using it in production.

Thanks again for sharing the details.
 
Nina Thoni
Databricks Senior Solutions Engineer