blob: 4743520f8b9db209b8f94b94e0593f2ce53b34a7 [file] [log] [blame]
<!doctype html>
<html class="docs-version-0.14.1" lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.14">
<link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Apache Hudi: User-Facing Analytics RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Apache Hudi: User-Facing Analytics Atom Feed">
<link rel="alternate" type="application/json" href="/blog/feed.json" title="Apache Hudi: User-Facing Analytics JSON Feed">
<link rel="search" type="application/opensearchdescription+xml" title="Apache Hudi" href="/opensearch.xml">
<link rel="alternate" type="application/rss+xml" href="/videos/rss.xml" title="Apache Hudi RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/videos/atom.xml" title="Apache Hudi Atom Feed">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Comfortaa|Ubuntu|Roboto|Source+Code+Pro">
<link rel="stylesheet" href="https://at-ui.github.io/feather-font/css/iconfont.css"><title data-react-helmet="true">Procedures | Apache Hudi</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://hudi.apache.org/docs/procedures"><meta data-react-helmet="true" name="docsearch:language" content="en"><meta data-react-helmet="true" name="docsearch:version" content="0.14.1"><meta data-react-helmet="true" name="docsearch:docusaurus_tag" content="docs-default-0.14.1"><meta data-react-helmet="true" name="keywords" content="apache hudi, data lake, lakehouse, big data, apache spark, apache flink, presto, trino, analytics, data engineering"><meta data-react-helmet="true" property="og:title" content="Procedures | Apache Hudi"><meta data-react-helmet="true" name="description" content="Stored procedures available when use Hudi SparkSQL extensions in all spark&#x27;s version."><meta data-react-helmet="true" property="og:description" content="Stored procedures available when use Hudi SparkSQL extensions in all spark&#x27;s version."><link data-react-helmet="true" rel="icon" href="/assets/images/favicon.ico"><link data-react-helmet="true" rel="canonical" href="https://hudi.apache.org/docs/procedures"><link data-react-helmet="true" rel="alternate" href="https://hudi.apache.org/docs/procedures" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://hudi.apache.org/cn/docs/procedures" hreflang="cn"><link data-react-helmet="true" rel="alternate" href="https://hudi.apache.org/docs/procedures" hreflang="x-default"><link data-react-helmet="true" rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.052701b1.css">
<link rel="preload" href="/assets/js/runtime~main.46626068.js" as="script">
<link rel="preload" href="/assets/js/main.19b28340.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id="__docusaurus">
<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><div class="announcementBar_axC9" role="banner"><div class="announcementBarContent_6uhP">⭐️ If you like <b>Apache Hudi</b>, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/apache/hudi"><b>GitHub!<svg xmlns="http://www.w3.org/2000/svg\" width="16" height="16" fill="currentColor" class="bi bi-github" viewBox="0 -2 16 16"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg></b></a></div></div><nav class="navbar navbar--fixed-top navbarWrapper_UIa0"><div class="navbar__inner navbarInnerStyle_FVs7"><img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=8f594acf-9b77-44fb-9475-3e82ead1910c" width="0" height="0" alt=""><img referrerpolicy="no-referrer-when-downgrade" src="https://analytics.apache.org/matomo.php?idsite=47&amp;rec=1" width="0" height="0" alt=""><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><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 navbarLogo_Bz6n"><img src="/assets/images/hudi.png" alt="Apache Hudi" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/assets/images/hudi.png" alt="Apache Hudi" class="themedImage_TMUO themedImage--dark_uzRr"></div></a><a class="navbar__item navbar__link navbarFontSize_x1wi" href="/docs/overview"><div class="labelWrapperDropdown_Mqbj">Docs</div></a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" class="navbar__link downloadLinkDropdownHide_aDP3 navbarFontSize_x1wi"><div class="labelWrapperDropdown_Mqbj">Learn<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.25 5 4.75l-3.5-3.5" stroke="#1C1E21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div></a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/talks"><div class="labelWrapperDropdown_Mqbj">Talks</div></a></li><li><a class="dropdown__link" href="/videos"><div class="labelWrapperDropdown_Mqbj">Video Guides</div></a></li><li><a class="dropdown__link" href="/docs/faq"><div class="labelWrapperDropdown_Mqbj">FAQ</div></a></li><li><a class="dropdown__link" href="/tech-specs"><div class="labelWrapperDropdown_Mqbj">Tech Specs</div></a></li><li><a class="dropdown__link" href="/tech-specs-1point0"><div class="labelWrapperDropdown_Mqbj">Tech Specs 1.0</div></a></li><li><a href="https://cwiki.apache.org/confluence/display/HUDI" target="_blank" rel="noopener noreferrer" class="dropdown__link"><span class="externalLink_AE3f">Technical Wiki<svg width="20" height="20" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.965 8.745 9.01 16.7M10.561 8.758l6.403-.013-.013 6.403" stroke="#0DB1F9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><rect x="4.5" y="4.5" width="17" height="17" rx="2.5" stroke="#0DB1F9"></rect></svg></span></a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="#" class="navbar__link downloadLinkDropdownHide_aDP3 navbarFontSize_x1wi"><div class="labelWrapperDropdown_Mqbj">Contribute<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.25 5 4.75l-3.5-3.5" stroke="#1C1E21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div></a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/contribute/how-to-contribute"><div class="labelWrapperDropdown_Mqbj">How to Contribute</div></a></li><li><a class="dropdown__link" href="/contribute/developer-setup"><div class="labelWrapperDropdown_Mqbj">Developer Setup</div></a></li><li><a class="dropdown__link" href="/contribute/rfc-process"><div class="labelWrapperDropdown_Mqbj">RFC Process</div></a></li><li><a class="dropdown__link" href="/contribute/report-security-issues"><div class="labelWrapperDropdown_Mqbj">Report Security Issues</div></a></li><li><a href="https://issues.apache.org/jira/projects/HUDI/summary" target="_blank" rel="noopener noreferrer" class="dropdown__link"><span class="externalLink_AE3f">Report Issues<svg width="20" height="20" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.965 8.745 9.01 16.7M10.561 8.758l6.403-.013-.013 6.403" stroke="#0DB1F9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><rect x="4.5" y="4.5" width="17" height="17" rx="2.5" stroke="#0DB1F9"></rect></svg></span></a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="#" class="navbar__link downloadLinkDropdownHide_aDP3 navbarFontSize_x1wi"><div class="labelWrapperDropdown_Mqbj">Community<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.25 5 4.75l-3.5-3.5" stroke="#1C1E21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div></a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/community/get-involved"><div class="labelWrapperDropdown_Mqbj">Get Involved</div></a></li><li><a class="dropdown__link" href="/community/syncs"><div class="labelWrapperDropdown_Mqbj">Community Syncs</div></a></li><li><a class="dropdown__link" href="/community/office_hours"><div class="labelWrapperDropdown_Mqbj">Office Hours</div></a></li><li><a class="dropdown__link" href="/community/team"><div class="labelWrapperDropdown_Mqbj">Team</div></a></li></ul></div><a class="navbar__item navbar__link navbarFontSize_x1wi" href="/blog"><div class="labelWrapperDropdown_Mqbj">Blog</div></a><a class="navbar__item navbar__link navbarFontSize_x1wi" href="/powered-by"><div class="labelWrapperDropdown_Mqbj">Who&#x27;s Using</div></a><a class="navbar__item navbar__link navbarFontSize_x1wi" href="/roadmap"><div class="labelWrapperDropdown_Mqbj">Roadmap</div></a><a class="navbar__item navbar__link navbarFontSize_x1wi" href="/releases/download"><div class="labelWrapperDropdown_Mqbj">Download</div></a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link downloadLinkDropdownHide_aDP3" href="/docs/overview"><div class="labelWrapperDropdown_Mqbj">0.14.1<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.25 5 4.75l-3.5-3.5" stroke="#1C1E21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div></a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/next/procedures"><div class="labelWrapperDropdown_Mqbj">Current</div></a></li><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/procedures"><div class="labelWrapperDropdown_Mqbj">0.14.1</div></a></li><li><a class="dropdown__link" href="/docs/0.14.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.14.0</div></a></li><li><a class="dropdown__link" href="/docs/0.13.1/procedures"><div class="labelWrapperDropdown_Mqbj">0.13.1</div></a></li><li><a class="dropdown__link" href="/docs/0.13.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.13.0</div></a></li><li><a class="dropdown__link" href="/docs/0.12.3/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.3</div></a></li><li><a class="dropdown__link" href="/docs/0.12.2/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.2</div></a></li><li><a class="dropdown__link" href="/docs/0.12.1/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.1</div></a></li><li><a class="dropdown__link" href="/docs/0.12.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.0</div></a></li><li><a class="dropdown__link" href="/docs/0.11.1/procedures"><div class="labelWrapperDropdown_Mqbj">0.11.1</div></a></li><li><a class="dropdown__link" href="/docs/0.11.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.11.0</div></a></li><li><a class="dropdown__link" href="/docs/0.10.1/overview"><div class="labelWrapperDropdown_Mqbj">0.10.1</div></a></li><li><a class="dropdown__link" href="/docs/0.10.0/overview"><div class="labelWrapperDropdown_Mqbj">0.10.0</div></a></li><li><a class="dropdown__link" href="/docs/0.9.0/overview"><div class="labelWrapperDropdown_Mqbj">0.9.0</div></a></li><li><a class="dropdown__link" href="/docs/0.8.0/overview"><div class="labelWrapperDropdown_Mqbj">0.8.0</div></a></li><li><a class="dropdown__link" href="/docs/0.7.0/overview"><div class="labelWrapperDropdown_Mqbj">0.7.0</div></a></li><li><a class="dropdown__link" href="/docs/0.6.0/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.6.0</div></a></li><li><a class="dropdown__link" href="/docs/0.5.3/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.3</div></a></li><li><a class="dropdown__link" href="/docs/0.5.2/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.2</div></a></li><li><a class="dropdown__link" href="/docs/0.5.1/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.1</div></a></li><li><a class="dropdown__link" href="/docs/0.5.0/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.0</div></a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" class="navbar__link downloadLinkDropdownHide_aDP3"><div class="labelWrapperDropdown_Mqbj"><span><svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true" class="iconLanguage_zID8"><path fill="currentColor" d="M19.753 10.909c-.624-1.707-2.366-2.726-4.661-2.726-.09 0-.176.002-.262.006l-.016-2.063 3.525-.607c.115-.019.133-.119.109-.231-.023-.111-.167-.883-.188-.976-.027-.131-.102-.127-.207-.109-.104.018-3.25.461-3.25.461l-.013-2.078c-.001-.125-.069-.158-.194-.156l-1.025.016c-.105.002-.164.049-.162.148l.033 2.307s-3.061.527-3.144.543c-.084.014-.17.053-.151.143.019.09.19 1.094.208 1.172.018.08.072.129.188.107l2.924-.504.035 2.018c-1.077.281-1.801.824-2.256 1.303-.768.807-1.207 1.887-1.207 2.963 0 1.586.971 2.529 2.328 2.695 3.162.387 5.119-3.06 5.769-4.715 1.097 1.506.256 4.354-2.094 5.98-.043.029-.098.129-.033.207l.619.756c.08.096.206.059.256.023 2.51-1.73 3.661-4.515 2.869-6.683zm-7.386 3.188c-.966-.121-.944-.914-.944-1.453 0-.773.327-1.58.876-2.156a3.21 3.21 0 011.229-.799l.082 4.277a2.773 2.773 0 01-1.243.131zm2.427-.553l.046-4.109c.084-.004.166-.01.252-.01.773 0 1.494.145 1.885.361.391.217-1.023 2.713-2.183 3.758zm-8.95-7.668a.196.196 0 00-.196-.145h-1.95a.194.194 0 00-.194.144L.008 16.916c-.017.051-.011.076.062.076h1.733c.075 0 .099-.023.114-.072l1.008-3.318h3.496l1.008 3.318c.016.049.039.072.113.072h1.734c.072 0 .078-.025.062-.076-.014-.05-3.083-9.741-3.494-11.04zm-2.618 6.318l1.447-5.25 1.447 5.25H3.226z"></path></svg><span>English</span></span><svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M14 6.457a6.842 6.842 0 0 0-7-6.02 6.843 6.843 0 0 0-7 6.02v1.085a6.843 6.843 0 0 0 7 6.02 6.843 6.843 0 0 0 7-6.02V6.457Zm-1.094 0h-2.625a9.92 9.92 0 0 0-.376-2.222 6.65 6.65 0 0 0 1.531-.875 5.25 5.25 0 0 1 1.444 3.097h.026Zm-8.032 0a8.479 8.479 0 0 1 .324-1.872 7.376 7.376 0 0 0 3.63 0c.175.61.284 1.239.325 1.872h-4.28Zm4.305 1.085a8.391 8.391 0 0 1-.324 1.873 7.464 7.464 0 0 0-3.658 0 8.479 8.479 0 0 1-.323-1.873h4.305Zm.35-4.375A10.342 10.342 0 0 0 8.75 1.75c.627.194 1.218.49 1.75.875a5.748 5.748 0 0 1-.998.577l.027-.035ZM7.254 1.54A8.75 8.75 0 0 1 8.46 3.552c-.48.11-.97.165-1.461.167-.492-.001-.982-.057-1.461-.167.308-.722.715-1.4 1.207-2.012h.508ZM4.498 3.202a5.748 5.748 0 0 1-.998-.577 6.029 6.029 0 0 1 1.75-.875c-.294.46-.546.947-.753 1.452Zm-1.873.15c.47.358.984.652 1.531.874A9.625 9.625 0 0 0 3.78 6.45H1.155a5.25 5.25 0 0 1 1.47-3.098ZM1.12 7.541h2.625c.038.753.164 1.5.376 2.223a6.649 6.649 0 0 0-1.531.875 5.25 5.25 0 0 1-1.47-3.098Zm3.377 3.255c.207.506.459.992.753 1.453a6.03 6.03 0 0 1-1.75-.875c.312-.226.646-.419.997-.578Zm2.25 1.663a8.594 8.594 0 0 1-1.208-2.013 6.501 6.501 0 0 1 2.922 0 8.54 8.54 0 0 1-1.207 2.013h-.508Zm2.755-1.663c.367.156.716.35 1.042.578a6.338 6.338 0 0 1-1.75.875c.275-.464.512-.95.708-1.453Zm1.873-.148a6.647 6.647 0 0 0-1.531-.875 9.45 9.45 0 0 0 .376-2.223h2.625a5.25 5.25 0 0 1-1.47 3.098Z" fill="#1C1E21"></path></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h14v14H0z"></path></clipPath></defs></svg></div></a><ul class="dropdown__menu"><li><a href="/docs/procedures" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active"><div class="labelWrapperDropdown_Mqbj">English</div></a></li><li><a href="/cn/docs/procedures" target="_self" rel="noopener noreferrer" class="dropdown__link"><div class="labelWrapperDropdown_Mqbj">Chinese</div></a></li></ul></div><a href="https://github.com/apache/hudi" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-github-link" aria-label="GitHub repository"><div class="labelWrapperDropdown_Mqbj"></div></a><a href="https://twitter.com/ApacheHudi" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-twitter-link" aria-label="Hudi Twitter Handle"><div class="labelWrapperDropdown_Mqbj"></div></a><a href="https://join.slack.com/t/apache-hudi/shared_invite/zt-2ggm1fub8-_yt4Reu9djwqqVRFC7X49g" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-slack-link" aria-label="Hudi Slack Channel"><div class="labelWrapperDropdown_Mqbj"></div></a><a href="https://www.youtube.com/channel/UCs7AhE0BWaEPZSChrBR-Muw" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-youtube-link" aria-label="Hudi YouTube Channel"><div class="labelWrapperDropdown_Mqbj"></div></a><a href="https://www.linkedin.com/company/apache-hudi/?viewAsMember=true" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-linkedin-link" aria-label="Hudi Linkedin Page"><div class="labelWrapperDropdown_Mqbj"></div></a><div class="searchBox_fBfG"><div role="button" class="searchButton_g9-U" aria-label="Search"><span class="searchText_RI6l">Search</span><svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="6.864" cy="6.864" r="5.243" stroke="#1C1E21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></circle><path d="m10.51 10.783 2.056 2.05" stroke="#1C1E21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/assets/images/hudi.png" alt="Apache Hudi" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/assets/images/hudi.png" alt="Apache Hudi" class="themedImage_TMUO themedImage--dark_uzRr"></div></a><button type="button" class="clean-btn navbar-sidebar__close"><svg viewBox="0 0 15 15" width="21" height="21"><g stroke="var(--ifm-color-emphasis-600)" stroke-width="1.2"><path d="M.75.75l13.5 13.5M14.25.75L.75 14.25"></path></g></svg></button></div><div class="navbar-sidebar__items"><div class="navbar-sidebar__item menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/overview"><div class="labelWrapperDropdown_Mqbj">Docs</div></a></li><li class="menu__list-item menu__list-item--collapsed"><a role="button" class="menu__link menu__link--sublist"><div class="labelWrapperDropdown_Mqbj">Learn</div></a></li><li class="menu__list-item menu__list-item--collapsed"><a role="button" class="menu__link menu__link--sublist"><div class="labelWrapperDropdown_Mqbj">Contribute</div></a></li><li class="menu__list-item menu__list-item--collapsed"><a role="button" class="menu__link menu__link--sublist"><div class="labelWrapperDropdown_Mqbj">Community</div></a></li><li class="menu__list-item"><a class="menu__link" href="/blog"><div class="labelWrapperDropdown_Mqbj">Blog</div></a></li><li class="menu__list-item"><a class="menu__link" href="/powered-by"><div class="labelWrapperDropdown_Mqbj">Who&#x27;s Using</div></a></li><li class="menu__list-item"><a class="menu__link" href="/roadmap"><div class="labelWrapperDropdown_Mqbj">Roadmap</div></a></li><li class="menu__list-item"><a class="menu__link" href="/releases/download"><div class="labelWrapperDropdown_Mqbj">Download</div></a></li><li class="menu__list-item"><a role="button" class="menu__link menu__link--sublist"><div class="labelWrapperDropdown_Mqbj">Versions</div></a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/next/procedures"><div class="labelWrapperDropdown_Mqbj">Current</div></a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active" href="/docs/procedures"><div class="labelWrapperDropdown_Mqbj">0.14.1</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.14.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.14.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.13.1/procedures"><div class="labelWrapperDropdown_Mqbj">0.13.1</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.13.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.13.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.12.3/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.3</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.12.2/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.2</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.12.1/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.1</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.12.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.12.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.11.1/procedures"><div class="labelWrapperDropdown_Mqbj">0.11.1</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.11.0/procedures"><div class="labelWrapperDropdown_Mqbj">0.11.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.10.1/overview"><div class="labelWrapperDropdown_Mqbj">0.10.1</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.10.0/overview"><div class="labelWrapperDropdown_Mqbj">0.10.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.9.0/overview"><div class="labelWrapperDropdown_Mqbj">0.9.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.8.0/overview"><div class="labelWrapperDropdown_Mqbj">0.8.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.7.0/overview"><div class="labelWrapperDropdown_Mqbj">0.7.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.6.0/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.6.0</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.5.3/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.3</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.5.2/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.2</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.5.1/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.1</div></a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.5.0/quick-start-guide"><div class="labelWrapperDropdown_Mqbj">0.5.0</div></a></li></ul></li><li class="menu__list-item menu__list-item--collapsed"><a role="button" class="menu__link menu__link--sublist"><div class="labelWrapperDropdown_Mqbj"><span><svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true" class="iconLanguage_zID8"><path fill="currentColor" d="M19.753 10.909c-.624-1.707-2.366-2.726-4.661-2.726-.09 0-.176.002-.262.006l-.016-2.063 3.525-.607c.115-.019.133-.119.109-.231-.023-.111-.167-.883-.188-.976-.027-.131-.102-.127-.207-.109-.104.018-3.25.461-3.25.461l-.013-2.078c-.001-.125-.069-.158-.194-.156l-1.025.016c-.105.002-.164.049-.162.148l.033 2.307s-3.061.527-3.144.543c-.084.014-.17.053-.151.143.019.09.19 1.094.208 1.172.018.08.072.129.188.107l2.924-.504.035 2.018c-1.077.281-1.801.824-2.256 1.303-.768.807-1.207 1.887-1.207 2.963 0 1.586.971 2.529 2.328 2.695 3.162.387 5.119-3.06 5.769-4.715 1.097 1.506.256 4.354-2.094 5.98-.043.029-.098.129-.033.207l.619.756c.08.096.206.059.256.023 2.51-1.73 3.661-4.515 2.869-6.683zm-7.386 3.188c-.966-.121-.944-.914-.944-1.453 0-.773.327-1.58.876-2.156a3.21 3.21 0 011.229-.799l.082 4.277a2.773 2.773 0 01-1.243.131zm2.427-.553l.046-4.109c.084-.004.166-.01.252-.01.773 0 1.494.145 1.885.361.391.217-1.023 2.713-2.183 3.758zm-8.95-7.668a.196.196 0 00-.196-.145h-1.95a.194.194 0 00-.194.144L.008 16.916c-.017.051-.011.076.062.076h1.733c.075 0 .099-.023.114-.072l1.008-3.318h3.496l1.008 3.318c.016.049.039.072.113.072h1.734c.072 0 .078-.025.062-.076-.014-.05-3.083-9.741-3.494-11.04zm-2.618 6.318l1.447-5.25 1.447 5.25H3.226z"></path></svg><span>Languages</span></span></div></a></li><li class="menu__list-item"><a href="https://github.com/apache/hudi" target="_blank" rel="noopener noreferrer" class="menu__link header-github-link" aria-label="GitHub repository"><div class="labelWrapperDropdown_Mqbj"></div></a></li><li class="menu__list-item"><a href="https://twitter.com/ApacheHudi" target="_blank" rel="noopener noreferrer" class="menu__link header-twitter-link" aria-label="Hudi Twitter Handle"><div class="labelWrapperDropdown_Mqbj"></div></a></li><li class="menu__list-item"><a href="https://join.slack.com/t/apache-hudi/shared_invite/zt-2ggm1fub8-_yt4Reu9djwqqVRFC7X49g" target="_blank" rel="noopener noreferrer" class="menu__link header-slack-link" aria-label="Hudi Slack Channel"><div class="labelWrapperDropdown_Mqbj"></div></a></li><li class="menu__list-item"><a href="https://www.youtube.com/channel/UCs7AhE0BWaEPZSChrBR-Muw" target="_blank" rel="noopener noreferrer" class="menu__link header-youtube-link" aria-label="Hudi YouTube Channel"><div class="labelWrapperDropdown_Mqbj"></div></a></li><li class="menu__list-item"><a href="https://www.linkedin.com/company/apache-hudi/?viewAsMember=true" target="_blank" rel="noopener noreferrer" class="menu__link header-linkedin-link" aria-label="Hudi Linkedin Page"><div class="labelWrapperDropdown_Mqbj"></div></a></li></ul></div><div class="navbar-sidebar__item menu"><button type="button" class="clean-btn navbar-sidebar__back">← Back to main menu</button></div></div></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_GMj9"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_k0Pq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh menuWithAnnouncementBar_+O1J"><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/overview">Overview</a></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="menu__link menu__link--sublist hasHref_TwRn" href="/docs/quick-start-guide">Quick Start</a></div><ul style="display:block;overflow:visible;height:auto" 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/quick-start-guide">Spark Guide</a></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/flink-quick-start-guide">Flink Guide</a></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/docker_demo">Docker Demo</a></li></ul></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="menu__link menu__link--sublist hasHref_TwRn" href="/docs/timeline">Concepts</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="menu__link menu__link--sublist menu__link--active hasHref_TwRn" href="/docs/sql_ddl">How To</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><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="menu__link menu__link--sublist menu__link--active hasHref_TwRn" tabindex="0" href="/docs/sql_ddl">SQL</a></div><ul style="display:block;overflow:visible;height:auto" 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/sql_ddl">SQL DDL</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/sql_dml">SQL DML</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/sql_queries">SQL Queries</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/procedures">Procedures</a></li></ul></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/writing_data">Writing Data</a></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/hoodie_streaming_ingestion">Streaming Ingestion</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="menu__link menu__link--sublist hasHref_TwRn" tabindex="0" href="/docs/syncing_aws_glue_data_catalog">Syncing to Catalogs</a></div></li></ul></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="menu__link menu__link--sublist hasHref_TwRn" href="/docs/migration_guide">Services</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="menu__link menu__link--sublist hasHref_TwRn" href="/docs/basic_configurations">Configurations</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="menu__link menu__link--sublist hasHref_TwRn" href="/docs/performance">Guides</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="menu__link menu__link--sublist hasHref_TwRn" href="/docs/faq">Frequently Asked Questions(FAQs)</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/use_cases">Use Cases</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">Overview</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/privacy">Privacy Policy</a></li></ul></nav></div></aside><main class="docMainContainer_Q970"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><span class="theme-doc-version-badge badge badge--secondary">Version: <!-- -->0.14.1</span><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Procedures</h1></header><p>Stored procedures available when use Hudi SparkSQL extensions in all spark&#x27;s version.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="usage">Usage<a class="hash-link" href="#usage" title="Direct link to heading"></a></h2><p>CALL supports passing arguments by name (recommended) or by position. Mixing position and named arguments is also supported.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="named-arguments">Named arguments<a class="hash-link" href="#named-arguments" title="Direct link to heading"></a></h4><p>All procedure arguments are named. When passing arguments by name, arguments can be in any order and any optional argument can be omitted.</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">CALL system.procedure_name(arg_name_2 =&gt; arg_2, arg_name_1 =&gt; arg_1, ... arg_name_n =&gt; arg_n);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="positional-arguments">Positional arguments<a class="hash-link" href="#positional-arguments" title="Direct link to heading"></a></h4><p>When passing arguments by position, the arguments may be omitted if they are optional.</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">CALL system.procedure_name(arg_1, arg_2, ... arg_n);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p><em>note:</em> The system here has no practical meaning, the complete procedure name is system.procedure_name.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="help-procedure">Help Procedure<a class="hash-link" href="#help-procedure" title="Direct link to heading"></a></h3><p>Show parameters and outputTypes of a procedure.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>cmd</td><td>String</td><td>N</td><td>None</td><td>name of a procedure</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong>x</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call help(cmd =&gt; &#x27;show_commits&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>result</th></tr></thead><tbody><tr><td>parameters: <br>param type_name default_value required <br>table string None true <br>limit integer 10 false <br>outputType: <br>name type_name nullable metadata <br>commit_time string true {} <br>action string true {} <br>total_bytes_written long true {} <br>total_files_added long true {} <br>total_files_updated long true {} <br>total_partitions_written long true {} <br>total_records_written long true {} <br>total_update_records_written long true {} <br>total_errors long true {}</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_y2LR" id="commit-management">Commit management<a class="hash-link" href="#commit-management" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_commits">show_commits<a class="hash-link" href="#show_commits" title="Direct link to heading"></a></h3><p>Show commits&#x27; info.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>commit_time</td><td>String</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr><tr><td>total_files_added</td><td>Long</td></tr><tr><td>total_files_updated</td><td>Long</td></tr><tr><td>total_partitions_written</td><td>Long</td></tr><tr><td>total_records_written</td><td>Long</td></tr><tr><td>total_update_records_written</td><td>Long</td></tr><tr><td>total_errors</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_commits(table =&gt; &#x27;test_hudi_table&#x27;, limit =&gt; 10);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>total_bytes_written</th><th>total_files_added</th><th>total_files_updated</th><th>total_partitions_written</th><th>total_records_written</th><th>total_update_records_written</th><th>total_errors</th></tr></thead><tbody><tr><td>20220216171049652</td><td>432653</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td></tr><tr><td>20220216171027021</td><td>435346</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr><tr><td>20220216171019361</td><td>435349</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_commits_metadata">show_commits_metadata<a class="hash-link" href="#show_commits_metadata" title="Direct link to heading"></a></h3><p>Show commits&#x27; metadata.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>commit_time</td><td>String</td></tr><tr><td>action</td><td>String</td></tr><tr><td>partition</td><td>String</td></tr><tr><td>file_id</td><td>String</td></tr><tr><td>previous_commit</td><td>String</td></tr><tr><td>num_writes</td><td>Long</td></tr><tr><td>num_inserts</td><td>Long</td></tr><tr><td>num_deletes</td><td>Long</td></tr><tr><td>num_update_writes</td><td>String</td></tr><tr><td>total_errors</td><td>Long</td></tr><tr><td>total_log_blocks</td><td>Long</td></tr><tr><td>total_corrupt_logblocks</td><td>Long</td></tr><tr><td>total_rollback_blocks</td><td>Long</td></tr><tr><td>total_log_records</td><td>Long</td></tr><tr><td>total_updated_records_compacted</td><td>Long</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_commits_metadata(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>action</th><th>partition</th><th>file_id</th><th>previous_commit</th><th>num_writes</th><th>num_inserts</th><th>num_deletes</th><th>num_update_writes</th><th>total_errors</th><th>total_log_blocks</th><th>total_corrupt_logblocks</th><th>total_rollback_blocks</th><th>total_log_records</th><th>total_updated_records_compacted</th><th>total_bytes_written</th></tr></thead><tbody><tr><td>20220109225319449</td><td>commit</td><td>dt=2021-05-03</td><td>d0073a12-085d-4f49-83e9-402947e7e90a-0</td><td>null</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435349</td></tr><tr><td>20220109225311742</td><td>commit</td><td>dt=2021-05-02</td><td>b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0</td><td>20220109214830592</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435340</td></tr><tr><td>20220109225301429</td><td>commit</td><td>dt=2021-05-01</td><td>0d7298b3-6b55-4cff-8d7d-b0772358b78a-0</td><td>20220109214830592</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435340</td></tr><tr><td>20220109214830592</td><td>commit</td><td>dt=2021-05-01</td><td>0d7298b3-6b55-4cff-8d7d-b0772358b78a-0</td><td>20220109191631015</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>432653</td></tr><tr><td>20220109214830592</td><td>commit</td><td>dt=2021-05-02</td><td>b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0</td><td>20220109191648181</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>432653</td></tr><tr><td>20220109191648181</td><td>commit</td><td>dt=2021-05-02</td><td>b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0</td><td>null</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435341</td></tr><tr><td>20220109191631015</td><td>commit</td><td>dt=2021-05-01</td><td>0d7298b3-6b55-4cff-8d7d-b0772358b78a-0</td><td>null</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435341</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_commit_extra_metadata">show_commit_extra_metadata<a class="hash-link" href="#show_commit_extra_metadata" title="Direct link to heading"></a></h3><p>Show commits&#x27; extra metadata.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>instant_time</td><td>String</td><td>N</td><td>None</td><td>Instant time</td></tr><tr><td>metadata_key</td><td>String</td><td>N</td><td>None</td><td>Key of metadata</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>instant_time</td><td>String</td></tr><tr><td>action</td><td>String</td></tr><tr><td>metadata_key</td><td>String</td></tr><tr><td>metadata_value</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_commit_extra_metadata(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant_time</th><th>action</th><th>metadata_key</th><th>metadata_value</th></tr></thead><tbody><tr><td>20230206174349556</td><td>deltacommit</td><td>schema</td><td>{&quot;type&quot;:&quot;record&quot;,&quot;name&quot;:&quot;hudi_mor_tbl&quot;,&quot;fields&quot;:[{&quot;name&quot;:&quot;_hoodie_commit_time&quot;,&quot;type&quot;:<!-- -->[&quot;null&quot;,&quot;string&quot;]<!-- -->,&quot;doc&quot;:&quot;&quot;,&quot;default&quot;:null},{&quot;name&quot;:&quot;_hoodie_commit_seqno&quot;,&quot;type&quot;:<!-- -->[&quot;null&quot;,&quot;string&quot;]<!-- -->,&quot;doc&quot;:&quot;&quot;,&quot;default&quot;:null},{&quot;name&quot;:&quot;_hoodie_record_key&quot;,&quot;type&quot;:<!-- -->[&quot;null&quot;,&quot;string&quot;]<!-- -->,&quot;doc&quot;:&quot;&quot;,&quot;default&quot;:null},{&quot;name&quot;:&quot;_hoodie_partition_path&quot;,&quot;type&quot;:<!-- -->[&quot;null&quot;,&quot;string&quot;]<!-- -->,&quot;doc&quot;:&quot;&quot;,&quot;default&quot;:null},{&quot;name&quot;:&quot;_hoodie_file_name&quot;,&quot;type&quot;:<!-- -->[&quot;null&quot;,&quot;string&quot;]<!-- -->,&quot;doc&quot;:&quot;&quot;,&quot;default&quot;:null},{&quot;name&quot;:&quot;id&quot;,&quot;type&quot;:&quot;int&quot;},{&quot;name&quot;:&quot;ts&quot;,&quot;type&quot;:&quot;long&quot;}]}</td></tr><tr><td>20230206174349556</td><td>deltacommit</td><td>latest_schema</td><td>{&quot;max_column_id&quot;:8,&quot;version_id&quot;:20230206174349556,&quot;type&quot;:&quot;record&quot;,&quot;fields&quot;:<!-- -->[{&quot;id&quot;:0,&quot;name&quot;:&quot;_hoodie_commit_time&quot;,&quot;optional&quot;:true,&quot;type&quot;:&quot;string&quot;,&quot;doc&quot;:&quot;&quot;},{&quot;id&quot;:1,&quot;name&quot;:&quot;_hoodie_commit_seqno&quot;,&quot;optional&quot;:true,&quot;type&quot;:&quot;string&quot;,&quot;doc&quot;:&quot;&quot;},{&quot;id&quot;:2,&quot;name&quot;:&quot;_hoodie_record_key&quot;,&quot;optional&quot;:true,&quot;type&quot;:&quot;string&quot;,&quot;doc&quot;:&quot;&quot;},{&quot;id&quot;:3,&quot;name&quot;:&quot;_hoodie_partition_path&quot;,&quot;optional&quot;:true,&quot;type&quot;:&quot;string&quot;,&quot;doc&quot;:&quot;&quot;},{&quot;id&quot;:4,&quot;name&quot;:&quot;_hoodie_file_name&quot;,&quot;optional&quot;:true,&quot;type&quot;:&quot;string&quot;,&quot;doc&quot;:&quot;&quot;},{&quot;id&quot;:5,&quot;name&quot;:&quot;id&quot;,&quot;optional&quot;:false,&quot;type&quot;:&quot;int&quot;},{&quot;id&quot;:8,&quot;name&quot;:&quot;ts&quot;,&quot;optional&quot;:false,&quot;type&quot;:&quot;long&quot;}]<!-- -->}</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_archived_commits">show_archived_commits<a class="hash-link" href="#show_archived_commits" title="Direct link to heading"></a></h3><p>Show archived commits.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>start_ts</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Start time for commits, default: now - 10 days</td></tr><tr><td>end_ts</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>End time for commits, default: now - 1 day</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>commit_time</td><td>String</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr><tr><td>total_files_added</td><td>Long</td></tr><tr><td>total_files_updated</td><td>Long</td></tr><tr><td>total_partitions_written</td><td>Long</td></tr><tr><td>total_records_written</td><td>Long</td></tr><tr><td>total_update_records_written</td><td>Long</td></tr><tr><td>total_errors</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_archived_commits(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>total_bytes_written</th><th>total_files_added</th><th>total_files_updated</th><th>total_partitions_written</th><th>total_records_written</th><th>total_update_records_written</th><th>total_errors</th></tr></thead><tbody><tr><td>20220216171049652</td><td>432653</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td></tr><tr><td>20220216171027021</td><td>435346</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr><tr><td>20220216171019361</td><td>435349</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_archived_commits_metadata">show_archived_commits_metadata<a class="hash-link" href="#show_archived_commits_metadata" title="Direct link to heading"></a></h3><p>Show archived commits&#x27; metadata.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>start_ts</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Start time for commits, default: now - 10 days</td></tr><tr><td>end_ts</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>End time for commits, default: now - 1 day</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>commit_time</td><td>String</td></tr><tr><td>action</td><td>String</td></tr><tr><td>partition</td><td>String</td></tr><tr><td>file_id</td><td>String</td></tr><tr><td>previous_commit</td><td>String</td></tr><tr><td>num_writes</td><td>Long</td></tr><tr><td>num_inserts</td><td>Long</td></tr><tr><td>num_deletes</td><td>Long</td></tr><tr><td>num_update_writes</td><td>String</td></tr><tr><td>total_errors</td><td>Long</td></tr><tr><td>total_log_blocks</td><td>Long</td></tr><tr><td>total_corrupt_logblocks</td><td>Long</td></tr><tr><td>total_rollback_blocks</td><td>Long</td></tr><tr><td>total_log_records</td><td>Long</td></tr><tr><td>total_updated_records_compacted</td><td>Long</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_archived_commits_metadata(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>action</th><th>partition</th><th>file_id</th><th>previous_commit</th><th>num_writes</th><th>num_inserts</th><th>num_deletes</th><th>num_update_writes</th><th>total_errors</th><th>total_log_blocks</th><th>total_corrupt_logblocks</th><th>total_rollback_blocks</th><th>total_log_records</th><th>total_updated_records_compacted</th><th>total_bytes_written</th></tr></thead><tbody><tr><td>20220109225319449</td><td>commit</td><td>dt=2021-05-03</td><td>d0073a12-085d-4f49-83e9-402947e7e90a-0</td><td>null</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435349</td></tr><tr><td>20220109225311742</td><td>commit</td><td>dt=2021-05-02</td><td>b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0</td><td>20220109214830592</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435340</td></tr><tr><td>20220109225301429</td><td>commit</td><td>dt=2021-05-01</td><td>0d7298b3-6b55-4cff-8d7d-b0772358b78a-0</td><td>20220109214830592</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435340</td></tr><tr><td>20220109214830592</td><td>commit</td><td>dt=2021-05-01</td><td>0d7298b3-6b55-4cff-8d7d-b0772358b78a-0</td><td>20220109191631015</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>432653</td></tr><tr><td>20220109214830592</td><td>commit</td><td>dt=2021-05-02</td><td>b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0</td><td>20220109191648181</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>432653</td></tr><tr><td>20220109191648181</td><td>commit</td><td>dt=2021-05-02</td><td>b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0</td><td>null</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435341</td></tr><tr><td>20220109191631015</td><td>commit</td><td>dt=2021-05-01</td><td>0d7298b3-6b55-4cff-8d7d-b0772358b78a-0</td><td>null</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>435341</td></tr></tbody></table><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_archived_commits(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>total_bytes_written</th><th>total_files_added</th><th>total_files_updated</th><th>total_partitions_written</th><th>total_records_written</th><th>total_update_records_written</th><th>total_errors</th></tr></thead><tbody><tr><td>20220216171049652</td><td>432653</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td></tr><tr><td>20220216171027021</td><td>435346</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr><tr><td>20220216171019361</td><td>435349</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_commit_files">show_commit_files<a class="hash-link" href="#show_commit_files" title="Direct link to heading"></a></h3><p>Show files of a commit.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant time</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>action</td><td>String</td></tr><tr><td>partition_path</td><td>String</td></tr><tr><td>file_id</td><td>String</td></tr><tr><td>previous_commit</td><td>String</td></tr><tr><td>total_records_updated</td><td>Long</td></tr><tr><td>total_records_written</td><td>Long</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr><tr><td>total_errors</td><td>Long</td></tr><tr><td>file_size</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_commit_files(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20230206174349556&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>action</th><th>partition_path</th><th>file_id</th><th>previous_commit</th><th>total_records_updated</th><th>total_records_written</th><th>total_bytes_written</th><th>total_errors</th><th>file_size</th></tr></thead><tbody><tr><td>deltacommit</td><td>dt=2021-05-03</td><td>7fb52523-c7f6-41aa-84a6-629041477aeb-0</td><td>null</td><td>0</td><td>1</td><td>434768</td><td>0</td><td>434768</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_commit_partitions">show_commit_partitions<a class="hash-link" href="#show_commit_partitions" title="Direct link to heading"></a></h3><p>Show partitions of a commit.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant time</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>action</td><td>String</td></tr><tr><td>partition_path</td><td>String</td></tr><tr><td>total_files_added</td><td>Long</td></tr><tr><td>total_files_updated</td><td>Long</td></tr><tr><td>total_records_inserted</td><td>Long</td></tr><tr><td>total_records_updated</td><td>Long</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr><tr><td>total_errors</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_commit_partitions(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20230206174349556&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>action</th><th>partition_path</th><th>total_files_added</th><th>total_files_updated</th><th>total_records_inserted</th><th>total_records_updated</th><th>total_bytes_written</th><th>total_errors</th></tr></thead><tbody><tr><td>deltacommit</td><td>dt=2021-05-03</td><td>7fb52523-c7f6-41aa-84a6-629041477aeb-0</td><td>0</td><td>1</td><td>434768</td><td>0</td><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_commit_write_stats">show_commit_write_stats<a class="hash-link" href="#show_commit_write_stats" title="Direct link to heading"></a></h3><p>Show write statistics of a commit.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant time</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>action</td><td>String</td></tr><tr><td>total_bytes_written</td><td>Long</td></tr><tr><td>total_records_written</td><td>Long</td></tr><tr><td>avg_record_size</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_commit_write_stats(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20230206174349556&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>action</th><th>total_bytes_written</th><th>total_records_written</th><th>avg_record_size</th></tr></thead><tbody><tr><td>deltacommit</td><td>434768</td><td>1</td><td>434768</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_rollbacks">show_rollbacks<a class="hash-link" href="#show_rollbacks" title="Direct link to heading"></a></h3><p>Show rollback commits.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>instant</td><td>String</td></tr><tr><td>rollback_instant</td><td>String</td></tr><tr><td>total_files_deleted</td><td>Int</td></tr><tr><td>time_taken_in_millis</td><td>Long</td></tr><tr><td>total_partitions</td><td>Int</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_rollbacks(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant</th><th>rollback_instant</th><th>total_files_deleted</th><th>time_taken_in_millis</th><th>time_taken_in_millis</th></tr></thead><tbody><tr><td>deltacommit</td><td>434768</td><td>1</td><td>434768</td><td>2</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_rollback_detail">show_rollback_detail<a class="hash-link" href="#show_rollback_detail" title="Direct link to heading"></a></h3><p>Show details of a rollback commit.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant time</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>instant</td><td>String</td></tr><tr><td>rollback_instant</td><td>String</td></tr><tr><td>partition</td><td>String</td></tr><tr><td>deleted_file</td><td>String</td></tr><tr><td>succeeded</td><td>Int</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_rollback_detail(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20230206174349556&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant</th><th>rollback_instant</th><th>partition</th><th>deleted_file</th><th>succeeded</th></tr></thead><tbody><tr><td>deltacommit</td><td>434768</td><td>1</td><td>434768</td><td>2</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="commits_compare">commits_compare<a class="hash-link" href="#commits_compare" title="Direct link to heading"></a></h3><p>Compare commit with another path.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>path</td><td>String</td><td>Y</td><td>None</td><td>Path of table</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>compare_detail</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call commits_compare(table =&gt; &#x27;test_hudi_table&#x27;, path =&gt; &#x27;hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>compare_detail</th></tr></thead><tbody><tr><td>Source test_hudi_table is ahead by 0 commits. Commits to catch up - []</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="archive_commits">archive_commits<a class="hash-link" href="#archive_commits" title="Direct link to heading"></a></h3><p>archive commits.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>N</td><td>None</td><td>Hudi table name</td></tr><tr><td>path</td><td>String</td><td>N</td><td>None</td><td>Path of table</td></tr><tr><td><a href="/docs/next/configurations#hoodiekeepmincommits">min_commits</a></td><td>Int</td><td>N</td><td>20</td><td>Similar to hoodie.keep.max.commits, but controls the minimum number of instants to retain in the active timeline.</td></tr><tr><td><a href="/docs/next/configurations#hoodiekeepmaxcommits">max_commits</a></td><td>Int</td><td>N</td><td>30</td><td>Archiving service moves older entries from timeline into an archived log after each write, to keep the metadata overhead constant, even as the table size grows. This config controls the maximum number of instants to retain in the active timeline.</td></tr><tr><td><a href="/docs/next/configurations#hoodiecommitsarchivalbatch">retain_commits</a></td><td>Int</td><td>N</td><td>10</td><td>Archiving of instants is batched in best-effort manner, to pack more instants into a single archive log. This config controls such archival batch size.</td></tr><tr><td><a href="/docs/next/configurations#hoodiemetadataenable">enable_metadata</a></td><td>Boolean</td><td>N</td><td>false</td><td>Enable the internal metadata table</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>Int</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call archive_commits(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>result</th></tr></thead><tbody><tr><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="export_instants">export_instants<a class="hash-link" href="#export_instants" title="Direct link to heading"></a></h3><p>extract instants to local folder.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>local_folder</td><td>String</td><td>Y</td><td>None</td><td>Local folder</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>-1</td><td>Number of instants to be exported</td></tr><tr><td>actions</td><td>String</td><td>N</td><td>clean,commit,deltacommit,rollback,savepoint,restore</td><td>Commit action</td></tr><tr><td>desc</td><td>Boolean</td><td>N</td><td>false</td><td>Descending order</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>export_detail</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call export_instants(table =&gt; &#x27;test_hudi_table&#x27;, local_folder =&gt; &#x27;/tmp/folder&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">export_detail</th></tr></thead><tbody><tr><td align="left">Exported 6 Instants to /tmp/folder</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="rollback_to_instant">rollback_to_instant<a class="hash-link" href="#rollback_to_instant" title="Direct link to heading"></a></h3><p>Rollback a table to the commit that was current at some time.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>rollback_result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><p>Roll back test_hudi_table to one instant</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call rollback_to_instant(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20220109225319449&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">rollback_result</th></tr></thead><tbody><tr><td align="left">true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="create_savepoint">create_savepoint<a class="hash-link" href="#create_savepoint" title="Direct link to heading"></a></h3><p>Create a savepoint to hudi&#x27;s table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>commit_time</td><td>String</td><td>Y</td><td>None</td><td>Commit time</td></tr><tr><td>user</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>User name</td></tr><tr><td>comments</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Comments</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>create_savepoint_result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call create_savepoint(table =&gt; &#x27;test_hudi_table&#x27;, commit_time =&gt; &#x27;20220109225319449&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">create_savepoint_result</th></tr></thead><tbody><tr><td align="left">true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_savepoints">show_savepoints<a class="hash-link" href="#show_savepoints" title="Direct link to heading"></a></h3><p>Show savepoints.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>savepoint_time</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_savepoints(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">savepoint_time</th></tr></thead><tbody><tr><td align="left">20220109225319449</td></tr><tr><td align="left">20220109225311742</td></tr><tr><td align="left">20220109225301429</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="delete_savepoint">delete_savepoint<a class="hash-link" href="#delete_savepoint" title="Direct link to heading"></a></h3><p>Delete a savepoint to hudi&#x27;s table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant time</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>delete_savepoint_result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><p>Delete a savepoint to test_hudi_table</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call delete_savepoint(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20220109225319449&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">delete_savepoint_result</th></tr></thead><tbody><tr><td align="left">true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="rollback_to_savepoint">rollback_to_savepoint<a class="hash-link" href="#rollback_to_savepoint" title="Direct link to heading"></a></h3><p>Rollback a table to the commit that was current at some time.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant time</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>rollback_savepoint_result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><p>Rollback test_hudi_table to one savepoint</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call rollback_to_savepoint(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20220109225319449&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">rollback_savepoint_result</th></tr></thead><tbody><tr><td align="left">true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="copy_to_temp_view">copy_to_temp_view<a class="hash-link" href="#copy_to_temp_view" title="Direct link to heading"></a></h3><p>copy table to a temporary view.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcequerytype">query_type</a></td><td>String</td><td>N</td><td>&quot;snapshot&quot;</td><td>Whether data needs to be read, in <code>incremental</code> mode (new data since an instantTime) (or) <code>read_optimized</code> mode (obtain latest view, based on base files) (or) <code>snapshot</code> mode (obtain latest view, by merging base and (if any) log files)</td></tr><tr><td>view_name</td><td>String</td><td>Y</td><td>None</td><td>Name of view</td></tr><tr><td>begin_instance_time</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Begin instance time</td></tr><tr><td>end_instance_time</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>End instance time</td></tr><tr><td>as_of_instant</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>As of instant time</td></tr><tr><td>replace</td><td>Boolean</td><td>N</td><td>false</td><td>Replace an existed view</td></tr><tr><td>global</td><td>Boolean</td><td>N</td><td>false</td><td>Global view</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>status</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call copy_to_temp_view(table =&gt; &#x27;test_hudi_table&#x27;, view_name =&gt; &#x27;copy_view_test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>status</th></tr></thead><tbody><tr><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="copy_to_table">copy_to_table<a class="hash-link" href="#copy_to_table" title="Direct link to heading"></a></h3><p>copy table to a new table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcequerytype">query_type</a></td><td>String</td><td>N</td><td>&quot;snapshot&quot;</td><td>Whether data needs to be read, in <code>incremental</code> mode (new data since an instantTime) (or) <code>read_optimized</code> mode (obtain latest view, based on base files) (or) <code>snapshot</code> mode (obtain latest view, by merging base and (if any) log files)</td></tr><tr><td>new_table</td><td>String</td><td>Y</td><td>None</td><td>Name of new table</td></tr><tr><td>begin_instance_time</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Begin instance time</td></tr><tr><td>end_instance_time</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>End instance time</td></tr><tr><td>as_of_instant</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>As of instant time</td></tr><tr><td>save_mode</td><td>String</td><td>N</td><td>&quot;overwrite&quot;</td><td>Save mode</td></tr><tr><td>columns</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Columns of source table which should copy to new table</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>status</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call copy_to_table(table =&gt; &#x27;test_hudi_table&#x27;, new_table =&gt; &#x27;copy_table_test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>status</th></tr></thead><tbody><tr><td>0</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_y2LR" id="metadata-table-management">Metadata Table management<a class="hash-link" href="#metadata-table-management" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="create_metadata_table">create_metadata_table<a class="hash-link" href="#create_metadata_table" title="Direct link to heading"></a></h3><p>Create metadata table of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call create_metadata_table(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">result</th></tr></thead><tbody><tr><td align="left">Created Metadata Table in hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table/.hoodie/metadata (duration=2.777secs)</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="init_metadata_table">init_metadata_table<a class="hash-link" href="#init_metadata_table" title="Direct link to heading"></a></h3><p>Init metadata table of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>read_only</td><td>Boolean</td><td>N</td><td>false</td><td>Read only</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call init_metadata_table(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">result</th></tr></thead><tbody><tr><td align="left">Initialized Metadata Table in hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table/.hoodie/metadata (duration=0.023sec)</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="delete_metadata_table">delete_metadata_table<a class="hash-link" href="#delete_metadata_table" title="Direct link to heading"></a></h3><p>Delete metadata table of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call delete_metadata_table(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">result</th></tr></thead><tbody><tr><td align="left">Removed Metadata Table from hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table/.hoodie/metadata</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_metadata_table_partitions">show_metadata_table_partitions<a class="hash-link" href="#show_metadata_table_partitions" title="Direct link to heading"></a></h3><p>Show partition of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>partition</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_metadata_table_partitions(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">partition</th></tr></thead><tbody><tr><td align="left">dt=2021-05-01</td></tr><tr><td align="left">dt=2021-05-02</td></tr><tr><td align="left">dt=2021-05-03</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_metadata_table_files">show_metadata_table_files<a class="hash-link" href="#show_metadata_table_files" title="Direct link to heading"></a></h3><p>Show files of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>partition</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Partition name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>100</td><td>Limit number</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>file_path</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><p>Show files of a hudi table under one partition.</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_metadata_table_files(table =&gt; &#x27;test_hudi_table&#x27;, partition =&gt; &#x27;dt=20230220&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">file_path</th></tr></thead><tbody><tr><td align="left">.d3cdf6ff-250a-4cee-9af4-ab179fdb9bfb-0_20230220190948086.log.1_0-111-123</td></tr><tr><td align="left">d3cdf6ff-250a-4cee-9af4-ab179fdb9bfb-0_0-78-81_20230220190948086.parquet</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_metadata_table_stats">show_metadata_table_stats<a class="hash-link" href="#show_metadata_table_stats" title="Direct link to heading"></a></h3><p>Show metadata table stats of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>stat_key</td><td>String</td></tr><tr><td>stat_value</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_metadata_table_stats(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>stat_key</th><th>stat_value</th></tr></thead><tbody><tr><td>dt=2021-05-03.totalBaseFileSizeInBytes</td><td>23142</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="validate_metadata_table_files">validate_metadata_table_files<a class="hash-link" href="#validate_metadata_table_files" title="Direct link to heading"></a></h3><p>Validate metadata table files of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>verbose</td><td>Boolean</td><td>N</td><td>False</td><td>If verbose print all files</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>partition</td><td>String</td></tr><tr><td>file_name</td><td>String</td></tr><tr><td>is_present_in_fs</td><td>Boolean</td></tr><tr><td>is_present_in_metadata</td><td>Boolean</td></tr><tr><td>fs_size</td><td>Long</td></tr><tr><td>metadata_size</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call validate_metadata_table_files(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>partition</th><th>file_name</th><th>is_present_in_fs</th><th>is_present_in_metadata</th><th>fs_size</th><th>metadata_size</th></tr></thead><tbody><tr><td>dt=2021-05-03</td><td>ad1e5a3f-532f-4a13-9f60-223676798bf3-0_0-4-4_00000000000002.parquet</td><td>true</td><td>true</td><td>43523</td><td>43523</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_y2LR" id="table-information">Table information<a class="hash-link" href="#table-information" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_table_properties">show_table_properties<a class="hash-link" href="#show_table_properties" title="Direct link to heading"></a></h3><p>Show hudi properties of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>path</td><td>String</td><td>N</td><td>None</td><td>Path of table</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>key</td><td>String</td></tr><tr><td>value</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_table_properties(table =&gt; &#x27;test_hudi_table&#x27;, limit =&gt; 10);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>key</th><th>value</th></tr></thead><tbody><tr><td>hoodie.table.precombine.field</td><td>ts</td></tr><tr><td>hoodie.table.partition.fields</td><td>dt</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_fs_path_detail">show_fs_path_detail<a class="hash-link" href="#show_fs_path_detail" title="Direct link to heading"></a></h3><p>Show detail of a path.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>path</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>is_sub</td><td>Boolean</td><td>N</td><td>false</td><td>Whether to list files</td></tr><tr><td>sort</td><td>Boolean</td><td>N</td><td>true</td><td>Sorted by storage_size</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>100</td><td>Limit number</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>path_num</td><td>Long</td></tr><tr><td>file_num</td><td>Long</td></tr><tr><td>storage_size</td><td>Long</td></tr><tr><td>storage_size(unit)</td><td>String</td></tr><tr><td>storage_path</td><td>String</td></tr><tr><td>space_consumed</td><td>Long</td></tr><tr><td>quota</td><td>Long</td></tr><tr><td>space_quota</td><td>Long</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_fs_path_detail(path =&gt; &#x27;hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>path_num</th><th>file_num</th><th>storage_size</th><th>storage_size(unit)</th><th>storage_path</th><th>space_consumed</th><th>quota</th><th>space_quota</th></tr></thead><tbody><tr><td>22</td><td>58</td><td>2065612</td><td>1.97MB</td><td>hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table</td><td>-1</td><td>6196836</td><td>-1</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="stats_file_sizes">stats_file_sizes<a class="hash-link" href="#stats_file_sizes" title="Direct link to heading"></a></h3><p>Show file sizes of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>partition_path</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Partition path</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>commit_time</td><td>String</td></tr><tr><td>min</td><td>Long</td></tr><tr><td>10th</td><td>Double</td></tr><tr><td>50th</td><td>Double</td></tr><tr><td>avg</td><td>Double</td></tr><tr><td>95th</td><td>Double</td></tr><tr><td>max</td><td>Long</td></tr><tr><td>num_files</td><td>Int</td></tr><tr><td>std_dev</td><td>Double</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call stats_file_sizes(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>min</th><th>10th</th><th>50th</th><th>avg</th><th>95th</th><th>max</th><th>num_files</th><th>std_dev</th></tr></thead><tbody><tr><td>20230205134149455</td><td>435000</td><td>435000.0</td><td>435000.0</td><td>435000.0</td><td>435000.0</td><td>435000</td><td>1</td><td>0.0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="stats_wa">stats_wa<a class="hash-link" href="#stats_wa" title="Direct link to heading"></a></h3><p>Show write stats and amplification of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>commit_time</td><td>String</td></tr><tr><td>total_upserted</td><td>Long</td></tr><tr><td>total_written</td><td>Long</td></tr><tr><td>write_amplification_factor</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call stats_wa(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>commit_time</th><th>total_upserted</th><th>total_written</th><th>write_amplification_factor</th></tr></thead><tbody><tr><td>Total</td><td>0</td><td>0</td><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_logfile_records">show_logfile_records<a class="hash-link" href="#show_logfile_records" title="Direct link to heading"></a></h3><p>Show records in logfile of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>log_file_path_pattern</td><td>String</td><td>Y</td><td>10</td><td>Pattern of logfile</td></tr><tr><td>merge</td><td>Boolean</td><td>N</td><td>false</td><td>Merge results</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>records</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_logfile_records(table =&gt; &#x27;test_hudi_table&#x27;, log_file_path_pattern =&gt; &#x27;hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table/*.log*&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>records</th></tr></thead><tbody><tr><td>{&quot;_hoodie_commit_time&quot;: &quot;20230205133427059&quot;, &quot;_hoodie_commit_seqno&quot;: &quot;20230205133427059_0_10&quot;, &quot;_hoodie_record_key&quot;: &quot;1&quot;, &quot;_hoodie_partition_path&quot;: &quot;&quot;, &quot;_hoodie_file_name&quot;: &quot;3438e233-7b50-4eff-adbb-70b1cd76f518-0&quot;, &quot;id&quot;: 1, &quot;name&quot;: &quot;a1&quot;, &quot;price&quot;: 40.0, &quot;ts&quot;: 1111}</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_logfile_metadata">show_logfile_metadata<a class="hash-link" href="#show_logfile_metadata" title="Direct link to heading"></a></h3><p>Show metadatas in logfile of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>log_file_path_pattern</td><td>String</td><td>Y</td><td>10</td><td>Pattern of logfile</td></tr><tr><td>merge</td><td>Boolean</td><td>N</td><td>false</td><td>Merge results</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>instant_time</td><td>String</td></tr><tr><td>record_count</td><td>Int</td></tr><tr><td>block_type</td><td>String</td></tr><tr><td>header_metadata</td><td>String</td></tr><tr><td>footer_metadata</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_logfile_metadata(table =&gt; &#x27;hudi_mor_tbl&#x27;, log_file_path_pattern =&gt; &#x27;hdfs://ns1/hive/warehouse/hudi.db/hudi_mor_tbl/*.log*&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant_time</th><th>record_count</th><th>block_type</th><th>header_metadata</th><th>footer_metadata</th></tr></thead><tbody><tr><td>20230205133427059</td><td>1</td><td>AVRO_DATA_BLOCK</td><td>{&quot;INSTANT_TIME&quot;:&quot;20230205133427059&quot;,&quot;SCHEMA&quot;:&quot;{\&quot;type\&quot;:\&quot;record\&quot;,\&quot;name\&quot;:\&quot;hudi_mor_tbl_record\&quot;,\&quot;namespace\&quot;:\&quot;hoodie.hudi_mor_tbl\&quot;,\&quot;fields\&quot;:[{\&quot;name\&quot;:\&quot;_hoodie_commit_time\&quot;,\&quot;type\&quot;:<!-- -->[\&quot;null\&quot;,\&quot;string\&quot;]<!-- -->,\&quot;doc\&quot;:\&quot;\&quot;,\&quot;default\&quot;:null},{\&quot;name\&quot;:\&quot;_hoodie_commit_seqno\&quot;,\&quot;type\&quot;:<!-- -->[\&quot;null\&quot;,\&quot;string\&quot;]<!-- -->,\&quot;doc\&quot;:\&quot;\&quot;,\&quot;default\&quot;:null},{\&quot;name\&quot;:\&quot;_hoodie_record_key\&quot;,\&quot;type\&quot;:<!-- -->[\&quot;null\&quot;,\&quot;string\&quot;]<!-- -->,\&quot;doc\&quot;:\&quot;\&quot;,\&quot;default\&quot;:null},{\&quot;name\&quot;:\&quot;_hoodie_partition_path\&quot;,\&quot;type\&quot;:<!-- -->[\&quot;null\&quot;,\&quot;string\&quot;]<!-- -->,\&quot;doc\&quot;:\&quot;\&quot;,\&quot;default\&quot;:null},{\&quot;name\&quot;:\&quot;_hoodie_file_name\&quot;,\&quot;type\&quot;:<!-- -->[\&quot;null\&quot;,\&quot;string\&quot;]<!-- -->,\&quot;doc\&quot;:\&quot;\&quot;,\&quot;default\&quot;:null},{\&quot;name\&quot;:\&quot;id\&quot;,\&quot;type\&quot;:\&quot;int\&quot;},{\&quot;name\&quot;:\&quot;name\&quot;,\&quot;type\&quot;:\&quot;string\&quot;},{\&quot;name\&quot;:\&quot;price\&quot;,\&quot;type\&quot;:\&quot;double\&quot;},{\&quot;name\&quot;:\&quot;ts\&quot;,\&quot;type\&quot;:\&quot;long\&quot;}]}&quot;}</td><td>{}</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_invalid_parquet">show_invalid_parquet<a class="hash-link" href="#show_invalid_parquet" title="Direct link to heading"></a></h3><p>Show invalid parquet files of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>Path</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>100</td><td>Limit number</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>Path</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_invalid_parquet(path =&gt; &#x27;hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>Path</th></tr></thead><tbody><tr><td>hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table/7fb52523-c7f6-41aa-84a6-629041477aeb-0_0-92-99_20230205133532199.parquet</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_fsview_all">show_fsview_all<a class="hash-link" href="#show_fsview_all" title="Direct link to heading"></a></h3><p>Show file system views of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>max_instant</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Max instant time</td></tr><tr><td>include_max</td><td>Boolean</td><td>N</td><td>false</td><td>Include max instant</td></tr><tr><td>include_in_flight</td><td>Boolean</td><td>N</td><td>false</td><td>Include in flight</td></tr><tr><td>exclude_compaction</td><td>Boolean</td><td>N</td><td>false</td><td>Exclude compaction</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>path_regex</td><td>String</td><td>N</td><td>&quot;<!-- -->*<!-- -->\/<!-- -->*<!-- -->\/<!-- -->*<!-- -->&quot;</td><td>Pattern of path</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>partition</td><td>String</td></tr><tr><td>file_id</td><td>String</td></tr><tr><td>base_instant</td><td>String</td></tr><tr><td>data_file</td><td>String</td></tr><tr><td>data_file_size</td><td>Long</td></tr><tr><td>num_delta_files</td><td>Long</td></tr><tr><td>total_delta_file_size</td><td>Long</td></tr><tr><td>delta_files</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_fsview_all(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>partition</th><th>file_id</th><th>base_instant</th><th>data_file</th><th>data_file_size</th><th>num_delta_files</th><th>total_delta_file_size</th><th>delta_files</th></tr></thead><tbody><tr><td>dt=2021-05-03</td><td>d0073a12-085d-4f49-83e9-402947e7e90a-0</td><td>20220109225319449</td><td>7fb52523-c7f6-41aa-84a6-629041477aeb-0_0-92-99_20220109225319449.parquet</td><td>5319449</td><td>1</td><td>213193</td><td>.7fb52523-c7f6-41aa-84a6-629041477aeb-0_20230205133217210.log.1_0-60-63</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_fsview_latest">show_fsview_latest<a class="hash-link" href="#show_fsview_latest" title="Direct link to heading"></a></h3><p>Show latest file system view of a table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>max_instant</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Max instant time</td></tr><tr><td>include_max</td><td>Boolean</td><td>N</td><td>false</td><td>Include max instant</td></tr><tr><td>include_in_flight</td><td>Boolean</td><td>N</td><td>false</td><td>Include in flight</td></tr><tr><td>exclude_compaction</td><td>Boolean</td><td>N</td><td>false</td><td>Exclude compaction</td></tr><tr><td>partition_path</td><td>String</td><td>Y</td><td>None</td><td>Partition path</td></tr><tr><td>merge</td><td>Boolean</td><td>N</td><td>false</td><td>Merge results</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>partition</td><td>String</td></tr><tr><td>file_id</td><td>String</td></tr><tr><td>base_instant</td><td>String</td></tr><tr><td>data_file</td><td>String</td></tr><tr><td>data_file_size</td><td>Long</td></tr><tr><td>num_delta_files</td><td>Long</td></tr><tr><td>total_delta_file_size</td><td>Long</td></tr><tr><td>delta_size_compaction_scheduled</td><td>Long</td></tr><tr><td>delta_size_compaction_unscheduled</td><td>Long</td></tr><tr><td>delta_to_base_radio_compaction_scheduled</td><td>Double</td></tr><tr><td>delta_to_base_radio_compaction_unscheduled</td><td>Double</td></tr><tr><td>delta_files_compaction_scheduled</td><td>String</td></tr><tr><td>delta_files_compaction_unscheduled</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_fsview_latest(table =&gt; &#x27;test_hudi_table&#x27;, partition =&gt; &#x27;dt=2021-05-03&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>partition</th><th>file_id</th><th>base_instant</th><th>data_file</th><th>data_file_size</th><th>num_delta_files</th><th>total_delta_file_size</th><th>delta_files</th></tr></thead><tbody><tr><td>dt=2021-05-03</td><td>d0073a12-085d-4f49-83e9-402947e7e90a-0</td><td>20220109225319449</td><td>7fb52523-c7f6-41aa-84a6-629041477aeb-0_0-92-99_20220109225319449.parquet</td><td>5319449</td><td>1</td><td>213193</td><td>.7fb52523-c7f6-41aa-84a6-629041477aeb-0_20230205133217210.log.1_0-60-63</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_y2LR" id="optimization-table">Optimization table<a class="hash-link" href="#optimization-table" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run_clustering">run_clustering<a class="hash-link" href="#run_clustering" title="Direct link to heading"></a></h3><p>Trigger clustering on a hoodie table. By using partition predicates, clustering table can be run
with specified partitions, and you can also specify the order columns to sort data.</p><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</h5></div><div class="admonition-content"><p>Newly clustering instant will be generated every call, or some pending clustering instants are executed.
When calling this procedure, one of parameters <code>table</code> and <code>path</code> must be specified at least. If both
parameters are given, <code>table</code> will take effect.</p></div></div><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>N</td><td>None</td><td>Name of table to be clustered</td></tr><tr><td>path</td><td>String</td><td>N</td><td>None</td><td>Path of table to be clustered</td></tr><tr><td>predicate</td><td>String</td><td>N</td><td>None</td><td>Predicate to filter partition</td></tr><tr><td>order</td><td>String</td><td>N</td><td>None</td><td>Order column split by <code>,</code></td></tr><tr><td>show_involved_partition</td><td>Boolean</td><td>N</td><td>false</td><td>Show involved partition in the output</td></tr><tr><td>op</td><td>String</td><td>N</td><td>None</td><td>Operation type, <code>EXECUTE</code> or <code>SCHEDULE</code></td></tr><tr><td>order_strategy</td><td>String</td><td>N</td><td>None</td><td>Records layout optimization, <code>linear/z-order/hilbert</code></td></tr><tr><td>options</td><td>String</td><td>N</td><td>None</td><td>Customize hudi configs in the format &quot;key1=value1,key2=value2`</td></tr><tr><td>instants</td><td>String</td><td>N</td><td>None</td><td>Specified instants by <code>,</code></td></tr><tr><td>selected_partitions</td><td>String</td><td>N</td><td>None</td><td>Partitions to run clustering by <code>,</code></td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>None</td><td>Max number of plans to be executed</td></tr></tbody></table><p><strong>Output</strong></p><p>The output as follows:</p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>timestamp</td><td>String</td><td>N</td><td>None</td><td>Instant name</td></tr><tr><td>input_group_size</td><td>Int</td><td>N</td><td>None</td><td>The input group sizes for each plan</td></tr><tr><td>state</td><td>String</td><td>N</td><td>None</td><td>The instant final state</td></tr><tr><td>involved_partitions</td><td>String</td><td>N</td><td>*</td><td>Show involved partitions, default is <code>*</code></td></tr></tbody></table><p><strong>Example</strong></p><p>Clustering test_hudi_table with table name</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table path</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, predicate and order column</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, predicate =&gt; &#x27;ts &lt;= 20220408L&#x27;, order =&gt; &#x27;ts&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, show_involved_partition</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, show_involved_partition =&gt; true);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, op</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, op =&gt; &#x27;schedule&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, order_strategy</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, order_strategy =&gt; &#x27;z-order&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, op, options</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, op =&gt; &#x27;schedule&#x27;, options =&gt; &#x27;</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">hoodie.clustering.plan.strategy.target.file.max.bytes=1024*1024*1024,</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">hoodie.clustering.plan.strategy.max.bytes.per.group=2*1024*1024*1024&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, op, instants</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, op =&gt; &#x27;execute&#x27;, instants =&gt; &#x27;ts1,ts2&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, op, selected_partitions</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, op =&gt; &#x27;execute&#x27;, selected_partitions =&gt; &#x27;par1,par2&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Clustering test_hudi_table with table name, op, limit</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clustering(table =&gt; &#x27;test_hudi_table&#x27;, op =&gt; &#x27;execute&#x27;, limit =&gt; 10);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</h5></div><div class="admonition-content"><p>Limit parameter is valid only when op is execute.</p></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_clustering">show_clustering<a class="hash-link" href="#show_clustering" title="Direct link to heading"></a></h3><p>Show pending clusterings on a hoodie table. </p><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</h5></div><div class="admonition-content"><p>When calling this procedure, one of parameters <code>table</code> and <code>path</code> must be specified at least.
If both parameters are given, <code>table</code> will take effect.</p></div></div><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>N</td><td>None</td><td>Name of table to be clustered</td></tr><tr><td>path</td><td>String</td><td>N</td><td>None</td><td>Path of table to be clustered</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>None</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>timestamp</td><td>String</td><td>N</td><td>None</td><td>Instant time</td></tr><tr><td>groups</td><td>Int</td><td>N</td><td>None</td><td>Number of file groups to be processed</td></tr></tbody></table><p><strong>Example</strong></p><p>Show pending clusterings with table name</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_clustering(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>timestamp</th><th>groups</th></tr></thead><tbody><tr><td>20220408153707928</td><td>2</td></tr><tr><td>20220408153636963</td><td>3</td></tr></tbody></table><p>Show pending clusterings with table path</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_clustering(path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>timestamp</th><th>groups</th></tr></thead><tbody><tr><td>20220408153707928</td><td>2</td></tr><tr><td>20220408153636963</td><td>3</td></tr></tbody></table><p>Show pending clusterings with table name and limit</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_clustering(table =&gt; &#x27;test_hudi_table&#x27;, limit =&gt; 1);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>timestamp</th><th>groups</th></tr></thead><tbody><tr><td>20220408153707928</td><td>2</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run_compaction">run_compaction<a class="hash-link" href="#run_compaction" title="Direct link to heading"></a></h3><p>Schedule or run compaction on a hoodie table. </p><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</h5></div><div class="admonition-content"><p>For scheduling compaction, if <code>timestamp</code> is specified, new scheduled compaction will use given
timestamp as instant time. Otherwise, compaction will be scheduled by using current system time. </p><p>For running compaction, given <code>timestamp</code> must be a pending compaction instant time that
already exists, if it&#x27;s not, exception will be thrown. Meanwhile, if <code>timestamp</code>is specified
and there are pending compactions, all pending compactions will be executed without new compaction
instant generated. </p><p>When calling this procedure, one of parameters <code>table</code> and <code>path</code>must be specified at least.
If both parameters are given, <code>table</code> will take effect.</p></div></div><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>op</td><td>String</td><td>N</td><td>None</td><td>Operation type, <code>RUN</code> or <code>SCHEDULE</code></td></tr><tr><td>table</td><td>String</td><td>N</td><td>None</td><td>Name of table to be compacted</td></tr><tr><td>path</td><td>String</td><td>N</td><td>None</td><td>Path of table to be compacted</td></tr><tr><td>timestamp</td><td>String</td><td>N</td><td>None</td><td>Instant time</td></tr><tr><td>options</td><td>String</td><td>N</td><td>None</td><td>comma separated list of Hudi configs for compaction in the format &quot;config1=value1,config2=value2&quot;</td></tr></tbody></table><p><strong>Output</strong></p><p>The output of <code>RUN</code> operation is <code>EMPTY</code>, the output of <code>SCHEDULE</code> as follow:</p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>instant</td><td>String</td><td>N</td><td>None</td><td>Instant name</td></tr></tbody></table><p><strong>Example</strong></p><p>Run compaction with table name</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;run&#x27;, table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Run compaction with table path</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;run&#x27;, path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Run compaction with table path and timestamp</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;run&#x27;, path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;, timestamp =&gt; &#x27;20220408153658568&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Run compaction with options</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;run&#x27;, table =&gt; &#x27;test_hudi_table&#x27;, options =&gt; hoodie.compaction.strategy=org.apache.hudi.table.action.compact.strategy.LogFileNumBasedCompactionStrategy,hoodie.compaction.logfile.num.threshold=3);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Schedule compaction with table name</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;schedule&#x27;, table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant</th></tr></thead><tbody><tr><td>20220408153650834</td></tr></tbody></table><p>Schedule compaction with table path</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;schedule&#x27;, path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant</th></tr></thead><tbody><tr><td>20220408153650834</td></tr></tbody></table><p>Schedule compaction with table path and timestamp</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_compaction(op =&gt; &#x27;schedule&#x27;, path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;, timestamp =&gt; &#x27;20220408153658568&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>instant</th></tr></thead><tbody><tr><td>20220408153658568</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_compaction">show_compaction<a class="hash-link" href="#show_compaction" title="Direct link to heading"></a></h3><p>Show all compactions on a hoodie table, in-flight or completed compactions are included, and result will
be in reverse order according to trigger time. </p><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</h5></div><div class="admonition-content"><p>When calling this procedure, one of parameters <code>table</code>and <code>path</code> must be specified at least.
If both parameters are given, <code>table</code> will take effect.</p></div></div><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>N</td><td>None</td><td>Name of table to show compaction</td></tr><tr><td>path</td><td>String</td><td>N</td><td>None</td><td>Path of table to show compaction</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>None</td><td>Max number of records to be returned</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>timestamp</td><td>String</td><td>N</td><td>None</td><td>Instant time</td></tr><tr><td>action</td><td>String</td><td>N</td><td>None</td><td>Action name of compaction</td></tr><tr><td>size</td><td>Int</td><td>N</td><td>None</td><td>Number of file slices to be compacted</td></tr></tbody></table><p><strong>Example</strong></p><p>Show compactions with table name</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_compaction(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>timestamp</th><th>action</th><th>size</th></tr></thead><tbody><tr><td>20220408153707928</td><td>compaction</td><td>10</td></tr><tr><td>20220408153636963</td><td>compaction</td><td>10</td></tr></tbody></table><p>Show compactions with table path</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_compaction(path =&gt; &#x27;/tmp/hoodie/test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>timestamp</th><th>action</th><th>size</th></tr></thead><tbody><tr><td>20220408153707928</td><td>compaction</td><td>10</td></tr><tr><td>20220408153636963</td><td>compaction</td><td>10</td></tr></tbody></table><p>Show compactions with table name and limit</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_compaction(table =&gt; &#x27;test_hudi_table&#x27;, limit =&gt; 1);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>timestamp</th><th>action</th><th>size</th></tr></thead><tbody><tr><td>20220408153707928</td><td>compaction</td><td>10</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run_clean">run_clean<a class="hash-link" href="#run_clean" title="Direct link to heading"></a></h3><p>Run cleaner on a hoodie table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Name of table to be cleaned</td></tr><tr><td>schedule_in_line</td><td>Boolean</td><td>N</td><td>true</td><td>Set &quot;true&quot; if you want to schedule and run a clean. Set false if you have already scheduled a clean and want to run that.</td></tr><tr><td><a href="/docs/next/configurations#hoodiecleanerpolicy">clean_policy</a></td><td>String</td><td>N</td><td>None</td><td>org.apache.hudi.common.model.HoodieCleaningPolicy: Cleaning policy to be used. The cleaner service deletes older file slices files to re-claim space. Long running query plans may often refer to older file slices and will break if those are cleaned, before the query has had a chance to run. So, it is good to make sure that the data is retained for more than the maximum query execution time. By default, the cleaning policy is determined based on one of the following configs explicitly set by the user (at most one of them can be set; otherwise, KEEP_LATEST_COMMITS cleaning policy is used). KEEP_LATEST_FILE_VERSIONS: keeps the last N versions of the file slices written; used when &quot;hoodie.cleaner.fileversions.retained&quot; is explicitly set only. KEEP_LATEST_COMMITS(default): keeps the file slices written by the last N commits; used when &quot;hoodie.cleaner.commits.retained&quot; is explicitly set only. KEEP_LATEST_BY_HOURS: keeps the file slices written in the last N hours based on the commit time; used when &quot;hoodie.cleaner.hours.retained&quot; is explicitly set only.</td></tr><tr><td><a href="/docs/next/configurations#hoodiecleanercommitsretained">retain_commits</a></td><td>Int</td><td>N</td><td>None</td><td>When KEEP_LATEST_COMMITS cleaning policy is used, the number of commits to retain, without cleaning. This will be retained for num_of_commits * time_between_commits (scheduled). This also directly translates into how much data retention the table supports for incremental queries.</td></tr><tr><td><a href="/docs/next/configurations#hoodiecleanerhoursretained">hours_retained</a></td><td>Int</td><td>N</td><td>None</td><td>When KEEP_LATEST_BY_HOURS cleaning policy is used, the number of hours for which commits need to be retained. This config provides a more flexible option as compared to number of commits retained for cleaning service. Setting this property ensures all the files, but the latest in a file group, corresponding to commits with commit times older than the configured number of hours to be retained are cleaned.</td></tr><tr><td><a href="/docs/next/configurations#hoodiecleanerfileversionsretained">file_versions_retained</a></td><td>Int</td><td>N</td><td>None</td><td>When KEEP_LATEST_FILE_VERSIONS cleaning policy is used, the minimum number of file slices to retain in each file group, during cleaning.</td></tr><tr><td><a href="/docs/next/configurations#hoodiecleantriggerstrategy">trigger_strategy</a></td><td>String</td><td>N</td><td>None</td><td>org.apache.hudi.table.action.clean.CleaningTriggerStrategy: Controls when cleaning is scheduled. NUM_COMMITS(default): Trigger the cleaning service every N commits, determined by <code>hoodie.clean.max.commits</code></td></tr><tr><td><a href="/docs/next/configurations/#hoodiecleanmaxcommits">trigger_max_commits</a></td><td>Int</td><td>N</td><td>None</td><td>Number of commits after the last clean operation, before scheduling of a new clean is attempted.</td></tr><tr><td><a href="/docs/next/configurations/#Clean-Configs">options</a></td><td>String</td><td>N</td><td>None</td><td>comma separated list of Hudi configs for cleaning in the format &quot;config1=value1,config2=value2&quot;</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th></tr></thead><tbody><tr><td>start_clean_time</td><td>String</td></tr><tr><td>time_taken_in_millis</td><td>Long</td></tr><tr><td>total_files_deleted</td><td>Int</td></tr><tr><td>earliest_commit_to_retain</td><td>String</td></tr><tr><td>bootstrap_part_metadata</td><td>String</td></tr><tr><td>version</td><td>Int</td></tr></tbody></table><p><strong>Example</strong></p><p>Run clean with table name</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clean(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Run clean with keep latest file versions policy</p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_clean(table =&gt; &#x27;test_hudi_table&#x27;, trigger_max_commits =&gt; 2, clean_policy =&gt; &#x27;KEEP_LATEST_FILE_VERSIONS&#x27;, file_versions_retained =&gt; 1)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="delete_marker">delete_marker<a class="hash-link" href="#delete_marker" title="Direct link to heading"></a></h3><p>Delete marker files of a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>instant_time</td><td>String</td><td>Y</td><td>None</td><td>Instant name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>delete_marker_result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call delete_marker(table =&gt; &#x27;test_hudi_table&#x27;, instant_time =&gt; &#x27;20230206174349556&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">delete_marker_result</th></tr></thead><tbody><tr><td align="left">true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="sync_validate">sync_validate<a class="hash-link" href="#sync_validate" title="Direct link to heading"></a></h3><p>Validate sync procedure.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>src_table</td><td>String</td><td>Y</td><td>None</td><td>Source table name</td></tr><tr><td>dst_table</td><td>String</td><td>Y</td><td>None</td><td>Target table name</td></tr><tr><td>mode</td><td>String</td><td>Y</td><td>&quot;complete&quot;</td><td>Mode</td></tr><tr><td>hive_server_url</td><td>String</td><td>Y</td><td>None</td><td>Hive server url</td></tr><tr><td>hive_pass</td><td>String</td><td>Y</td><td>None</td><td>Hive password</td></tr><tr><td>src_db</td><td>String</td><td>N</td><td>&quot;rawdata&quot;</td><td>Source database</td></tr><tr><td>target_db</td><td>String</td><td>N</td><td>dwh_hoodie&quot;</td><td>Target database</td></tr><tr><td>partition_cnt</td><td>Int</td><td>N</td><td>5</td><td>Partition count</td></tr><tr><td>hive_user</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Hive user name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain"> call sync_validate(hive_server_url=&gt;&#x27;jdbc:hive2://localhost:10000/default&#x27;, src_table =&gt; &#x27;test_hudi_table_src&#x27;, dst_table=&gt; &#x27;test_hudi_table_dst&#x27;, mode=&gt;&#x27;complete&#x27;, hive_pass=&gt;&#x27;&#x27;, src_db=&gt; &#x27;default&#x27;, target_db=&gt;&#x27;default&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="hive_sync">hive_sync<a class="hash-link" href="#hive_sync" title="Direct link to heading"></a></h3><p>Sync the table&#x27;s latest schema to Hive metastore.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>metastore_uri</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Metastore_uri</td></tr><tr><td>username</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>User name</td></tr><tr><td>password</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Password</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcehive_syncuse_jdbc">use_jdbc</a></td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Use JDBC when hive synchronization is enabled</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcehive_syncmode">mode</a></td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Mode to choose for Hive ops. Valid values are hms, jdbc and hiveql.</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcehive_syncpartition_fields">partition_fields</a></td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Field in the table to use for determining hive partition columns.</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcehive_syncpartition_extractor_class">partition_extractor_class</a></td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Class which implements PartitionValueExtractor to extract the partition values, default &#x27;org.apache.hudi.hive.MultiPartKeysValueExtractor&#x27;.</td></tr><tr><td><a href="/docs/next/configurations#hoodiedatasourcehive_synctablestrategy">strategy</a></td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Hive table synchronization strategy. Available option: RO, RT, ALL.</td></tr><tr><td><a href="/docs/next/configurations#hoodiemetasyncincremental">sync_incremental</a></td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Whether to incrementally sync the partitions to the metastore, i.e., only added, changed, and deleted partitions based on the commit metadata. If set to <code>false</code>, the meta sync executes a full partition sync operation when partitions are lost.</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call hive_sync(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">result</th></tr></thead><tbody><tr><td align="left">true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="hdfs_parquet_import">hdfs_parquet_import<a class="hash-link" href="#hdfs_parquet_import" title="Direct link to heading"></a></h3><p>add parquet files to a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>table_type</td><td>String</td><td>Y</td><td>&quot;&quot;</td><td>Table type, MERGE_ON_READ or COPY_ON_WRITE</td></tr><tr><td>src_path</td><td>String</td><td>Y</td><td>&quot;&quot;</td><td>Source path</td></tr><tr><td>target_path</td><td>String</td><td>Y</td><td>&quot;&quot;</td><td>target path</td></tr><tr><td>row_key</td><td>String</td><td>Y</td><td>&quot;&quot;</td><td>Primary key</td></tr><tr><td>partition_key</td><td>String</td><td>Y</td><td>&quot;&quot;</td><td>Partition key</td></tr><tr><td>schema_file_path</td><td>String</td><td>Y</td><td>&quot;&quot;</td><td>Path of Schema file</td></tr><tr><td>format</td><td>String</td><td>N</td><td>&quot;parquet&quot;</td><td>File format</td></tr><tr><td>command</td><td>String</td><td>N</td><td>&quot;insert&quot;</td><td>Import command</td></tr><tr><td>retry</td><td>Int</td><td>N</td><td>0</td><td>Retry times</td></tr><tr><td>parallelism</td><td>Int</td><td>N</td><td>None</td><td>Parallelism</td></tr><tr><td>props_file_path</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Path of properties file</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>import_result</td><td>Int</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call hdfs_parquet_import(table =&gt; &#x27;test_hudi_table&#x27;, table_type =&gt; &#x27;COPY_ON_WRITE&#x27;, src_path =&gt; &#x27;&#x27;, target_path =&gt; &#x27;&#x27;, row_key =&gt; &#x27;id&#x27;, partition_key =&gt; &#x27;dt&#x27;, schema_file_path =&gt; &#x27;&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th align="left">import_result</th></tr></thead><tbody><tr><td align="left">0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="repair_add_partition_meta">repair_add_partition_meta<a class="hash-link" href="#repair_add_partition_meta" title="Direct link to heading"></a></h3><p>Repair add partition for a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>dry_run</td><td>Boolean</td><td>N</td><td>true</td><td>Dry run</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>partition_path</td><td>String</td></tr><tr><td>metadata_is_present</td><td>String</td></tr><tr><td>action</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call repair_add_partition_meta(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>partition_path</th><th>metadata_is_present</th><th>action</th></tr></thead><tbody><tr><td>dt=2021-05-03</td><td>Yes</td><td>None</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="repair_corrupted_clean_files">repair_corrupted_clean_files<a class="hash-link" href="#repair_corrupted_clean_files" title="Direct link to heading"></a></h3><p>Repair corrupted clean files for a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call repair_corrupted_clean_files(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>result</th></tr></thead><tbody><tr><td>true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="repair_deduplicate">repair_deduplicate<a class="hash-link" href="#repair_deduplicate" title="Direct link to heading"></a></h3><p>Repair deduplicate records for a hudi table. The job dedupliates the data in the duplicated_partition_path and writes it into repaired_output_path. In the end of the job, the data in repaired_output_path is copied into the original path (duplicated_partition_path).</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>duplicated_partition_path</td><td>String</td><td>Y</td><td>None</td><td>Duplicated partition path</td></tr><tr><td>repaired_output_path</td><td>String</td><td>Y</td><td>None</td><td>Repaired output path</td></tr><tr><td>dry_run</td><td>Boolean</td><td>N</td><td>true</td><td>Dry run</td></tr><tr><td>dedupe_type</td><td>String</td><td>N</td><td>&quot;insert_type&quot;</td><td>Dedupe type</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call repair_deduplicate(table =&gt; &#x27;test_hudi_table&#x27;, duplicated_partition_path =&gt; &#x27;dt=2021-05-03&#x27;, repaired_output_path =&gt; &#x27;/tmp/repair_path/&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>result</th></tr></thead><tbody><tr><td>Reduplicated files placed in: /tmp/repair_path/.</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="repair_migrate_partition_meta">repair_migrate_partition_meta<a class="hash-link" href="#repair_migrate_partition_meta" title="Direct link to heading"></a></h3><p>downgrade a hudi table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>dry_run</td><td>Boolean</td><td>N</td><td>true</td><td>Dry run</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>partition_path</td><td>String</td></tr><tr><td>text_metafile_present</td><td>String</td></tr><tr><td>base_metafile_present</td><td>String</td></tr><tr><td>action</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call repair_migrate_partition_meta(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="repair_overwrite_hoodie_props">repair_overwrite_hoodie_props<a class="hash-link" href="#repair_overwrite_hoodie_props" title="Direct link to heading"></a></h3><p>overwrite a hudi table properties.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>new_props_file_path</td><td>String</td><td>Y</td><td>None</td><td>Path of new properties</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>property</td><td>String</td></tr><tr><td>old_value</td><td>String</td></tr><tr><td>new_value</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call repair_overwrite_hoodie_props(table =&gt; &#x27;test_hudi_table&#x27;, new_props_file_path = &gt; &#x27;/tmp/props&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>property</th><th>old_value</th><th>new_value</th></tr></thead><tbody><tr><td>hoodie.file.index.enable</td><td>true</td><td>false</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_y2LR" id="bootstrap">Bootstrap<a class="hash-link" href="#bootstrap" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run_bootstrap">run_bootstrap<a class="hash-link" href="#run_bootstrap" title="Direct link to heading"></a></h3><p>Convert an existing table to Hudi.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Name of table to be clustered</td></tr><tr><td>table_type</td><td>String</td><td>Y</td><td>None</td><td>Table type, MERGE_ON_READ or COPY_ON_WRITE</td></tr><tr><td><a href="/docs/next/configurations#hoodiebootstrapbasepath">bootstrap_path</a></td><td>String</td><td>Y</td><td>None</td><td>Base path of the dataset that needs to be bootstrapped as a Hudi table</td></tr><tr><td>base_path</td><td>String</td><td>Y</td><td>None</td><td>Base path</td></tr><tr><td>rowKey_field</td><td>String</td><td>Y</td><td>None</td><td>Primary key field</td></tr><tr><td>base_file_format</td><td>String</td><td>N</td><td>&quot;PARQUET&quot;</td><td>Format of base file</td></tr><tr><td>partition_path_field</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Partitioned column field</td></tr><tr><td><a href="/docs/next/configurations#hoodiebootstrapindexclass">bootstrap_index_class</a></td><td>String</td><td>N</td><td>&quot;org.apache.hudi.common.bootstrap.index.HFileBootstrapIndex&quot;</td><td>Implementation to use, for mapping a skeleton base file to a bootstrap base file.</td></tr><tr><td><a href="/docs/next/configurations#hoodiebootstrapmodeselector">selector_class</a></td><td>String</td><td>N</td><td>&quot;org.apache.hudi.client.bootstrap.selector.MetadataOnlyBootstrapModeSelector&quot;</td><td>Selects the mode in which each file/partition in the bootstrapped dataset gets bootstrapped</td></tr><tr><td>key_generator_class</td><td>String</td><td>N</td><td>&quot;org.apache.hudi.keygen.SimpleKeyGenerator&quot;</td><td>Class of key generator</td></tr><tr><td>full_bootstrap_input_provider</td><td>String</td><td>N</td><td>&quot;org.apache.hudi.bootstrap.SparkParquetBootstrapDataProvider&quot;</td><td>Class of full bootstrap input provider</td></tr><tr><td>schema_provider_class</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Class of schema provider</td></tr><tr><td>payload_class</td><td>String</td><td>N</td><td>&quot;org.apache.hudi.common.model.OverwriteWithLatestAvroPayload&quot;</td><td>Class of payload</td></tr><tr><td><a href="/docs/next/configurations#hoodiebootstrapparallelism">parallelism</a></td><td>Int</td><td>N</td><td>1500</td><td>For metadata-only bootstrap, Hudi parallelizes the operation so that each table partition is handled by one Spark task. This config limits the number of parallelism. We pick the configured parallelism if the number of table partitions is larger than this configured value. The parallelism is assigned to the number of table partitions if it is smaller than the configured value. For full-record bootstrap, i.e., BULK_INSERT operation of the records, this configured value is passed as the BULK_INSERT shuffle parallelism (<code>hoodie.bulkinsert.shuffle.parallelism</code>), determining the BULK_INSERT write behavior. If you see that the bootstrap is slow due to the limited parallelism, you can increase this.</td></tr><tr><td>enable_hive_sync</td><td>Boolean</td><td>N</td><td>false</td><td>Whether to enable hive sync</td></tr><tr><td>props_file_path</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Path of properties file</td></tr><tr><td>bootstrap_overwrite</td><td>Boolean</td><td>N</td><td>false</td><td>Overwrite bootstrap path</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>status</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call run_bootstrap(table =&gt; &#x27;test_hudi_table&#x27;, table_type =&gt; &#x27;COPY_ON_WRITE&#x27;, bootstrap_path =&gt; &#x27;hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table&#x27;, base_path =&gt; &#x27;hdfs://ns1//tmp/hoodie/test_hudi_table&#x27;, rowKey_field =&gt; &#x27;id&#x27;, partition_path_field =&gt; &#x27;dt&#x27;,bootstrap_overwrite =&gt; true);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>status</th></tr></thead><tbody><tr><td>0</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_bootstrap_mapping">show_bootstrap_mapping<a class="hash-link" href="#show_bootstrap_mapping" title="Direct link to heading"></a></h3><p>Show mapping files of a bootstrap table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Name of table to be clustered</td></tr><tr><td>partition_path</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>Partition path</td></tr><tr><td>file_ids</td><td>String</td><td>N</td><td>&quot;&quot;</td><td>File ids</td></tr><tr><td>limit</td><td>Int</td><td>N</td><td>10</td><td>Max number of records to be returned</td></tr><tr><td>sort_by</td><td>String</td><td>N</td><td>&quot;partition&quot;</td><td>Sort by columns</td></tr><tr><td>desc</td><td>Boolean</td><td>N</td><td>false</td><td>Descending order</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th></tr></thead><tbody><tr><td>partition</td><td>String</td></tr><tr><td>file_id</td><td>Int</td></tr><tr><td>source_base_path</td><td>String</td></tr><tr><td>source_partition</td><td>Int</td></tr><tr><td>source_file</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_bootstrap_mapping(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>partition</th><th>file_id</th><th>source_base_path</th><th>source_partition</th><th>source_file</th></tr></thead><tbody><tr><td>dt=2021-05-03</td><td>d0073a12-085d-4f49-83e9-402947e7e90a-0</td><td>hdfs://ns1/hive/warehouse/hudi.db/test_hudi_table/dt=2021-05-03/d0073a12-085d-4f49-83e9-402947e7e90a-0_0-2-2_00000000000002.parquet</td><td>dt=2021-05-03</td><td>hdfs://ns1/tmp/dt=2021-05-03/00001.parquet</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="show_bootstrap_partitions">show_bootstrap_partitions<a class="hash-link" href="#show_bootstrap_partitions" title="Direct link to heading"></a></h3><p>Show partitions of a bootstrap table.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Name of table to be clustered</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th></tr></thead><tbody><tr><td>indexed_partitions</td><td>String</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call show_bootstrap_partitions(table =&gt; &#x27;test_hudi_table&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>indexed_partitions</th></tr></thead><tbody><tr><td>dt=2021-05-03</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_y2LR" id="version-management">Version management<a class="hash-link" href="#version-management" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="upgrade_table">upgrade_table<a class="hash-link" href="#upgrade_table" title="Direct link to heading"></a></h3><p>upgrade a hudi table to a specific version.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>to_version</td><td>String</td><td>Y</td><td>None</td><td>Version of hoodie table</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call upgrade_table(table =&gt; &#x27;test_hudi_table&#x27;, to_version =&gt; &#x27;FIVE&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>result</th></tr></thead><tbody><tr><td>true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_y2LR" id="downgrade_table">downgrade_table<a class="hash-link" href="#downgrade_table" title="Direct link to heading"></a></h3><p>downgrade a hudi table to a specific version.</p><p><strong>Input</strong></p><table><thead><tr><th>Parameter Name</th><th>Type</th><th>Required</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>table</td><td>String</td><td>Y</td><td>None</td><td>Hudi table name</td></tr><tr><td>to_version</td><td>String</td><td>Y</td><td>None</td><td>Version of hoodie table</td></tr></tbody></table><p><strong>Output</strong></p><table><thead><tr><th>Output Name</th><th>Type</th></tr></thead><tbody><tr><td>result</td><td>Boolean</td></tr></tbody></table><p><strong>Example</strong></p><div class="codeBlockContainer_J+bg theme-code-block"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#F8F8F2"><span class="token plain">call downgrade_table(table =&gt; &#x27;test_hudi_table&#x27;, to_version =&gt; &#x27;FOUR&#x27;);</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><table><thead><tr><th>result</th></tr></thead><tbody><tr><td>true</td></tr></tbody></table></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/hudi/tree/asf-site/website/versioned_docs/version-0.14.1/procedures.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/sql_queries"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">SQL Queries</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/writing_data"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Writing Data</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#usage" class="table-of-contents__link toc-highlight">Usage</a><ul><li><a href="#help-procedure" class="table-of-contents__link toc-highlight">Help Procedure</a></li></ul></li><li><a href="#commit-management" class="table-of-contents__link toc-highlight">Commit management</a><ul><li><a href="#show_commits" class="table-of-contents__link toc-highlight">show_commits</a></li><li><a href="#show_commits_metadata" class="table-of-contents__link toc-highlight">show_commits_metadata</a></li><li><a href="#show_commit_extra_metadata" class="table-of-contents__link toc-highlight">show_commit_extra_metadata</a></li><li><a href="#show_archived_commits" class="table-of-contents__link toc-highlight">show_archived_commits</a></li><li><a href="#show_archived_commits_metadata" class="table-of-contents__link toc-highlight">show_archived_commits_metadata</a></li><li><a href="#show_commit_files" class="table-of-contents__link toc-highlight">show_commit_files</a></li><li><a href="#show_commit_partitions" class="table-of-contents__link toc-highlight">show_commit_partitions</a></li><li><a href="#show_commit_write_stats" class="table-of-contents__link toc-highlight">show_commit_write_stats</a></li><li><a href="#show_rollbacks" class="table-of-contents__link toc-highlight">show_rollbacks</a></li><li><a href="#show_rollback_detail" class="table-of-contents__link toc-highlight">show_rollback_detail</a></li><li><a href="#commits_compare" class="table-of-contents__link toc-highlight">commits_compare</a></li><li><a href="#archive_commits" class="table-of-contents__link toc-highlight">archive_commits</a></li><li><a href="#export_instants" class="table-of-contents__link toc-highlight">export_instants</a></li><li><a href="#rollback_to_instant" class="table-of-contents__link toc-highlight">rollback_to_instant</a></li><li><a href="#create_savepoint" class="table-of-contents__link toc-highlight">create_savepoint</a></li><li><a href="#show_savepoints" class="table-of-contents__link toc-highlight">show_savepoints</a></li><li><a href="#delete_savepoint" class="table-of-contents__link toc-highlight">delete_savepoint</a></li><li><a href="#rollback_to_savepoint" class="table-of-contents__link toc-highlight">rollback_to_savepoint</a></li><li><a href="#copy_to_temp_view" class="table-of-contents__link toc-highlight">copy_to_temp_view</a></li><li><a href="#copy_to_table" class="table-of-contents__link toc-highlight">copy_to_table</a></li></ul></li><li><a href="#metadata-table-management" class="table-of-contents__link toc-highlight">Metadata Table management</a><ul><li><a href="#create_metadata_table" class="table-of-contents__link toc-highlight">create_metadata_table</a></li><li><a href="#init_metadata_table" class="table-of-contents__link toc-highlight">init_metadata_table</a></li><li><a href="#delete_metadata_table" class="table-of-contents__link toc-highlight">delete_metadata_table</a></li><li><a href="#show_metadata_table_partitions" class="table-of-contents__link toc-highlight">show_metadata_table_partitions</a></li><li><a href="#show_metadata_table_files" class="table-of-contents__link toc-highlight">show_metadata_table_files</a></li><li><a href="#show_metadata_table_stats" class="table-of-contents__link toc-highlight">show_metadata_table_stats</a></li><li><a href="#validate_metadata_table_files" class="table-of-contents__link toc-highlight">validate_metadata_table_files</a></li></ul></li><li><a href="#table-information" class="table-of-contents__link toc-highlight">Table information</a><ul><li><a href="#show_table_properties" class="table-of-contents__link toc-highlight">show_table_properties</a></li><li><a href="#show_fs_path_detail" class="table-of-contents__link toc-highlight">show_fs_path_detail</a></li><li><a href="#stats_file_sizes" class="table-of-contents__link toc-highlight">stats_file_sizes</a></li><li><a href="#stats_wa" class="table-of-contents__link toc-highlight">stats_wa</a></li><li><a href="#show_logfile_records" class="table-of-contents__link toc-highlight">show_logfile_records</a></li><li><a href="#show_logfile_metadata" class="table-of-contents__link toc-highlight">show_logfile_metadata</a></li><li><a href="#show_invalid_parquet" class="table-of-contents__link toc-highlight">show_invalid_parquet</a></li><li><a href="#show_fsview_all" class="table-of-contents__link toc-highlight">show_fsview_all</a></li><li><a href="#show_fsview_latest" class="table-of-contents__link toc-highlight">show_fsview_latest</a></li></ul></li><li><a href="#optimization-table" class="table-of-contents__link toc-highlight">Optimization table</a><ul><li><a href="#run_clustering" class="table-of-contents__link toc-highlight">run_clustering</a></li><li><a href="#show_clustering" class="table-of-contents__link toc-highlight">show_clustering</a></li><li><a href="#run_compaction" class="table-of-contents__link toc-highlight">run_compaction</a></li><li><a href="#show_compaction" class="table-of-contents__link toc-highlight">show_compaction</a></li><li><a href="#run_clean" class="table-of-contents__link toc-highlight">run_clean</a></li><li><a href="#delete_marker" class="table-of-contents__link toc-highlight">delete_marker</a></li><li><a href="#sync_validate" class="table-of-contents__link toc-highlight">sync_validate</a></li><li><a href="#hive_sync" class="table-of-contents__link toc-highlight">hive_sync</a></li><li><a href="#hdfs_parquet_import" class="table-of-contents__link toc-highlight">hdfs_parquet_import</a></li><li><a href="#repair_add_partition_meta" class="table-of-contents__link toc-highlight">repair_add_partition_meta</a></li><li><a href="#repair_corrupted_clean_files" class="table-of-contents__link toc-highlight">repair_corrupted_clean_files</a></li><li><a href="#repair_deduplicate" class="table-of-contents__link toc-highlight">repair_deduplicate</a></li><li><a href="#repair_migrate_partition_meta" class="table-of-contents__link toc-highlight">repair_migrate_partition_meta</a></li><li><a href="#repair_overwrite_hoodie_props" class="table-of-contents__link toc-highlight">repair_overwrite_hoodie_props</a></li></ul></li><li><a href="#bootstrap" class="table-of-contents__link toc-highlight">Bootstrap</a><ul><li><a href="#run_bootstrap" class="table-of-contents__link toc-highlight">run_bootstrap</a></li><li><a href="#show_bootstrap_mapping" class="table-of-contents__link toc-highlight">show_bootstrap_mapping</a></li><li><a href="#show_bootstrap_partitions" class="table-of-contents__link toc-highlight">show_bootstrap_partitions</a></li></ul></li><li><a href="#version-management" class="table-of-contents__link toc-highlight">Version management</a><ul><li><a href="#upgrade_table" class="table-of-contents__link toc-highlight">upgrade_table</a></li><li><a href="#downgrade_table" class="table-of-contents__link toc-highlight">downgrade_table</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">About</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/blog/2021/07/21/streaming-data-lake-platform">Our Vision</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/concepts">Concepts</a></li><li class="footer__item"><a class="footer__link-item" href="/community/team">Team</a></li><li class="footer__item"><a class="footer__link-item" href="/releases/release-0.14.1">Releases</a></li><li class="footer__item"><a class="footer__link-item" href="/releases/download">Download</a></li><li class="footer__item"><a class="footer__link-item" href="/powered-by">Who&#x27;s Using</a></li></ul></div><div class="col footer__col"><div class="footer__title">Learn</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/quick-start-guide">Quick Start</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/docker_demo">Docker Demo</a></li><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a class="footer__link-item" href="/talks">Talks</a></li><li class="footer__item"><a class="footer__link-item" href="/videos">Video Guides</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/faq">FAQ</a></li><li class="footer__item"><a href="https://cwiki.apache.org/confluence/display/HUDI" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Technical Wiki<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Hudi On Cloud</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/s3_hoodie">AWS</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/gcs_hoodie">Google Cloud</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/oss_hoodie">Alibaba Cloud</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/azure_hoodie">Microsoft Azure</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/cos_hoodie">Tencent Cloud</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/ibm_cos_hoodie">IBM Cloud</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/community/get-involved">Get Involved</a></li><li class="footer__item"><a href="https://join.slack.com/t/apache-hudi/shared_invite/zt-2ggm1fub8-_yt4Reu9djwqqVRFC7X49g" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Slack<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://github.com/apache/hudi" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/ApacheHudi" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.youtube.com/channel/UCs7AhE0BWaEPZSChrBR-Muw" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>YouTube<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/company/apache-hudi/?viewAsMember=true" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Linkedin<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:dev-subscribe@hudi.apache.org?Subject=SubscribeToHudi" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mailing List</a></li></ul></div><div class="col footer__col"><div class="footer__title">Apache</div><ul class="footer__items"><li class="footer__item"><a href="https://www.apache.org/events/current-event" target="_blank" rel="noopener noreferrer" class="footer__link-item">Events</a></li><li class="footer__item"><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Thanks</a></li><li class="footer__item"><a href="https://www.apache.org/licenses" target="_blank" rel="noopener noreferrer" class="footer__link-item">License</a></li><li class="footer__item"><a href="https://www.apache.org/security" target="_blank" rel="noopener noreferrer" class="footer__link-item">Security</a></li><li class="footer__item"><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Sponsorship</a></li><li class="footer__item"><a href="https://www.apache.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">Foundation</a></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><a href="https://hudi.apache.org/" target="_blank" rel="noopener noreferrer" class="footerLogoLink_SRtH"><img src="/assets/images/logo-big.png" alt="Apache Hudi™" class="themedImage_TMUO themedImage--light_4Vu1 footer__logo"><img src="/assets/images/logo-big.png" alt="Apache Hudi™" class="themedImage_TMUO themedImage--dark_uzRr footer__logo"></a></div><div class="footer__copyright">Copyright © 2021 <a href="https://apache.org">The Apache Software Foundation</a>, Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0"> Apache License, Version 2.0</a>. <br>Hudi, Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.46626068.js"></script>
<script src="/assets/js/main.19b28340.js"></script>
</body>
</html>