RussellSpitzer commented on code in PR #12115:
URL: https://github.com/apache/iceberg/pull/12115#discussion_r1932567338


##########
docs/docs/spark-procedures.md:
##########
@@ -972,4 +972,91 @@ CALL catalog_name.system.compute_table_stats(table => 
'my_table', snapshot_id =>
 Collect statistics of the snapshot with id `snap1` of table `my_table` for 
columns `col1` and `col2`
 ```sql
 CALL catalog_name.system.compute_table_stats(table => 'my_table', snapshot_id 
=> 'snap1', columns => array('col1', 'col2'));
-```
\ No newline at end of file
+```
+
+## Table Replication
+
+The `rewrite-table-path` assists in moving or copying an Iceberg table from 
one location to another.
+
+### `rewrite-table-path`
+
+This procedure writes a new copy of the Iceberg table's metadata files where 
every path has had its prefix replaced.
+The newly rewritten metadata files, along with data files, enable moving or 
coping an Iceberg table to a new location.
+After copying both metadata and data to the desired location, the replicated 
iceberg
+table will appear identical to the source table, including snapshot history, 
schema and partition specs.
+
+!!! info
+    This procedure only creates metadata for an existing Iceberg table 
modified for a new location. Procedure results can be consumed for copying the 
files.
+    Copying/Moving metadata and data files to the new location is not part of 
this procedure.
+
+
+| Argument Name      | Required? | default                                     
   | Type   | Description                                                       
      |
+|--------------------|-----------|------------------------------------------------|--------|-------------------------------------------------------------------------|
+| `table`            | ✔️        |                                             
   | string | Name of the table                                                 
      |
+| `source_prefix`    | ✔️        |                                             
   | string | The existing prefix to be replaced                                
      |
+| `target_prefix`    | ✔️        |                                             
   | string | The replacement prefix for `source_prefix`                        
      |
+| `start_version`    |           | first metadata.json in table's metadata log 
   | string | The name or path to the chronologically first metadata.json to 
rewrite. |
+| `end_version`      |           | latest metadata.json                        
   | string | The name or path to the chronologically last metadata.json to 
rewrite   |
+| `staging_location` |           | new directory under table's metadata 
directory | string | The output location for newly modified metadata files      
             |
+
+
+#### Modes of operation:
+
+- Full Rewrite:
+
+By default, the procedure operates in full rewrite mode where all metadata 
files are rewritten.

Review Comment:
   "all metadata files associated with any reachable metadata.json?" I don't 
think "all metadata files" is well defined here. I believe it's every 
metadata.json and all files associated with those metadata.jsons that is in the 
history log, or am I incorrect?
   
   I can't remember if it's this or just snapshots?



-- 
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