ajantha-bhat commented on code in PR #6376: URL: https://github.com/apache/iceberg/pull/6376#discussion_r1042956811
########## docs/spark-procedures.md: ########## @@ -493,6 +493,39 @@ CALL spark_catalog.system.add_files( ) ``` +### `register_table` + +Creates a catalog entry for a metadata.json file which already exists but does not have a corresponding catalog identifier. + +#### Usage + +| Argument Name | Required? | Type | Description | +|---------------|-----------|------|-------------| +| `table` | ✔️ | string | Table which is to be registered | +| `metadata_file`| ✔️ | string | Metadata file which is to be registered as a new catalog identifier | + +{{< hint warning >}} Review Comment: I am not sure how this looks like, even in rich text view it didn't show as warning. But I know another way to give warning. Adding as "!!! note" will display as a block in the sitedocs. Example: md file: https://github.com/projectnessie/nessie/blob/main/site/docs/tools/iceberg/spark.md#spark-via-iceberg respective site doc: https://projectnessie.org/tools/iceberg/spark/#spark-via-iceberg So, According to me the below format is good. Let's see what @RussellSpitzer thinks. !!! note Having the same metadata.json registered in more than one catalog can lead to missing updates, loss of data, and table corruption. Only use this procedure when the table is no longer registered in an existing catalog, or you are moving a table between catalogs. -- 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