| <!doctype html> | |
| <html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-1.0 docs-doc-page docs-doc-id-apis/python/api-reference" data-has-hydrated="false"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="generator" content="Docusaurus v3.10.2"> | |
| <title data-rh="true">API Reference | Apache Fluss™</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://fluss.apache.org/img/social/fluss-social-card.png"><meta data-rh="true" name="twitter:image" content="https://fluss.apache.org/img/social/fluss-social-card.png"><meta data-rh="true" property="og:url" content="https://fluss.apache.org/docs/apis/python/api-reference/"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="1.0"><meta data-rh="true" name="docusaurus_tag" content="docs-default-1.0"><meta data-rh="true" name="docsearch:version" content="1.0"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-1.0"><meta data-rh="true" property="og:title" content="API Reference | Apache Fluss™"><meta data-rh="true" name="description" content="Complete API reference for the Fluss Python client."><meta data-rh="true" property="og:description" content="Complete API reference for the Fluss Python client."><link data-rh="true" rel="icon" href="/img/logo/fluss_favicon.svg"><link data-rh="true" rel="canonical" href="https://fluss.apache.org/docs/apis/python/api-reference/"><link data-rh="true" rel="alternate" href="https://fluss.apache.org/docs/apis/python/api-reference/" hreflang="en"><link data-rh="true" rel="alternate" href="https://fluss.apache.org/docs/apis/python/api-reference/" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://X8KSGGLJW1-dsn.algolia.net" crossorigin="anonymous"><script data-rh="true" type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Fluss APIs","item":"https://fluss.apache.org/docs/apis/"},{"@type":"ListItem","position":2,"name":"API Reference","item":"https://fluss.apache.org/docs/apis/python/api-reference"}]}</script><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Apache Fluss™ RSS Feed"> | |
| <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Apache Fluss™ Atom Feed"> | |
| <link rel="search" type="application/opensearchdescription+xml" title="Apache Fluss™" href="/opensearch.xml"> | |
| <link rel="icon" href="/img/logo/fluss_favicon.svg"> | |
| <link rel="manifest" href="/manifest.json"> | |
| <meta name="theme-color" content="#102856"> | |
| <meta name="description" content="Apache Fluss is an open-source columnar streaming storage system. Sub-second freshness, primary-key tables, first-class Apache Flink integration, and native tiering to Apache Iceberg and Apache Paimon."> | |
| <meta property="og:title" content="Apache Fluss · Streaming Storage for the Real-Time Lakehouse"> | |
| <meta property="og:description" content="Open-source columnar streaming storage with sub-second freshness, primary-key tables, Flink integration, and native tiering to Iceberg and Paimon."> | |
| <meta property="og:type" content="website"> | |
| <meta name="twitter:card" content="summary_large_image"> | |
| <meta name="twitter:title" content="Apache Fluss · Streaming Storage for the Real-Time Lakehouse"> | |
| <meta name="twitter:description" content="Open-source columnar streaming storage with sub-second freshness, primary-key tables, Flink integration, and native tiering to Iceberg and Paimon."> | |
| <meta name="theme-color" content="#102856"> | |
| <script src="https://widget.kapa.ai/kapa-widget.bundle.js" async data-website-id="40ccde97-65ed-46d8-81f2-fe8a8a31f9d9" data-project-name="Apache Fluss" data-project-color="#06b6d4" data-project-logo="/img/logo/svg/colored_logo_notext.svg" data-modal-title="Ask Apache Fluss AI" data-modal-image="/img/logo/svg/colored_logo_notext.svg" data-modal-disclaimer="This is a custom LLM with access to the [Apache Fluss documentation](https://fluss.apache.org/docs/). Answers may be inaccurate — always verify against the official docs." data-button-hide="true" data-modal-override-open-selector="#navbar-ask-ai-btn" data-consent-required="true" data-user-analytics-cookie-enabled="false"></script><link rel="stylesheet" href="/assets/css/styles.1448fd84.css"> | |
| <script src="/assets/js/runtime~main.c7285939.js" defer="defer"></script> | |
| <script src="/assets/js/main.c05d46e3.js" defer="defer"></script> | |
| </head> | |
| <body> | |
| <svg style="display: none;"><defs> | |
| <symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol> | |
| </defs></svg> | |
| <script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||"light"),document.documentElement.setAttribute("data-theme-choice",t||"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo/svg/white_color_logo.svg" alt="Fluss" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/logo/svg/white_color_logo.svg" alt="Fluss" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate"></b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/">Docs</a><a class="navbar__item navbar__link" href="/blog/">Blog</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Learn</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/user-stories/">User Stories</a></li><li><a class="dropdown__link" href="/learn/talks/">Talks</a></li><li><a class="dropdown__link" href="/learn/videos/">Videos</a></li></ul></div><a class="navbar__item navbar__link" href="/community/welcome/">Community</a><a class="navbar__item navbar__link" href="/roadmap/">Roadmap</a><a class="navbar__item navbar__link" href="/downloads/">Downloads</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><div class="navbar__item"><button id="navbar-ask-ai-btn" type="button" class="navbar-ask-ai">Ask AI</button></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link" aria-haspopup="true" aria-expanded="false" role="button" href="/docs/apis/python/api-reference/">1.0</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/next/apis/python/api-reference/">Next</a></li><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/apis/python/api-reference/">1.0</a></li><li><a class="dropdown__link" href="/docs/0.9/">0.9</a></li><li><a class="dropdown__link" href="/docs/0.8/">0.8</a></li><li><a class="dropdown__link" href="/docs/0.7/">0.7</a></li><li><a class="dropdown__link" href="/docs/0.6/">0.6</a></li><li><a class="dropdown__link" href="/docs/0.5/">0.5</a></li></ul></div><a href="https://github.com/apache/fluss" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-github-link" aria-label="GitHub repository"></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill="currentColor" d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Meta+k)" aria-keyshortcuts="Meta+k"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="8" stroke="currentColor" fill="none" stroke-width="1.4"></circle><path d="m21 21-4.3-4.3" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/"><span class="linkLabel_WmDU">Introduction</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/concepts/streamhouse-and-lakestream/"><span class="categoryLinkLabel_W154">Concepts</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/quickstart/flink/"><span class="categoryLinkLabel_W154">Quickstarts</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/install-deploy/overview/"><span class="categoryLinkLabel_W154">Installation & Deployment</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/table-design/overview/"><span class="categoryLinkLabel_W154">Table Design</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/engine-flink/getting-started/"><span class="categoryLinkLabel_W154">Engine Flink</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/engine-spark/getting-started/"><span class="categoryLinkLabel_W154">Engine Spark</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/streaming-lakehouse/overview/"><span class="categoryLinkLabel_W154">Lakestream</span></a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/gateway/"><span class="linkLabel_WmDU">Gateway</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/maintenance/configuration/"><span class="categoryLinkLabel_W154">Maintenance</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/docs/security/overview/"><span class="categoryLinkLabel_W154">Security</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--active" href="/docs/apis/"><span class="categoryLinkLabel_W154">Fluss APIs</span></a><button aria-label="Collapse sidebar category 'Fluss APIs'" aria-expanded="true" type="button" class="clean-btn menu__caret"></button></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/apis/java/"><span class="linkLabel_WmDU">Java</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/docs/apis/rust/installation/"><span class="categoryLinkLabel_W154">Rust</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" tabindex="0" href="/docs/apis/python/installation/"><span class="categoryLinkLabel_W154">Python</span></a></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/apis/python/installation/"><span class="linkLabel_WmDU">Installation</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/apis/python/api-reference/"><span class="linkLabel_WmDU">API Reference</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/apis/python/data-types/"><span class="linkLabel_WmDU">Data Types</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/apis/python/error-handling/"><span class="linkLabel_WmDU">Error Handling</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-3 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist" tabindex="0" href="/docs/apis/python/example/"><span class="categoryLinkLabel_W154">Examples</span></a><button aria-label="Expand sidebar category 'Examples'" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_byQd menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/docs/apis/cpp/installation/"><span class="categoryLinkLabel_W154">C++</span></a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/apis/client-support-matrix/"><span class="linkLabel_WmDU">Client Support Matrix</span></a></li></ul></li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><a class="breadcrumbs__link" href="/docs/apis/"><span>Fluss APIs</span></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Python</span></li><li class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link">API Reference</span></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">Version: 1.0</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>API Reference</h1></header> | |
| <p>Complete API reference for the Fluss Python client.</p> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="config"><code>Config</code><a href="#config" class="hash-link" aria-label="Direct link to config" title="Direct link to config" translate="no"></a></h2> | |
| <table><thead><tr><th>Method / Property</th><th>Config Key</th><th>Description</th></tr></thead><tbody><tr><td><code>Config(properties: dict = None)</code></td><td></td><td>Create config from a dict of key-value pairs</td></tr><tr><td><code>bootstrap_servers</code></td><td><code>bootstrap.servers</code></td><td>Get/set coordinator server address</td></tr><tr><td><code>writer_request_max_size</code></td><td><code>writer.request-max-size</code></td><td>Get/set max request size in bytes</td></tr><tr><td><code>writer_acks</code></td><td><code>writer.acks</code></td><td>Get/set acknowledgment setting (<code>"all"</code> for all replicas)</td></tr><tr><td><code>writer_retries</code></td><td><code>writer.retries</code></td><td>Get/set number of retries on failure</td></tr><tr><td><code>writer_batch_size</code></td><td><code>writer.batch-size</code></td><td>Get/set write batch size in bytes. Upper bound when dynamic sizing is on; fixed batch size when off</td></tr><tr><td><code>writer_dynamic_batch_size_enabled</code></td><td><code>writer.dynamic-batch-size.enabled</code></td><td>Get/set whether the per-table dynamic batch size estimator is enabled (default <code>true</code>)</td></tr><tr><td><code>writer_dynamic_batch_size_min</code></td><td><code>writer.dynamic-batch-size-min</code></td><td>Get/set the lower bound for the dynamic batch size estimator (default 256 KB; ignored when disabled)</td></tr><tr><td><code>writer_batch_timeout_ms</code></td><td><code>writer.batch-timeout-ms</code></td><td>Get/set max time in ms to wait for a writer batch to fill up before sending</td></tr><tr><td><code>writer_bucket_no_key_assigner</code></td><td><code>writer.bucket.no-key-assigner</code></td><td>Get/set bucket assignment strategy (<code>"sticky"</code> or <code>"round_robin"</code>)</td></tr><tr><td><code>scanner_remote_log_prefetch_num</code></td><td><code>scanner.remote-log.prefetch-num</code></td><td>Get/set number of remote log segments to prefetch</td></tr><tr><td><code>remote_file_download_thread_num</code></td><td><code>remote-file.download-thread-num</code></td><td>Get/set number of threads for remote log downloads</td></tr><tr><td><code>scanner_remote_log_read_concurrency</code></td><td><code>scanner.remote-log.read-concurrency</code></td><td>Get/set streaming read concurrency within a remote log file</td></tr><tr><td><code>scanner_log_max_poll_records</code></td><td><code>scanner.log.max-poll-records</code></td><td>Get/set max number of records returned in a single poll()</td></tr><tr><td><code>scanner_log_fetch_max_bytes</code></td><td><code>scanner.log.fetch.max-bytes</code></td><td>Get/set maximum bytes per fetch response for LogScanner</td></tr><tr><td><code>scanner_log_fetch_min_bytes</code></td><td><code>scanner.log.fetch.min-bytes</code></td><td>Get/set minimum bytes the server must accumulate before returning a fetch response</td></tr><tr><td><code>scanner_log_fetch_wait_max_time_ms</code></td><td><code>scanner.log.fetch.wait-max-time-ms</code></td><td>Get/set maximum time (ms) the server may wait to satisfy min-bytes</td></tr><tr><td><code>scanner_log_fetch_max_bytes_for_bucket</code></td><td><code>scanner.log.fetch.max-bytes-for-bucket</code></td><td>Get/set maximum bytes per fetch response per bucket for LogScanner</td></tr><tr><td><code>connect_timeout_ms</code></td><td><code>connect-timeout</code></td><td>Get/set TCP connect timeout in milliseconds</td></tr><tr><td><code>security_protocol</code></td><td><code>security.protocol</code></td><td>Get/set security protocol (<code>"PLAINTEXT"</code> or <code>"sasl"</code>)</td></tr><tr><td><code>security_sasl_mechanism</code></td><td><code>security.sasl.mechanism</code></td><td>Get/set SASL mechanism (only <code>"PLAIN"</code> is supported)</td></tr><tr><td><code>security_sasl_username</code></td><td><code>security.sasl.username</code></td><td>Get/set SASL username (required when protocol is <code>"sasl"</code>)</td></tr><tr><td><code>security_sasl_password</code></td><td><code>security.sasl.password</code></td><td>Get/set SASL password (required when protocol is <code>"sasl"</code>)</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="flussconnection"><code>FlussConnection</code><a href="#flussconnection" class="hash-link" aria-label="Direct link to flussconnection" title="Direct link to flussconnection" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>await FlussConnection.create(config) -> FlussConnection</code></td><td>Connect to a Fluss cluster</td></tr><tr><td><code>conn.get_admin() -> FlussAdmin</code></td><td>Get admin interface</td></tr><tr><td><code>await conn.get_table(table_path) -> FlussTable</code></td><td>Get a table for read/write operations</td></tr><tr><td><code>await conn.close()</code></td><td>Close the connection</td></tr></tbody></table> | |
| <p>Supports <code>async with</code> statement (async context manager).</p> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="flussadmin"><code>FlussAdmin</code><a href="#flussadmin" class="hash-link" aria-label="Direct link to flussadmin" title="Direct link to flussadmin" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>await create_database(name, database_descriptor=None, ignore_if_exists=False)</code></td><td>Create a database</td></tr><tr><td><code>await drop_database(name, ignore_if_not_exists=False, cascade=True)</code></td><td>Drop a database</td></tr><tr><td><code>await list_databases() -> list[str]</code></td><td>List all databases</td></tr><tr><td><code>await database_exists(name) -> bool</code></td><td>Check if a database exists</td></tr><tr><td><code>await get_database_info(name) -> DatabaseInfo</code></td><td>Get database metadata</td></tr><tr><td><code>await create_table(table_path, table_descriptor, ignore_if_exists=False)</code></td><td>Create a table</td></tr><tr><td><code>await drop_table(table_path, ignore_if_not_exists=False)</code></td><td>Drop a table</td></tr><tr><td><code>await get_table_info(table_path) -> TableInfo</code></td><td>Get table metadata</td></tr><tr><td><code>await list_tables(database_name) -> list[str]</code></td><td>List tables in a database</td></tr><tr><td><code>await table_exists(table_path) -> bool</code></td><td>Check if a table exists</td></tr><tr><td><code>await list_offsets(table_path, bucket_ids, offset_spec) -> dict[int, int]</code></td><td>Get offsets for buckets</td></tr><tr><td><code>await list_partition_offsets(table_path, partition_name, bucket_ids, offset_spec) -> dict[int, int]</code></td><td>Get offsets for a partition's buckets</td></tr><tr><td><code>await create_partition(table_path, partition_spec, ignore_if_exists=False)</code></td><td>Create a partition</td></tr><tr><td><code>await drop_partition(table_path, partition_spec, ignore_if_not_exists=False)</code></td><td>Drop a partition</td></tr><tr><td><code>await list_partition_infos(table_path) -> list[PartitionInfo]</code></td><td>List partitions</td></tr><tr><td><code>await get_latest_lake_snapshot(table_path) -> LakeSnapshot</code></td><td>Get latest lake snapshot</td></tr><tr><td><code>await get_server_nodes() -> list[ServerNode]</code></td><td>Get all alive server nodes</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="servernode"><code>ServerNode</code><a href="#servernode" class="hash-link" aria-label="Direct link to servernode" title="Direct link to servernode" translate="no"></a></h2> | |
| <table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>.id -> int</code></td><td>Server node ID</td></tr><tr><td><code>.host -> str</code></td><td>Hostname of the server</td></tr><tr><td><code>.port -> int</code></td><td>Port number</td></tr><tr><td><code>.server_type -> str</code></td><td>Server type (<code>"CoordinatorServer"</code>, <code>"TabletServer"</code>, or <code>"Unknown"</code>)</td></tr><tr><td><code>.uid -> str</code></td><td>Unique identifier (e.g. <code>"cs-0"</code>, <code>"ts-1"</code>)</td></tr></tbody></table> | |
| <p><code>"Unknown"</code> is used when the client has not yet determined the endpoint type, such as bootstrap endpoints.</p> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="flusstable"><code>FlussTable</code><a href="#flusstable" class="hash-link" aria-label="Direct link to flusstable" title="Direct link to flusstable" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>new_scan() -> TableScan</code></td><td>Create a scan builder</td></tr><tr><td><code>new_append() -> TableAppend</code></td><td>Create an append builder for log tables</td></tr><tr><td><code>new_upsert() -> TableUpsert</code></td><td>Create an upsert builder for PK tables</td></tr><tr><td><code>new_lookup() -> TableLookup</code></td><td>Create a lookup builder for PK tables</td></tr><tr><td><code>get_table_info() -> TableInfo</code></td><td>Get table metadata</td></tr><tr><td><code>get_table_path() -> TablePath</code></td><td>Get table path</td></tr><tr><td><code>has_primary_key() -> bool</code></td><td>Check if table has a primary key</td></tr></tbody></table> | |
| <table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>.arrow_schema -> pa.Schema</code></td><td>The Arrow schema <code>write_arrow_batch</code> expects</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="tablescan"><code>TableScan</code><a href="#tablescan" class="hash-link" aria-label="Direct link to tablescan" title="Direct link to tablescan" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.project(indices) -> TableScan</code></td><td>Project columns by index</td></tr><tr><td><code>.project_by_name(names) -> TableScan</code></td><td>Project columns by name</td></tr><tr><td><code>.limit(n) -> TableScan</code></td><td>Set a positive row limit (enables <code>create_bucket_batch_scanner</code>; rejected by log scanners)</td></tr><tr><td><code>.filter(predicate) -> TableScan</code></td><td>Push a filter down for server-side batch pruning (see <a href="#col" class=""><code>col</code></a>)</td></tr><tr><td><code>await .create_log_scanner() -> LogScanner</code></td><td>Create record-based scanner (for <code>poll()</code>); on a primary-key table, subscribes to its CDC changelog (per-record <code>change_type</code>)</td></tr><tr><td><code>await .create_record_batch_log_scanner() -> LogScanner</code></td><td>Create batch-based scanner (for <code>poll_arrow()</code>, <code>to_arrow()</code>, etc.); log tables only — no per-record change types</td></tr><tr><td><code>.create_bucket_batch_scanner(bucket) -> BatchScanner</code></td><td>Bounded scan of one bucket (requires <code>limit</code>; runs on first <code>next_batch()</code>)</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="col"><code>col</code><a href="#col" class="hash-link" aria-label="Direct link to col" title="Direct link to col" translate="no"></a></h2> | |
| <p><code>fluss.col(name)</code> returns a <code>ColumnRef</code> used to build a filter for | |
| <code>TableScan.filter()</code>. Pruning is conservative: a returned batch may still hold | |
| non-matching rows, so apply the predicate again on the results.</p> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>col(name) >= value</code> (<code>></code>, <code><</code>, <code><=</code>, <code>==</code>, <code>!=</code>)</td><td>Comparison predicate</td></tr><tr><td><code>.equal(v)</code>, <code>.not_equal(v)</code></td><td>Same as <code>==</code> and <code>!=</code></td></tr><tr><td><code>.less_than(v)</code>, <code>.less_or_equal(v)</code></td><td>Same as <code><</code> and <code><=</code></td></tr><tr><td><code>.greater_than(v)</code>, <code>.greater_or_equal(v)</code></td><td>Same as <code>></code> and <code>>=</code></td></tr><tr><td><code>.is_null()</code>, <code>.is_not_null()</code></td><td>Prune on the batch's null count</td></tr><tr><td><code>.starts_with(p)</code>, <code>.ends_with(s)</code>, <code>.contains(i)</code></td><td>String predicates</td></tr><tr><td><code>.is_in(values)</code>, <code>.not_in(values)</code></td><td>Set membership</td></tr></tbody></table> | |
| <p>Predicates combine with <code>&</code> and <code>|</code> (or <code>and_()</code> and <code>or_()</code>).</p> | |
| <p>Literals are plain Python values, and the column's type decides how they are | |
| encoded, so <code>col("id") >= 200</code> works for any integer column and an out-of-range | |
| literal is rejected when the scanner is created:</p> | |
| <table><thead><tr><th>Python type</th><th>Fluss column types</th></tr></thead><tbody><tr><td><code>bool</code></td><td>BOOLEAN</td></tr><tr><td><code>int</code></td><td>TINYINT, SMALLINT, INT, BIGINT (range-checked)</td></tr><tr><td><code>float</code></td><td>DOUBLE, and FLOAT when exactly representable</td></tr><tr><td><code>str</code></td><td>CHAR, STRING</td></tr><tr><td><code>bytes</code></td><td>BINARY, BYTES</td></tr><tr><td><code>None</code></td><td>not comparable; use <code>.is_null()</code> / <code>.is_not_null()</code></td></tr><tr><td><code>decimal.Decimal</code></td><td>DECIMAL, rejected if the column's scale cannot hold it exactly</td></tr><tr><td><code>datetime.date</code></td><td>DATE</td></tr><tr><td><code>datetime.time</code></td><td>TIME</td></tr><tr><td><code>datetime.datetime</code></td><td>TIMESTAMP when naive, TIMESTAMP_LTZ when tz-aware</td></tr></tbody></table> | |
| <div class="language-python codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#0A0F1C;--prism-background-color:#F8FAFC"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-python codeBlock_bY9V thin-scrollbar" style="color:#0A0F1C;background-color:#F8FAFC"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#0A0F1C"><span class="token keyword" style="color:#194670">from</span><span class="token plain"> fluss </span><span class="token keyword" style="color:#194670">import</span><span class="token plain"> col</span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain">hot </span><span class="token operator" style="color:#475569">=</span><span class="token plain"> </span><span class="token punctuation" style="color:#475569">(</span><span class="token plain">col</span><span class="token punctuation" style="color:#475569">(</span><span class="token string" style="color:#0E7C66">"id"</span><span class="token punctuation" style="color:#475569">)</span><span class="token plain"> </span><span class="token operator" style="color:#475569">>=</span><span class="token plain"> </span><span class="token number" style="color:#B45309">200</span><span class="token punctuation" style="color:#475569">)</span><span class="token plain"> </span><span class="token operator" style="color:#475569">&</span><span class="token plain"> col</span><span class="token punctuation" style="color:#475569">(</span><span class="token string" style="color:#0E7C66">"name"</span><span class="token punctuation" style="color:#475569">)</span><span class="token punctuation" style="color:#475569">.</span><span class="token plain">starts_with</span><span class="token punctuation" style="color:#475569">(</span><span class="token string" style="color:#0E7C66">"high"</span><span class="token punctuation" style="color:#475569">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain">scanner </span><span class="token operator" style="color:#475569">=</span><span class="token plain"> </span><span class="token keyword" style="color:#194670">await</span><span class="token plain"> table</span><span class="token punctuation" style="color:#475569">.</span><span class="token plain">new_scan</span><span class="token punctuation" style="color:#475569">(</span><span class="token punctuation" style="color:#475569">)</span><span class="token punctuation" style="color:#475569">.</span><span class="token builtin" style="color:#12325C">filter</span><span class="token punctuation" style="color:#475569">(</span><span class="token plain">hot</span><span class="token punctuation" style="color:#475569">)</span><span class="token punctuation" style="color:#475569">.</span><span class="token plain">create_log_scanner</span><span class="token punctuation" style="color:#475569">(</span><span class="token punctuation" style="color:#475569">)</span><br></div></code></pre></div></div> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="tableappend"><code>TableAppend</code><a href="#tableappend" class="hash-link" aria-label="Direct link to tableappend" title="Direct link to tableappend" translate="no"></a></h2> | |
| <p>Builder for creating an <code>AppendWriter</code>. Obtain via <code>FlussTable.new_append()</code>.</p> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.create_writer() -> AppendWriter</code></td><td>Create the append writer</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="tableupsert"><code>TableUpsert</code><a href="#tableupsert" class="hash-link" aria-label="Direct link to tableupsert" title="Direct link to tableupsert" translate="no"></a></h2> | |
| <p>Builder for creating an <code>UpsertWriter</code>. Obtain via <code>FlussTable.new_upsert()</code>.</p> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.partial_update_by_name(columns) -> TableUpsert</code></td><td>Configure partial update by column names</td></tr><tr><td><code>.partial_update_by_index(indices) -> TableUpsert</code></td><td>Configure partial update by column indices</td></tr><tr><td><code>.create_writer() -> UpsertWriter</code></td><td>Create the upsert writer</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="tablelookup"><code>TableLookup</code><a href="#tablelookup" class="hash-link" aria-label="Direct link to tablelookup" title="Direct link to tablelookup" translate="no"></a></h2> | |
| <p>Builder for creating a <code>Lookuper</code> or <code>PrefixLookuper</code>. Obtain via <code>FlussTable.new_lookup()</code>.</p> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.create_lookuper() -> Lookuper</code></td><td>Create a primary key lookuper</td></tr><tr><td><code>.lookup_by(column_names) -> TablePrefixLookup</code></td><td>Switch to prefix-scan mode for the given columns (partition keys + bucket keys)</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="tableprefixlookup"><code>TablePrefixLookup</code><a href="#tableprefixlookup" class="hash-link" aria-label="Direct link to tableprefixlookup" title="Direct link to tableprefixlookup" translate="no"></a></h2> | |
| <p>Builder for creating a <code>PrefixLookuper</code>. Obtain via <code>TableLookup.lookup_by(columns)</code>.</p> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.create_lookuper() -> PrefixLookuper</code></td><td>Create the prefix lookuper</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="appendwriter"><code>AppendWriter</code><a href="#appendwriter" class="hash-link" aria-label="Direct link to appendwriter" title="Direct link to appendwriter" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.append(row) -> WriteResultHandle</code></td><td>Append a row (dict, list, or tuple)</td></tr><tr><td><code>.write_arrow(table)</code></td><td>Write a PyArrow Table</td></tr><tr><td><code>.write_arrow_batch(batch) -> WriteResultHandle</code></td><td>Write a PyArrow RecordBatch, whose column types must match <code>table.arrow_schema</code></td></tr><tr><td><code>.write_pandas(df)</code></td><td>Write a Pandas DataFrame</td></tr><tr><td><code>await .flush()</code></td><td>Flush all pending writes</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="upsertwriter"><code>UpsertWriter</code><a href="#upsertwriter" class="hash-link" aria-label="Direct link to upsertwriter" title="Direct link to upsertwriter" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.upsert(row) -> WriteResultHandle</code></td><td>Upsert a row (insert or update by PK)</td></tr><tr><td><code>.delete(pk) -> WriteResultHandle</code></td><td>Delete a row by primary key</td></tr><tr><td><code>await .flush()</code></td><td>Flush all pending operations</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="writeresulthandle"><code>WriteResultHandle</code><a href="#writeresulthandle" class="hash-link" aria-label="Direct link to writeresulthandle" title="Direct link to writeresulthandle" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>await .wait()</code></td><td>Wait for server acknowledgment of this write</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="lookuper"><code>Lookuper</code><a href="#lookuper" class="hash-link" aria-label="Direct link to lookuper" title="Direct link to lookuper" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>await .lookup(pk) -> dict | None</code></td><td>Lookup a row by primary key</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="prefixlookuper"><code>PrefixLookuper</code><a href="#prefixlookuper" class="hash-link" aria-label="Direct link to prefixlookuper" title="Direct link to prefixlookuper" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>await .lookup(prefix) -> list[dict]</code></td><td>Lookup all rows matching a prefix key</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="logscanner"><code>LogScanner</code><a href="#logscanner" class="hash-link" aria-label="Direct link to logscanner" title="Direct link to logscanner" translate="no"></a></h2> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.subscribe(bucket_id, start_offset)</code></td><td>Subscribe to a bucket</td></tr><tr><td><code>.subscribe_buckets(bucket_offsets)</code></td><td>Subscribe to multiple buckets (<code>{bucket_id: offset}</code>)</td></tr><tr><td><code>.subscribe_partition(partition_id, bucket_id, start_offset)</code></td><td>Subscribe to a partition bucket</td></tr><tr><td><code>.subscribe_partition_buckets(partition_bucket_offsets)</code></td><td>Subscribe to multiple partition+bucket combos (<code>{(part_id, bucket_id): offset}</code>)</td></tr><tr><td><code>.unsubscribe(bucket_id)</code></td><td>Unsubscribe from a bucket (non-partitioned tables)</td></tr><tr><td><code>.unsubscribe_partition(partition_id, bucket_id)</code></td><td>Unsubscribe from a partition bucket</td></tr><tr><td><code>await .poll(timeout_ms) -> ScanRecords</code></td><td>Poll individual records (record scanner only)</td></tr><tr><td><code>await .poll_arrow(timeout_ms) -> pa.Table</code></td><td>Poll as Arrow Table (batch scanner only)</td></tr><tr><td><code>await .poll_record_batch(timeout_ms) -> list[RecordBatch]</code></td><td>Poll batches with metadata (batch scanner only)</td></tr><tr><td><code>.to_arrow_batch_reader() -> pa.RecordBatchReader</code></td><td>Lazy Arrow RecordBatchReader reading until latest offsets (batch scanner only)</td></tr><tr><td><code>await .to_arrow() -> pa.Table</code></td><td>Read all subscribed data as Arrow Table (batch scanner only)</td></tr><tr><td><code>await .to_pandas() -> pd.DataFrame</code></td><td>Read all subscribed data as DataFrame (batch scanner only)</td></tr></tbody></table> | |
| <blockquote> | |
| <p><strong>Note:</strong> Overlapping <code>poll_*</code> / <code>to_arrow*</code> / <code>to_arrow_batch_reader</code> calls on the same underlying scanner are not supported. Use only one active polling/consumption path at a time.</p> | |
| </blockquote> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="batchscanner"><code>BatchScanner</code><a href="#batchscanner" class="hash-link" aria-label="Direct link to batchscanner" title="Direct link to batchscanner" translate="no"></a></h2> | |
| <p>One-shot bounded scan of a single bucket. Obtain via <code>table.new_scan().limit(n).create_bucket_batch_scanner(bucket)</code>. The scan runs on the first call below, yields its single batch once, then is spent (create a new scanner to scan again).</p> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.bucket -> TableBucket</code></td><td>The bucket being scanned (property)</td></tr><tr><td><code>await .next_batch() -> RecordBatch | None</code></td><td>Run the scan; returns the batch once, then <code>None</code></td></tr><tr><td><code>await .collect_all_batches() -> list[RecordBatch]</code></td><td>Drain into a list of batches</td></tr><tr><td><code>await .to_arrow() -> pa.Table</code></td><td>Drain into a single Arrow Table</td></tr><tr><td><code>await .to_pandas() -> pd.DataFrame</code></td><td>Drain into a Pandas DataFrame</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="scanrecords"><code>ScanRecords</code><a href="#scanrecords" class="hash-link" aria-label="Direct link to scanrecords" title="Direct link to scanrecords" translate="no"></a></h2> | |
| <p>Returned by <code>LogScanner.poll()</code>. Records are grouped by bucket.</p> | |
| <blockquote> | |
| <p><strong>Note:</strong> Flat iteration and integer indexing traverse buckets in an arbitrary order that is consistent within a single <code>ScanRecords</code> instance but may differ between <code>poll()</code> calls. Use per-bucket access (<code>.items()</code>, <code>.records(bucket)</code>) when bucket ordering matters.</p> | |
| </blockquote> | |
| <div class="language-python codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#0A0F1C;--prism-background-color:#F8FAFC"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-python codeBlock_bY9V thin-scrollbar" style="color:#0A0F1C;background-color:#F8FAFC"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#0A0F1C"><span class="token plain">scan_records </span><span class="token operator" style="color:#475569">=</span><span class="token plain"> </span><span class="token keyword" style="color:#194670">await</span><span class="token plain"> scanner</span><span class="token punctuation" style="color:#475569">.</span><span class="token plain">poll</span><span class="token punctuation" style="color:#475569">(</span><span class="token plain">timeout_ms</span><span class="token operator" style="color:#475569">=</span><span class="token number" style="color:#B45309">5000</span><span class="token punctuation" style="color:#475569">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"></span><span class="token comment" style="color:#64748B;font-style:italic"># Sequence access</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain">scan_records</span><span class="token punctuation" style="color:#475569">[</span><span class="token number" style="color:#B45309">0</span><span class="token punctuation" style="color:#475569">]</span><span class="token plain"> </span><span class="token comment" style="color:#64748B;font-style:italic"># first record</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain">scan_records</span><span class="token punctuation" style="color:#475569">[</span><span class="token operator" style="color:#475569">-</span><span class="token number" style="color:#B45309">1</span><span class="token punctuation" style="color:#475569">]</span><span class="token plain"> </span><span class="token comment" style="color:#64748B;font-style:italic"># last record</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain">scan_records</span><span class="token punctuation" style="color:#475569">[</span><span class="token punctuation" style="color:#475569">:</span><span class="token number" style="color:#B45309">5</span><span class="token punctuation" style="color:#475569">]</span><span class="token plain"> </span><span class="token comment" style="color:#64748B;font-style:italic"># first 5 records</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"></span><span class="token comment" style="color:#64748B;font-style:italic"># Per-bucket access</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"></span><span class="token keyword" style="color:#194670">for</span><span class="token plain"> bucket</span><span class="token punctuation" style="color:#475569">,</span><span class="token plain"> records </span><span class="token keyword" style="color:#194670">in</span><span class="token plain"> scan_records</span><span class="token punctuation" style="color:#475569">.</span><span class="token plain">items</span><span class="token punctuation" style="color:#475569">(</span><span class="token punctuation" style="color:#475569">)</span><span class="token punctuation" style="color:#475569">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"> </span><span class="token keyword" style="color:#194670">for</span><span class="token plain"> record </span><span class="token keyword" style="color:#194670">in</span><span class="token plain"> records</span><span class="token punctuation" style="color:#475569">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"> </span><span class="token keyword" style="color:#194670">print</span><span class="token punctuation" style="color:#475569">(</span><span class="token string-interpolation string" style="color:#0E7C66">f"bucket=</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">{</span><span class="token string-interpolation interpolation">bucket</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">.</span><span class="token string-interpolation interpolation">bucket_id</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">}</span><span class="token string-interpolation string" style="color:#0E7C66">, offset=</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">{</span><span class="token string-interpolation interpolation">record</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">.</span><span class="token string-interpolation interpolation">offset</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">}</span><span class="token string-interpolation string" style="color:#0E7C66">, row=</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">{</span><span class="token string-interpolation interpolation">record</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">.</span><span class="token string-interpolation interpolation">row</span><span class="token string-interpolation interpolation punctuation" style="color:#475569">}</span><span class="token string-interpolation string" style="color:#0E7C66">"</span><span class="token punctuation" style="color:#475569">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"></span><span class="token comment" style="color:#64748B;font-style:italic"># Flat iteration</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"></span><span class="token keyword" style="color:#194670">for</span><span class="token plain"> record </span><span class="token keyword" style="color:#194670">in</span><span class="token plain"> scan_records</span><span class="token punctuation" style="color:#475569">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#0A0F1C"><span class="token plain"> </span><span class="token keyword" style="color:#194670">print</span><span class="token punctuation" style="color:#475569">(</span><span class="token plain">record</span><span class="token punctuation" style="color:#475569">.</span><span class="token plain">row</span><span class="token punctuation" style="color:#475569">)</span><br></div></code></pre></div></div> | |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="methods">Methods<a href="#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods" translate="no"></a></h3> | |
| <table><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>.buckets() -> list[TableBucket]</code></td><td>List of distinct buckets</td></tr><tr><td><code>.records(bucket) -> list[ScanRecord]</code></td><td>Records for a specific bucket (empty list if bucket not present)</td></tr><tr><td><code>.count() -> int</code></td><td>Total record count across all buckets</td></tr><tr><td><code>.is_empty() -> bool</code></td><td>Check if empty</td></tr></tbody></table> | |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="indexing">Indexing<a href="#indexing" class="hash-link" aria-label="Direct link to Indexing" title="Direct link to Indexing" translate="no"></a></h3> | |
| <table><thead><tr><th>Expression</th><th>Returns</th><th>Description</th></tr></thead><tbody><tr><td><code>scan_records[0]</code></td><td><code>ScanRecord</code></td><td>Record by flat index</td></tr><tr><td><code>scan_records[-1]</code></td><td><code>ScanRecord</code></td><td>Negative indexing</td></tr><tr><td><code>scan_records[1:5]</code></td><td><code>list[ScanRecord]</code></td><td>Slice</td></tr><tr><td><code>scan_records[bucket]</code></td><td><code>list[ScanRecord]</code></td><td>Records for a bucket</td></tr></tbody></table> | |
| <h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="mapping-protocol">Mapping Protocol<a href="#mapping-protocol" class="hash-link" aria-label="Direct link to Mapping Protocol" title="Direct link to Mapping Protocol" translate="no"></a></h3> | |
| <table><thead><tr><th>Method / Protocol</th><th>Description</th></tr></thead><tbody><tr><td><code>.keys()</code></td><td>Same as <code>.buckets()</code></td></tr><tr><td><code>.values()</code></td><td>Lazy iterator over record lists, one per bucket</td></tr><tr><td><code>.items()</code></td><td>Lazy iterator over <code>(bucket, records)</code> pairs</td></tr><tr><td><code>len(scan_records)</code></td><td>Same as <code>.count()</code></td></tr><tr><td><code>bucket in scan_records</code></td><td>Membership test</td></tr><tr><td><code>for record in scan_records</code></td><td>Flat iteration over all records</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="scanrecord"><code>ScanRecord</code><a href="#scanrecord" class="hash-link" aria-label="Direct link to scanrecord" title="Direct link to scanrecord" translate="no"></a></h2> | |
| <table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>.offset -> int</code></td><td>Record offset in the log</td></tr><tr><td><code>.timestamp -> int</code></td><td>Record timestamp</td></tr><tr><td><code>.change_type -> ChangeType</code></td><td>Change type (AppendOnly, Insert, UpdateBefore, UpdateAfter, Delete)</td></tr><tr><td><code>.row -> dict</code></td><td>Row data as <code>{column_name: value}</code></td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="recordbatch"><code>RecordBatch</code><a href="#recordbatch" class="hash-link" aria-label="Direct link to recordbatch" title="Direct link to recordbatch" translate="no"></a></h2> | |
| <table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>.batch -> pa.RecordBatch</code></td><td>Arrow RecordBatch data</td></tr><tr><td><code>.bucket -> TableBucket</code></td><td>Bucket this batch belongs to</td></tr><tr><td><code>.base_offset -> int</code></td><td>First record offset</td></tr><tr><td><code>.last_offset -> int</code></td><td>Last record offset</td></tr></tbody></table> | |
| <h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="schema"><code>Schema</code><a href="#schema" class="hash-link" aria-label="Direct link to schema" title="Direct link to schema" translate="no"> |