Package org.apache.iceberg.spark.source
Class IcebergSource
java.lang.Object
org.apache.iceberg.spark.source.IcebergSource
- All Implemented Interfaces:
org.apache.spark.sql.connector.catalog.SessionConfigSupport,org.apache.spark.sql.connector.catalog.SupportsCatalogOptions,org.apache.spark.sql.connector.catalog.TableProvider,org.apache.spark.sql.sources.DataSourceRegister
public class IcebergSource
extends Object
implements org.apache.spark.sql.sources.DataSourceRegister, org.apache.spark.sql.connector.catalog.SupportsCatalogOptions, org.apache.spark.sql.connector.catalog.SessionConfigSupport
Data source for reading and writing Iceberg tables using the "iceberg" format.
The `path` parameter provided by Spark is resolved in the following priority order:
- Rewrite key - If `path` is a rewrite key, load a table from the rewrite catalog
- Table location - If `path` contains "/", load a table at the specified location
- Catalog identifier - Otherwise resolve `path` as an identifier per Spark rules
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractCatalog(org.apache.spark.sql.util.CaseInsensitiveStringMap options) org.apache.spark.sql.connector.catalog.IdentifierextractIdentifier(org.apache.spark.sql.util.CaseInsensitiveStringMap options) extractTimeTravelTimestamp(org.apache.spark.sql.util.CaseInsensitiveStringMap options) extractTimeTravelVersion(org.apache.spark.sql.util.CaseInsensitiveStringMap options) org.apache.spark.sql.connector.catalog.TablegetTable(org.apache.spark.sql.types.StructType schema, org.apache.spark.sql.connector.expressions.Transform[] partitioning, Map<String, String> options) org.apache.spark.sql.connector.expressions.Transform[]inferPartitioning(org.apache.spark.sql.util.CaseInsensitiveStringMap options) org.apache.spark.sql.types.StructTypeinferSchema(org.apache.spark.sql.util.CaseInsensitiveStringMap options) boolean
-
Constructor Details
-
IcebergSource
public IcebergSource()
-
-
Method Details
-
shortName
- Specified by:
shortNamein interfaceorg.apache.spark.sql.sources.DataSourceRegister
-
keyPrefix
- Specified by:
keyPrefixin interfaceorg.apache.spark.sql.connector.catalog.SessionConfigSupport
-
inferSchema
public org.apache.spark.sql.types.StructType inferSchema(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
inferSchemain interfaceorg.apache.spark.sql.connector.catalog.TableProvider
-
inferPartitioning
public org.apache.spark.sql.connector.expressions.Transform[] inferPartitioning(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
inferPartitioningin interfaceorg.apache.spark.sql.connector.catalog.TableProvider
-
supportsExternalMetadata
public boolean supportsExternalMetadata()- Specified by:
supportsExternalMetadatain interfaceorg.apache.spark.sql.connector.catalog.TableProvider
-
getTable
public org.apache.spark.sql.connector.catalog.Table getTable(org.apache.spark.sql.types.StructType schema, org.apache.spark.sql.connector.expressions.Transform[] partitioning, Map<String, String> options) - Specified by:
getTablein interfaceorg.apache.spark.sql.connector.catalog.TableProvider
-
extractIdentifier
public org.apache.spark.sql.connector.catalog.Identifier extractIdentifier(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
extractIdentifierin interfaceorg.apache.spark.sql.connector.catalog.SupportsCatalogOptions
-
extractCatalog
- Specified by:
extractCatalogin interfaceorg.apache.spark.sql.connector.catalog.SupportsCatalogOptions
-
extractTimeTravelVersion
public Optional<String> extractTimeTravelVersion(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
extractTimeTravelVersionin interfaceorg.apache.spark.sql.connector.catalog.SupportsCatalogOptions
-
extractTimeTravelTimestamp
public Optional<String> extractTimeTravelTimestamp(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
extractTimeTravelTimestampin interfaceorg.apache.spark.sql.connector.catalog.SupportsCatalogOptions
-