diff --git a/404.html b/404.html index 6788a118f..1f418b2ca 100644 --- a/404.html +++ b/404.html @@ -285,7 +285,8 @@ class="nav-list-link">Kubeflow
  • action_info(Table): The global action object.
  • -

    +

    - lakefs/catalogexport/delta_exporter + lakefs/catalogexport/delta_exporter

    @@ -1422,7 +1586,7 @@

    ---
    -name: test_delta_exporter
    +name: delta_exporter
     on:
       post-commit: null
     hooks:
    @@ -1453,12 +1617,73 @@ 

    table_paths: - my/delta/table/path

    +

    + + + lakefs/catalogexport/unity_exporter + + +

    + + +

    A package used to register exported Delta Lake tables to Databricks’ Unity catalog.

    +

    + + + lakefs/catalogexport/unity_exporter.register_tables(action, table_descriptors_path, delta_table_paths, databricks_client, warehouse_id) + + +

    + + +

    The function used to register exported Delta Lake tables in Databricks’ Unity Catalog. +The registration will use the following paths to register the table: +<catalog>.<branch name>.<table_name> where the branch name will be used as the schema name. +The return value is a table with mapping of table names to registration request status.

    + +

    Parameters:

    + + + +

    Example: +The following registers an exported Delta Lake table to Unity Catalog.

    + +
    local databricks = require("databricks")
    +local unity_export = require("lakefs/catalogexport/unity_exporter")
    +
    +local delta_table_locations = {
    +  ["table1"] = "s3://mybucket/mytable1",
    +}
    +-- Register the exported table in Unity Catalog:
    +local action_details = {
    +  repository_id = "my-repo",
    +  commit_id = "commit_id",
    +  branch_id = "main",
    +}
    +local databricks_client = databricks.client("<DATABRICKS_HOST>", "<DATABRICKS_TOKEN>")
    +local registration_statuses = unity_export.register_tables(action_details, "_lakefs_tables", delta_table_locations, databricks_client, "<WAREHOUSE_ID>")
    +
    +for t, status in pairs(registration_statuses) do
    +  print("Unity catalog registration for table \"" .. t .. "\" completed with status: " .. status .. "\n")
    +end
    +
    -

    For the table descriptor under the _lakefs_tables/my/delta/table/path.yaml:

    +

    For the table descriptor under the _lakefs_tables/delta-table-descriptor.yaml:

    ---
    -name: myTableActualName
    +name: my_table_name
     type: delta
    +path: path/to/delta/table/data
    +catalog: my-catalog
     
    + +

    For detailed step-by-step guide on how to use unity_exporter.register_tables as a part of a lakeFS action refer to +the Unity Catalog docs.

    diff --git a/howto/hooks/webhooks.html b/howto/hooks/webhooks.html index 49fe01ab8..b7ed1a9ab 100644 --- a/howto/hooks/webhooks.html +++ b/howto/hooks/webhooks.html @@ -294,7 +294,8 @@ class="nav-list-link">Kubeflow