diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index c36c24bc3e..073f19ff40 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -1965,7 +1965,7 @@ iceberg_table.append(data) # Register the table with DataFusion ctx = SessionContext() -ctx.register_table_provider("test", iceberg_table) +ctx.register_table("test", iceberg_table) # Query the table using DataFusion SQL ctx.table("test").show() diff --git a/pyiceberg/table/__init__.py b/pyiceberg/table/__init__.py index 56cab7618f..fc6cf204bf 100644 --- a/pyiceberg/table/__init__.py +++ b/pyiceberg/table/__init__.py @@ -1555,7 +1555,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable: To support DataFusion features such as push down filtering, this function will return a PyCapsule interface that conforms to the FFI Table Provider required by DataFusion. From an end user perspective - you should not need to call this function directly. Instead you can use ``register_table_provider`` in + you should not need to call this function directly. Instead you can use ``register_table`` in the DataFusion SessionContext. Returns: @@ -1572,7 +1572,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable: iceberg_table = catalog.create_table("default.test", schema=data.schema) iceberg_table.append(data) ctx = SessionContext() - ctx.register_table_provider("test", iceberg_table) + ctx.register_table("test", iceberg_table) ctx.table("test").show() ``` Results in diff --git a/tests/table/test_datafusion.py b/tests/table/test_datafusion.py index d9fa3e1e7b..136145ce8a 100644 --- a/tests/table/test_datafusion.py +++ b/tests/table/test_datafusion.py @@ -49,7 +49,7 @@ def test_datafusion_register_pyiceberg_table(catalog: Catalog, arrow_table_with_ iceberg_table.append(arrow_table_with_null) ctx = SessionContext() - ctx.register_table_provider("test", iceberg_table) + ctx.register_table("test", iceberg_table) datafusion_table = ctx.table("test") assert datafusion_table is not None