narenjcs opened a new issue, #2256:
URL: https://github.com/apache/iceberg-python/issues/2256

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   Not able to load azure databricks hive table
   `
   from pyiceberg.catalog import load_catalog
   from pyiceberg.schema import Schema
   from pyiceberg.types import IntegerType, NestedField, StringType, DecimalType
   
   import pyarrow as pa
   catalog = load_catalog(
       "default",
       **{
           
           "uri": f"https://domain/api/2.1/unity-catalog/iceberg-rest";,
           "warehouse": f"test",
           "token":"43534534"
       },
   )
   catalog.create_namespace_if_not_exists("test1")
   schema = Schema(
      fields=(
           NestedField(1, "city", StringType(), required=True),
           NestedField(2, "inhabitants", IntegerType(), required=False)
   ),
       # Mark City as the identifier field, also known as the primary-key
       identifier_field_ids=[1]
   )
   
       # If the table does not exist, create it
   # tbl = catalog.create_table_if_not_exists("test.sample2", schema=schema)
   
   tbl = catalog.load_table("test1.sample")
   
   
   
   # Write some data
   df = pa.Table.from_pylist(
       [
           {"city": "Amsterdam", "inhabitants": 102},
           {"city": "San Francisco", "inhabitants": 130},
           {"city": "Drachten", "inhabitants": 150},
           {"city": "Paris", "inhabitants": 150},
   
       ],
       schema=schema.as_arrow()
   )
   df.cast(schema.as_arrow())
   tbl.upsert(df)
   `
   
   <img width="2718" height="531" alt="Image" 
src="https://github.com/user-attachments/assets/d6aeec28-b451-4f94-8981-0ae1fed178a7";
 />
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to