Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Failed to create delta table when catalog name is not spark_catalog #3312

Open
melin opened this issue Jun 26, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@melin
Copy link

melin commented Jun 26, 2024

The catalog name hive_metastore was set. The delta table failed to be created. The table location directory was empty without n_delta_log。 catalog name can only be spark_catalog?

val spark = SparkSession.builder()
          .master("local")
          .enableHiveSupport()
          .config("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
          .config("spark.sql.extensions", "io.delta.sql.DeltaSparkSessionExtension")
          .config("spark.sql.catalog.hive_metastore", "org.apache.spark.sql.delta.catalog.DeltaCatalog")
          .getOrCreate()

spark.sql("DROP TABLE if exists bigdata.delta_sample")
        val deltaCreateTableDdl =
          """
            |create table if not exists hive_metastore.bigdata.delta_sample (
            |    k int,
            |    v string
            |) USING delta
            |""".stripMargin
        spark.sql(deltaCreateTableDdl)
@melin melin added the bug Something isn't working label Jun 26, 2024
@melin melin closed this as completed Jun 26, 2024
@melin melin reopened this Jun 26, 2024
@melin
Copy link
Author

melin commented Jul 1, 2024

cc @zsxwing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant