Hi Yuzhang, Rebuilding the table is the most recommended, as the primary key table and Append are difficult to convert to each other.
Best, Jingsong On Tue, Mar 24, 2026 at 11:37 AM yuzhang qin <[email protected]> wrote: > > Hi Paimon Team, > > I would like to ask about the possibility of adding a primary key to an > existing table in Paimon. > > In our use case, some tables were initially created without a primary key due > to early-stage design limitations. However, as the business evolved, we now > have a clear requirement to define a primary key for these tables. > > Could you please advise on the following: > > Is it currently supported to add a primary key to an existing Paimon table? > If not, what would be the recommended approach to achieve this (e.g., > recreating the table, data migration, or other best practices)? > Are there any potential risks or considerations (such as data consistency or > performance impact) when handling this kind of change? > > Any guidance or suggested best practices would be greatly appreciated. > > Thank you for your time and support. > > Best regards, > Yuzhang
