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
The IcebergSource loads/writes tables with format "iceberg". It can load paths and tables.
 
How paths/tables are loaded when using spark.read().format("iceberg").load(table)
table = "file:///path/to/table" -> loads a HadoopTable at given path table = "tablename" -> loads currentCatalog.currentNamespace.tablename table = "catalog.tablename" -> load "tablename" from the specified catalog. table = "namespace.tablename" -> load "namespace.tablename" from current catalog table = "catalog.namespace.tablename" -> "namespace.tablename" from the specified catalog. table = "namespace1.namespace2.tablename" -> load "namespace1.namespace2.tablename" from current catalog
The above list is in order of priority. For example: a matching catalog will take priority over any namespace resolution.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
IcebergSourcepublic IcebergSource()
 
- 
- 
Method Details- 
shortName- Specified by:
- shortNamein interface- org.apache.spark.sql.sources.DataSourceRegister
 
- 
keyPrefix- Specified by:
- keyPrefixin interface- org.apache.spark.sql.connector.catalog.SessionConfigSupport
 
- 
inferSchemapublic org.apache.spark.sql.types.StructType inferSchema(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
- inferSchemain interface- org.apache.spark.sql.connector.catalog.TableProvider
 
- 
inferPartitioningpublic org.apache.spark.sql.connector.expressions.Transform[] inferPartitioning(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
- inferPartitioningin interface- org.apache.spark.sql.connector.catalog.TableProvider
 
- 
supportsExternalMetadatapublic boolean supportsExternalMetadata()- Specified by:
- supportsExternalMetadatain interface- org.apache.spark.sql.connector.catalog.TableProvider
 
- 
getTablepublic 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 interface- org.apache.spark.sql.connector.catalog.TableProvider
 
- 
extractIdentifierpublic org.apache.spark.sql.connector.catalog.Identifier extractIdentifier(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
- extractIdentifierin interface- org.apache.spark.sql.connector.catalog.SupportsCatalogOptions
 
- 
extractCatalog- Specified by:
- extractCatalogin interface- org.apache.spark.sql.connector.catalog.SupportsCatalogOptions
 
- 
extractTimeTravelVersionpublic Optional<String> extractTimeTravelVersion(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
- extractTimeTravelVersionin interface- org.apache.spark.sql.connector.catalog.SupportsCatalogOptions
 
- 
extractTimeTravelTimestamppublic Optional<String> extractTimeTravelTimestamp(org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
- extractTimeTravelTimestampin interface- org.apache.spark.sql.connector.catalog.SupportsCatalogOptions
 
 
-