malopezh commented on issue #1165:
URL: 
https://github.com/apache/iceberg-python/issues/1165#issuecomment-2346956686

   > thanks for reporting this. can you add an example code of how you created 
the table?
   
   Hello!
   
   Sure here you have the code:
   
   `
   schema = Schema(
        NestedField(field_id=1, name="datetime", field_type=StringType(), 
required=False,current_schema=1),
        NestedField(field_id=2, name="symbol", field_type=StringType(), 
required=False,current_schema=1),
        NestedField(field_id=3, name="bid", field_type=FloatType(), 
required=False,current_schema=1),
        NestedField(field_id=4, name="ask", field_type=DoubleType(), 
required=False,current_schema=1),
    )
   
   
   partition_spec = PartitionSpec(
           PartitionField(
               source_id=1, field_id=1000, transform=DayTransform(), 
name="datetime_day"
           )
       )
   
   from pyiceberg.table.sorting import SortOrder, SortField
   from pyiceberg.transforms import IdentityTransform
   # Sort on the symbol
   sort_order = SortOrder(SortField(source_id=2, transform=IdentityTransform()))
   
   identifier = ("iceberg", "default")
   
   tbl = local_catalog.create_table_if_not_exists(identifier=identifier,
            schema=schema,
            location="s3a://my_oci_bucket/my_folder",
            partition_spec=partition_spec,
            sort_order=sort_order, properties={})
   
   tbl.overwrite(df)
   `
   
   NOTE: metadata is being created successfully 
   
   Thanks!!


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