kevinjqliu commented on code in PR #424:
URL: https://github.com/apache/iceberg-go/pull/424#discussion_r2082443752


##########
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:
   oh thanks for pointing me to that, i didnt see it initially. 
   
   i like 
   ```
   --schema '{[
       {"name":"id","type":"int","required":true},
       {"name":"name","type":"string","required":false}
   ]}'
   ```
   
   we dont necessary need `schema-id`, theres a [default 
value](https://github.com/apache/iceberg-python/blob/c84017dc6fd17da0c077504ba5d8de587563ec9c/pyiceberg/schema.py#L92).
 we can also provide `--schema-id` to override it. 
   Similarly for `identifier-field-ids`, its [default to empty 
list](https://github.com/apache/iceberg-python/blob/c84017dc6fd17da0c077504ba5d8de587563ec9c/pyiceberg/schema.py#L93)
 and we can use `--identifier-field-ids` to override that param too. 
   the `id` inside the fields can also be auto assigned. 
   
   For me, the `--schema` represents the schema of the table itself, without 
any of the details about iceberg tables.
   ```
   go run . create table lliangyu_test_db.test_tbl \                         
     --catalog glue \
     --schema 
'[{"name":"id","type":"int","required":false},{"name":"name","type":"string","required":true}]'
 \
   --location-uri s3://xxxxx/xxxxx
   ```
   should be sufficient
   
   WDYT? This is definitely a nit comment :) 
   
   



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