You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "kevinjqliu (via GitHub)" <gi...@apache.org> on 2024/09/24 17:39:57 UTC

[I] PyIceberg Production Use case survey [iceberg-python]

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

   ### Feature Request / Improvement
   
   As part of the journey toward version 1.0, we want to capture how this library is used in "production" environments. 
   
   Would love to hear from current users (and potential users) on different use cases. This will better inform the future roadmap.
   
   Please include use cases in this issue, or if necessary I can start a Google Survey. 
   
   


-- 
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-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "mariotaddeucci (via GitHub)" <gi...@apache.org>.
mariotaddeucci commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2412604690

   Hey, actually I'm using in production for small datasets in combination with duckdb specially to avoid small files with webscrapping.
   
   For ingestion, reading many raw files (json, csv, and parquet), all off then with a key using ulid (sortable id is necessary) in combination with overwrite specifying this key as overwrite filter.
   Duckdb generates a record_batach_reader, which allows to generate the table and schema without load all in memory, after creating the table is necessary to converte into a arrow table to write the final iceberg table.
   
   Because of the sortable id, it's possible to use the the filter predicate overwriting the data between upper and lower bound the data set to be ingested.
   
   The table maintenance still using spark for expiring snapshot.
   
   To avoid small files, after certain period using the duckdb native iceberg read, I reload the entire dataset and overwrite it fully (a workaround for rewrite files procedure)
   
   I would love to expand it for more scenarios but some features are necessary like
   
   - allow to write using record_batch_reader, so no need to load a full arrow table in memory.
   - clear snapshots from pyiceberg, that's turns the maintenance easier, no external engine or tool
   - maybe a simple optimization like binpack, is not the best but it's better than read all and overwrite it.
   - Maybe an integration with duckdb, just taking the last metada location and creating a view on it using their native iceberg reader
   - a truly merge operation, so avoiding errors when doing upserts, making not necessary to use the upper and lower bound of DF key as overwrite filter.
   
   These pipelines are leaving from spark server and running on isolated containers.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2513814104

   Maybe we can enable Discussions like https://github.com/apache/iceberg-rust/discussions for this purpose


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "carbonleakage (via GitHub)" <gi...@apache.org>.
carbonleakage commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-4257224049

   We use iceberg through AWS Glue, primarily for storing timeseries data following a medallion architecture. As we have mainly python developers, there is a strong preference to use python native solutions. We typically have concurrent writers (50-2000) and readers. So far we use pyiceberg for both writing and reading data, the slack community has been very welcoming and has helped us understand the strengths and weakness of using pyiceberg for our case. For some query types we have also started testing AWS Athena. 
   
   Features that would be very relevant for us are (I see some of these have in progress gh PRs):
   
   1. Efficient commit retry logic that does not save the data files again, but just retries the commit.
   2. Caching to reduce the number of network calls to the catalog.
   
   Let me know if additional info is needed!


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "djouallah (via GitHub)" <gi...@apache.org>.
djouallah commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2440232128

   I use it mainly for testing xtable conversion from iceberg to delta, it is by the far the easiest way to generate Iceberg tables :) 


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "jey1987-cmd (via GitHub)" <gi...@apache.org>.
jey1987-cmd commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-5705779840

   Adding a data point that's directly relevant to both requests above (efficient commit-retry without re-saving data files, and catalog call caching).
   
   I ran a series of controlled experiments on a synthetic three-writer workload against PyIceberg with a BigLake REST catalog (Google Cloud), specifically studying commit conflict behavior and retry cost under concurrent writers, across three different timing architectures: fixed-interval scripted writers, autonomous LLM-agent-driven writers, and a fully event-driven (Pub/Sub) streaming pipeline. A few findings that seem relevant to what's being asked for here:
   
   **On request 1 (efficient retry without re-saving data files):**
   
   In every configuration I tested, a write role that revisits and rewrites already-committed rows (rather than appending) showed retry cost dominated almost entirely by commit-side overhead, not data-file I/O. Under three-way concurrent contention, this role's failure rate after 5 retries ranged from 14% to 86% depending on the timing architecture, with retry counts averaging 2-6 per attempt and total resolution time per attempt reaching into the tens of seconds to multiple minutes under sustained contention. Since the underlying data being written was small and unchanged across retries, the cost was structurally a commit/metadata-negotiation cost, not a data-serialization cost -- exactly consistent with the motivation for this feature request.
   
   **On request 2 (catalog call caching):**
   
   Across all three studies, even zero-retry, uncontended commits showed a baseline latency of roughly 5-32+ seconds, scaling with the size of the target table (Pearson correlation between table row count and first-attempt commit latency: r > 0.96, confirmed across four independently replicated runs spanning both scripted and agent-driven timing, and directionally consistent, though at a smaller sample, under genuinely event-driven Pub/Sub timing). This baseline cost appears attributable to REST catalog round-trip overhead rather than contention, since it was present even in single-writer, zero-conflict conditions. Reducing the number of network calls to the catalog (as proposed here) would likely address this baseline cost component directly, separately from anything related to conflict retries themselves.
   
   **Scope/caveats:** this was a synthetic workload (not production traffic), run against BigLake specifically rather than AWS Glue or another REST catalog implementation, and some of the streaming-specific numbers above rest on a small sample (n=4) given how infrequently the high-conflict role could complete an attempt under sustained load -- I'd treat those as directionally supportive rather than a precise characterization. Full experimental setup, corpus generator, and analysis queries are at https://github.com/jey1987-cmd/IcebergConcurrentWriteStudy if useful.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "martyngigg (via GitHub)" <gi...@apache.org>.
martyngigg commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2999341978

   Currently testing a pipeline with [dlt (data load tool)](https://dlthub.com/) for extract and load using `pyiceberg` and then `dbt` for transforms using Trino. `pyiceberg` has made it much easier to create the extracted data tables directly with Python and not needing something like pyspark. 😃 


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "EnyMan (via GitHub)" <gi...@apache.org>.
EnyMan commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-3804099682

   We use PyIceberg to store features for our ML models. We do this daily with full history. We also have this speciality where we need to be able to backfill the data as if we stored it that day. We can compute them like that, but we also need the query interface to be stable, so in case of a failed job, we can rerun it as if it were run at that date (after a failed job, we would stop all future jobs, so we don't break the time continuity). We are upsert-heavy, with tables ranging from 1 column to 100. Milions or 10s of milions of rows. In some tables, only a few rows can change; in others, potentially all rows can change. So upsert speed is a must for us (see https://github.com/apache/iceberg-python/pull/2943 where I attempt to optimize upsert for these types of upserts)


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "stevie9868 (via GitHub)" <gi...@apache.org>.
stevie9868 commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-3217264370

   Many of our users write parallel jobs to create parquet files and then uses pyiceberg interface to add/remove those data files accordingly to do the final commit.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "andreapiso (via GitHub)" <gi...@apache.org>.
andreapiso commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2426611057

   Using pyiceberg alongside Trino. Our ETL is in Trino, pyiceberg Is great for assets where we are doing things like grabbing data from APIs. Instead of storing files and crawling them with something like glue into iceberg tables, we can directly write that data into iceberg so that our Trino pipelines can process it directly, super convenient!


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "nickdelnano (via GitHub)" <gi...@apache.org>.
nickdelnano commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2576377318

   👋  We have a few use cases at Yelp using pyiceberg. We use a lot of of Spark, Flink, and Athena but have some types of use cases where pyiceberg is a good fit. One example is applications that fetch data from 3rd party APIs and need to store the output in the lake so that other engines can read it. These apps used to write messages to Kafka and then Flink would stream them to our data lake, but pyiceberg is simpler, supports schema evolution better and cheaper.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "mr-lunart (via GitHub)" <gi...@apache.org>.
mr-lunart commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-3773827112

   I used PyIceberg to move Parquet data from S3 storage directly into S3 Tables without using Glue or Athena. It is much more convenient.
   
   However, documentation for setting up the catalog with S3 Table, specifically using the REST catalog is quite limited. Additionally, the package size is a concern,with PyArrow the total size is 200MB, which makes deploying to AWS Lambda challenging 


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "vikramsg (via GitHub)" <gi...@apache.org>.
vikramsg commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2577900498

   >  These apps used to write messages to Kafka and then Flink would stream them to our data lake, but pyiceberg is simpler, costs less and supports schema evolution better.
   
   So, do you now let the app directly write to Iceberg? 
   
   


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "nickdelnano (via GitHub)" <gi...@apache.org>.
nickdelnano commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2577929467

   @vikramsg i updated my comment a bit, but yes


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "emorfam (via GitHub)" <gi...@apache.org>.
emorfam commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2472881903

   Currently using PyIceberg for monitoring metadata statistics of Iceberg tables in a custom application (e.g. file count, record count, data distribution across partitions). We periodically compute these statistics and write them to Postgres and hook it up to Grafana. This gives us a better idea how to optimize Iceberg tables further (e.g. partition layout).
   
   In the long run we would like to use PyIceberg as a low-cost alternative to Glue streaming (possibly with AWS Lambda or Quix-Streams inside of Fargate). This is especially interesting for applications that are low-volume in data but have harder requirements on timeliness of data compared to batch jobs. Here are some example use cases:
   
   - Processing assembly-trees in manufacturing that change over time.
   - Ingesting sensor data from production plants that can contain duplicate messages.
   
   `MERGE` support would be really helpful here. I guess handling the amount of data that is being loaded from target table during the `MERGE` operation (e.g. with push-down predicates) will be the biggest obstacle.
   
   Thanks for the great work that the Iceberg community is doing.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] PyIceberg Production Use case survey [iceberg-python]

Posted by "randypitcherii (via GitHub)" <gi...@apache.org>.
randypitcherii commented on issue #1202:
URL: https://github.com/apache/iceberg-python/issues/1202#issuecomment-2473760944

   I use it to mirror tables from one catalog to another all the time. I have scheduled production jobs that do this mirroring before and after my dbt builds. 
   
   Pyiceberg is just the best library. 


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org