public class Spark3MigrateAction
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<java.lang.String> |
EXCLUDED_PROPERTIES |
protected static java.lang.String |
ICEBERG_METADATA_FOLDER |
protected static java.lang.String |
LOCATION |
Constructor and Description |
---|
Spark3MigrateAction(org.apache.spark.sql.SparkSession spark,
org.apache.spark.sql.connector.catalog.CatalogPlugin sourceCatalog,
org.apache.spark.sql.connector.catalog.Identifier sourceTableName) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
additionalProperties() |
protected org.apache.spark.sql.connector.catalog.TableCatalog |
checkSourceCatalog(org.apache.spark.sql.connector.catalog.CatalogPlugin catalog) |
protected org.apache.spark.sql.connector.catalog.StagingTableCatalog |
destCatalog() |
protected org.apache.spark.sql.connector.catalog.Identifier |
destTableIdent() |
protected void |
ensureNameMappingPresent(Table table) |
java.lang.Long |
execute()
Executes this action.
|
protected java.lang.String |
getMetadataLocation(Table table) |
protected org.apache.spark.sql.connector.catalog.TableCatalog |
sourceCatalog() |
protected org.apache.spark.sql.connector.catalog.Identifier |
sourceTableIdent() |
protected java.lang.String |
sourceTableLocation() |
protected org.apache.spark.sql.SparkSession |
spark() |
protected StagedSparkTable |
stageDestTable() |
protected java.util.Map<java.lang.String,java.lang.String> |
targetTableProps() |
protected org.apache.spark.sql.catalyst.catalog.CatalogTable |
v1SourceTable() |
CreateAction |
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Adds additional properties to the newly created Iceberg table.
|
CreateAction |
withProperty(java.lang.String key,
java.lang.String value)
Adds an additional property to the newly created Iceberg table.
|
protected static final java.lang.String LOCATION
protected static final java.lang.String ICEBERG_METADATA_FOLDER
protected static final java.util.List<java.lang.String> EXCLUDED_PROPERTIES
public Spark3MigrateAction(org.apache.spark.sql.SparkSession spark, org.apache.spark.sql.connector.catalog.CatalogPlugin sourceCatalog, org.apache.spark.sql.connector.catalog.Identifier sourceTableName)
public java.lang.Long execute()
Action
protected java.util.Map<java.lang.String,java.lang.String> targetTableProps()
protected org.apache.spark.sql.connector.catalog.TableCatalog checkSourceCatalog(org.apache.spark.sql.connector.catalog.CatalogPlugin catalog)
public CreateAction withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
CreateAction
withProperties
in interface CreateAction
properties
- a map of properties to be includedpublic CreateAction withProperty(java.lang.String key, java.lang.String value)
CreateAction
withProperty
in interface CreateAction
key
- the key of the property to addvalue
- the value of the property to addprotected org.apache.spark.sql.SparkSession spark()
protected java.lang.String sourceTableLocation()
protected org.apache.spark.sql.catalyst.catalog.CatalogTable v1SourceTable()
protected org.apache.spark.sql.connector.catalog.TableCatalog sourceCatalog()
protected org.apache.spark.sql.connector.catalog.Identifier sourceTableIdent()
protected org.apache.spark.sql.connector.catalog.StagingTableCatalog destCatalog()
protected org.apache.spark.sql.connector.catalog.Identifier destTableIdent()
protected java.util.Map<java.lang.String,java.lang.String> additionalProperties()
protected StagedSparkTable stageDestTable()
protected void ensureNameMappingPresent(Table table)
protected java.lang.String getMetadataLocation(Table table)