You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "SGITLOGIN (via GitHub)" <gi...@apache.org> on 2025/01/13 06:44:42 UTC

[I] insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`. [iceberg]

SGITLOGIN opened a new issue, #11952:
URL: https://github.com/apache/iceberg/issues/11952

   ### Apache Iceberg version
   
   1.6.1
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   ### Spark configuration 
   spark.sql.catalog.spark_catalog = org.apache.iceberg.spark.SparkSessionCatalog
   spark.sql.catalog.spark_catalog.type = hive
   spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
   
   ### create table
   CREATE TABLE iceberg_db.sample_oss_time_travel (
       id string,
       data string,
       category string)
   USING iceberg
   PARTITIONED BY (category)
   TBLPROPERTIES (
     'write.format.default' = 'orc',
     'write.metadata.delete-after-commit.enabled' = 'true',
     'write.metadata.previous-versions-max' = '2',
     'history.expire.max-snapshot-age-ms' = '600000',
     'history.expire.min-snapshots-to-keep' = '2',
     'commit.manifest.target-size-bytes' = '8388608',
     'commit.manifest.min-count-to-merge' = '3',
     'commit.manifest-merge.enabled' = 'true',
     'write.wap.enabled' = 'true')
   
   
   ### SQL
   ALTER TABLE iceberg_db.sample_oss_time_travel CREATE BRANCH branch1 AS OF VERSION 2642313739747854004;
   INSERT INTO iceberg_db.sample_oss_time_travel.branch1 VALUES ('5', 'e', 'a');
   
   <img width="1110" alt="image" src="https://github.com/user-attachments/assets/d2da7e09-4623-4a59-8750-e955cbf0e211" />
   
   
   ### Willingness to contribute
   
   - [X] I can contribute a fix for this bug independently
   - [X] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [X] I cannot contribute a fix for this bug at this time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`. [iceberg]

Posted by "tomtongue (via GitHub)" <gi...@apache.org>.
tomtongue commented on issue #11952:
URL: https://github.com/apache/iceberg/issues/11952#issuecomment-2588929264

   When you use the branch from SparkSQL, you need to set `branch_` as its branch name. Specifically, for your INSERT query, you need to specify the branch name like:
   
   ```
   INSERT INTO db.table.branch_branch_1 VALUES (...)
   ```
   
   Could you try this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`. [iceberg]

Posted by "SGITLOGIN (via GitHub)" <gi...@apache.org>.
SGITLOGIN closed issue #11952: insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`.
URL: https://github.com/apache/iceberg/issues/11952


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`. [iceberg]

Posted by "anish749 (via GitHub)" <gi...@apache.org>.
anish749 commented on issue #11952:
URL: https://github.com/apache/iceberg/issues/11952#issuecomment-2587642557

   I am facing the same issue with AWS S3 tables, when writing to a branch.
   
   so
   ```sql
   MERGE INTO `catalog`.namespace.table.branch_audit
   ...
   ```
   fails because S3 tables requires 1 namespace, and the parsing here fails.
   
   as a work around, with using spark, the following works:
   ```sql
   SET spark.wap.branch = audit;
   MERGE INTO `catalog`.namespace.table.branch_audit
   ...
   ```
   however `SET spark.wap.branch = audit;` breaks other read operations since this branch gets set at the session level.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`. [iceberg]

Posted by "SGITLOGIN (via GitHub)" <gi...@apache.org>.
SGITLOGIN commented on issue #11952:
URL: https://github.com/apache/iceberg/issues/11952#issuecomment-2588579221

   yes,I tried SET spark. wap. branch=audit; There is no problem, It is possible that there is an issue with Spark parsing catalog.namespace.table.branch-audit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] insert branch failed:spark_catalog requires a single-part namespace, but got `iceberg_db`.`sample_oss_time_travel`. [iceberg]

Posted by "SGITLOGIN (via GitHub)" <gi...@apache.org>.
SGITLOGIN commented on issue #11952:
URL: https://github.com/apache/iceberg/issues/11952#issuecomment-2589132191

   > When you use the branch from SparkSQL, you need to set `branch_` before your branch name. Specifically, for your INSERT query, you need to specify the branch name like:
   > 
   > ```
   > INSERT INTO db.table.branch_branch_1 VALUES (...)
   > ```
   > 
   > Could you try this?
   
   it's OK, it needs to add a branch prefix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org