anuragmantri commented on code in PR #10644:
URL: https://github.com/apache/iceberg/pull/10644#discussion_r1676475608


##########
docs/docs/spark-writes.md:
##########
@@ -228,6 +232,24 @@ SET spark.wap.branch = audit-branch
 INSERT INTO prod.db.table VALUES (3, 'c');
 ```
 
+### Via DataFrames
+
+Branch writes via DataFrames can be performed by providing a branch 
identifier, `branch_yourBranch` in the operation.
+
+To insert into `audit` branch

Review Comment:
   I could not find relevant examples in code to match the SQL section, (merge 
into branch and `SET spark.wap.branch` option) so I included the basic examples 
of insert and update (overwritePartitions). Let me know if we need to add more 
examples. 



##########
docs/docs/spark-writes.md:
##########
@@ -332,6 +332,30 @@ The writer must enable the `mergeSchema` option.
 ```scala
 data.writeTo("prod.db.sample").option("mergeSchema","true").append()
 ```
+
+### Writing to Branches
+The branch must exist before performing write. The operation does **not** 
create the branch if it does not exist.

Review Comment:
   Done



##########
docs/docs/branching.md:
##########
@@ -110,7 +110,8 @@ Creating, querying and writing to branches and tags are 
supported in the Iceberg
 - [Iceberg Java Library](java-api-quickstart.md#branching-and-tagging)
 - [Spark DDLs](spark-ddl.md#branching-and-tagging-ddl)
 - [Spark Reads](spark-queries.md#time-travel)
-- [Spark Branch Writes](spark-writes.md#writing-to-branches)
+- [Spark Branch Writes using SQL](spark-writes.md#writing-to-branches)

Review Comment:
   Good catch, I reverted this change.



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to