rajarshisarkar commented on code in PR #4443:
URL: https://github.com/apache/iceberg/pull/4443#discussion_r848213964


##########
docs/integrations/aws.md:
##########
@@ -431,7 +445,24 @@ spark-sql --conf 
spark.sql.catalog.my_catalog=org.apache.iceberg.spark.SparkCata
     --conf spark.sql.catalog.my_catalog.s3.write.tags.my_key1=my_val1 \
     --conf spark.sql.catalog.my_catalog.s3.write.tags.my_key2=my_val2
 ```
-For the above example, the objects in S3 will be saved with tags: 
`my_key1=my_val1` and `my_key2=my_val2`.
+For the above example, the objects in S3 will be saved with tags: 
`my_key1=my_val1` and `my_key2=my_val2`. Do note that the specified write tags 
will be saved only while object creation.
+
+We can add tags before deleting the objects as well. For example, to add S3 
delete tags with Spark 3.0, you can start the Spark SQL shell with: 
+
+```
+sh spark-sql --conf 
spark.sql.catalog.my_catalog=org.apache.iceberg.spark.SparkCatalog \
+    --conf 
spark.sql.catalog.my_catalog.warehouse=s3://iceberg-warehouse/s3-tagging \
+    --conf 
spark.sql.catalog.my_catalog.catalog-impl=org.apache.iceberg.aws.glue.GlueCatalog
 \
+    --conf 
spark.sql.catalog.my_catalog.io-impl=org.apache.iceberg.aws.s3.S3FileIO \
+    --conf spark.sql.catalog.my_catalog.s3.delete.tags.my_key3=my_val3
+```
+
+Users are expected to set the delete tags with `s3.delete.tags` and manage the 
deleted files through S3 lifecycle policy.
+With the `s3.delete.tags` config, objects are tagged with the configured 
key-value pairs before deletion. This is considered a soft-delete, because 
users can configure tag-based object lifecycle policy at bucket level to 
transition objects to different tiers.

Review Comment:
   > I would leave out "before deletion." and replace it with "instead of 
deleting".
   
   I am carrying the term forward from 
https://github.com/apache/iceberg/pull/4342#discussion_r831485921 as for "tag 
before delete" use-case it might make sense: 
https://github.com/apache/iceberg/pull/4342#issuecomment-1073347947
   
   > I would also take out "This is considered a soft-delete". 
   
   Makes sense.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to