Closed dimas-b closed 1 year ago
General spark-sql cmd. line (branch options differ in the steps befow):
spark-sql
$ bin/spark-sql \ --packages org.apache.iceberg:iceberg-spark-runtime-3.3_2.12:1.0.0 \ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \ --conf spark.sql.catalog.nessie=org.apache.iceberg.spark.SparkCatalog \ --conf spark.sql.catalog.nessie.warehouse=$PWD/data2 \ --conf spark.sql.catalog.nessie.catalog-impl=org.apache.iceberg.nessie.NessieCatalog \ --conf spark.sql.catalog.nessie.uri=http://localhost:19120/api/v1 \ --conf spark.sql.catalog.nessie.ref=test \ --conf spark.sql.catalog.nessie.cache-enabled=false \ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
Use case:
main
spark-sql> use nessie;
spark-sql> CREATE TABLE db2.t3 (id bigint, data string);
test
spark-sql> ALTER DATABASE db2 SET DBPROPERTIES ('Edited-by' = 'John');
$ curl 'http://localhost:19120/api/v1/contents/db2?ref=main'
{ "type" : "NAMESPACE", "id" : "31a96d9c-f6c0-434a-afff-938a09034d37", "elements" : [ "db2" ], "properties" : { "Edited-by" : "John" } }
$ curl 'http://localhost:19120/api/v1/contents/db2?ref=test'
{ "type" : "NAMESPACE", "id" : "8e98c4d3-4ddc-4428-8c78-a36893041d4c", "elements" : [ "db2" ], "properties" : { "Edited-by" : "John" } }
Note that the ID of Namespace db2 is different on branches main and test even though it was logically created by virtue of CREATE TABLE db2.t3 before branch test was forked from main.
Namespace
db2
CREATE TABLE db2.t3
Guess we can close this now, since implicit namespaces are no longer allowed?
Yes, closing. Cf. #6246
General
spark-sql
cmd. line (branch options differ in the steps befow):Use case:
main
spark-sql> use nessie;
spark-sql> CREATE TABLE db2.t3 (id bigint, data string);
test
from main using Nessie CLImain
spark-sql> ALTER DATABASE db2 SET DBPROPERTIES ('Edited-by' = 'John');
test
spark-sql> ALTER DATABASE db2 SET DBPROPERTIES ('Edited-by' = 'John');
$ curl 'http://localhost:19120/api/v1/contents/db2?ref=main'
results in:$ curl 'http://localhost:19120/api/v1/contents/db2?ref=test'
results in:Note that the ID of
Namespace
db2
is different on branchesmain
andtest
even though it was logically created by virtue ofCREATE TABLE db2.t3
before branchtest
was forked frommain
.