TableProvider¶
TableProvider is an abstraction of table providers (for DataSourceV2Utils utility when requested for a Table).
TableProvider is part of Connector API and serves as an indication to use newer code execution paths (e.g., ResolveSessionCatalog logical resolution rule).
Contract¶
Table¶
Table getTable(
StructType schema,
Transform[] partitioning,
Map<String, String> properties)
Creates a Table for the given schema, partitioning (as Transforms) and properties.
Used when:
DataFrameWriteris requested to save dataDataSourceV2Utilsutility is used to getTableFromProvider
Inferring Partitioning¶
Transform[] inferPartitioning(
CaseInsensitiveStringMap options)
Default: No partitions (as Transforms)
Used when:
DataSourceV2Utilsutility is used to getTableFromProvider
Inferring Schema¶
StructType inferSchema(
CaseInsensitiveStringMap options)
Used when:
DataSourceV2Utilsutility is used to getTableFromProvider
supportsExternalMetadata¶
boolean supportsExternalMetadata()
Default: false
Used when:
DataSourceV2Utilsutility is used to getTableFromProvider