@@ -48,28 +48,28 @@ A complete example can be found in the `examples folder <https://github.com/apac
4848 }
4949
5050 Once you have this library available, you can construct a
51- :py:class: `~datafusion.catalog.Table ` in Python and register it with the
52- ``SessionContext ``. Tables can be created either from the PyCapsule exposed by
51+ :py:class: `~datafusion.TableProvider ` in Python and register it with the
52+ ``SessionContext ``. Table providers can be created either from the PyCapsule exposed by
5353your Rust provider or from an existing :py:class: `~datafusion.dataframe.DataFrame `
54- view created via `` df.into_view () `` (or the alias `` Table.from_dataframe(df) ``) .
54+ using `` TableProvider.from_view () ``.
5555
5656.. code-block :: python
5757
58- from datafusion.catalog import Table
58+ from datafusion import SessionContext, TableProvider
5959
6060 ctx = SessionContext()
6161 provider = MyTableProvider()
6262
63- table_from_capsule = Table .from_capsule(provider)
63+ capsule_provider = TableProvider .from_capsule(provider)
6464
6565 df = ctx.from_pydict({" a" : [1 ]})
66- provider_from_view = df.into_view( )
66+ view_provider = TableProvider.from_view(df )
6767
68- ctx.register_table(" capsule_table" , table_from_capsule )
69- ctx.register_table(" view_table" , provider_from_view )
68+ ctx.register_table(" capsule_table" , capsule_provider )
69+ ctx.register_table(" view_table" , view_provider )
7070
7171 ctx.table(" capsule_table" ).show()
7272 ctx.table(" view_table" ).show()
7373
74- `` Table.from_dataframe(df ) `` is available as an alias for `` df.into_view () ``,
75- but the latter is the preferred API .
74+ Both `` TableProvider.from_capsule( ) `` and `` TableProvider.from_view () `` create
75+ table providers that can be registered with the SessionContext using `` register_table() `` .
0 commit comments