@Evolving
public interface TableProvider
Note that, TableProvider can only apply data operations to existing tables, like read, append, delete, and overwrite. It does not support the operations that require metadata changes, like create/drop tables.
The major responsibility of this interface is to return a Table
for read/write.
Modifier and Type | Method and Description |
---|---|
Table |
getTable(CaseInsensitiveStringMap options)
Return a
Table instance to do read/write with user-specified options. |
default Table |
getTable(CaseInsensitiveStringMap options,
StructType schema)
Return a
Table instance to do read/write with user-specified schema and options. |
Table getTable(CaseInsensitiveStringMap options)
Table
instance to do read/write with user-specified options.options
- the user-specified options that can identify a table, e.g. file path, Kafka
topic name, etc. It's an immutable case-insensitive string-to-string map.default Table getTable(CaseInsensitiveStringMap options, StructType schema)
Table
instance to do read/write with user-specified schema and options.
By default this method throws UnsupportedOperationException
, implementations should
override this method to handle user-specified schema.
options
- the user-specified options that can identify a table, e.g. file path, Kafka
topic name, etc. It's an immutable case-insensitive string-to-string map.schema
- the user-specified schema.UnsupportedOperationException