Trait datafusion::catalog::TableProviderFactory
source · pub trait TableProviderFactory: Sync + Send {
// Required method
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 dyn Session,
cmd: &'life2 CreateExternalTable,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn TableProvider>, DataFusionError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}
Expand description
A factory which creates TableProvider
s at runtime given a URL.
For example, this can be used to create a table “on the fly” from a directory of files only when that name is referenced.
Required Methods§
sourcefn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 dyn Session,
cmd: &'life2 CreateExternalTable,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn TableProvider>, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 dyn Session,
cmd: &'life2 CreateExternalTable,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn TableProvider>, DataFusionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Create a TableProvider with the given url