lliangyu-lin commented on code in PR #424:
URL: https://github.com/apache/iceberg-go/pull/424#discussion_r2082267868


##########
cmd/iceberg/main.go:
##########
@@ -79,7 +79,9 @@ Options:
   --warehouse TEXT   specify the warehouse to use
   --config TEXT      specify the path to the configuration file
   --description TEXT   specify a description for the namespace
-  --location-uri TEXT          specify a location URI for the namespace`
+  --location-uri TEXT          specify a location URI for the namespace
+  --fields TEXT        specify table schema fields in json (for create table 
use only)

Review Comment:
   Hi @kevinjqliu, thank you for looking into this! I think schema and fields 
was also discussed above with @zeroshade 
   https://github.com/apache/iceberg-go/pull/424#discussion_r2080512350
   
   The concern about specifying a full schema json is that user will also be 
asked to provide the json field for `"schema-id", "identifier-field-ids"`, 
which are more like internal metadata that user don't need to worry about. And 
usually create table only requires specifying the table fields and their type, 
so it's just the `fields`. Although I feel like the word `schema` is more 
understandable compare to `fields`.
   
   Ex:
   ```
   --schema '{
     "schema-id": 1,
     "identifier-field-ids": [1],
     "fields": [
       {"id":1,"name":"id","type":"int","required":true},
       {"id":2,"name":"name","type":"string","required":false}
     ]
   }'
   ```
   and
   ```
   --fields '{[
       {"id":1,"name":"id","type":"int","required":true},
       {"id":2,"name":"name","type":"string","required":false}
   ]}'
   ```



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