Ian
01/20/2023, 6:37 AMDeltaTable.create(spark).tableName(delta_table_name).addColumns(data_schema)\
.partitionedBy(["partition_1", "partition_2", "partition_3"]).location(delta_table_location).execute()
Jon Stockham
01/20/2023, 9:33 AMtableName()
, only .location()
.Ian
01/20/2023, 9:37 AMJon Stockham
01/20/2023, 9:42 AM(DeltaTable.createOrReplace(spark)
.addColumns(schema)
.location("<s3://mybucket/path/to/table>")
.execute())
Ian
01/20/2023, 9:44 AM.tableName
it does create a table but does not show it physically in the location until i write to the table .
I tried spark.sql(select * from table_name
on the table created it does give me the schemaJon Stockham
01/20/2023, 9:48 AMIan
01/20/2023, 9:48 AMJon Stockham
01/20/2023, 9:51 AM.location()
option when .tableName()
is provided and just using the default location.Ian
01/20/2023, 9:53 AM.location()
is the way to go ?Jon Stockham
01/20/2023, 10:23 AMif (DeltaTableUtils.isValidPath(tableId) && location.nonEmpty
&& tableId.table != location.get) {
throw DeltaErrors.analysisException( s"Creating path-based Delta table with a different location isn't supported. "
+ s"Identifier: $identifier, Location: ${location.get}")
}
Ian
01/20/2023, 10:24 AM.tableName()
.tableName()
tho the delta_table is present in memory it looks like or I’m not sure how it’s handling it but shows up physically at the location once i write data to the table.Jon Stockham
01/20/2023, 10:29 AMIan
01/20/2023, 10:32 AMJon Stockham
01/20/2023, 10:33 AMIan
01/20/2023, 10:35 AMJon Stockham
01/20/2023, 10:37 AMIan
01/20/2023, 10:38 AMRyan Zhu
01/20/2023, 4:42 PMIan
01/23/2023, 6:11 AM