Modifying a Table
Function
Modify a table object using KuduClient.alterTable(String name, AlterTableOptions ato).
Sample Code
The code snippet for writing data is as follows:
// Alter the table, adding a column with a default value. // Note: after altering the table, the table needs to be re-opened. AlterTableOptions ato = new AlterTableOptions(); ato.addColumn("added", org.apache.kudu.Type.DOUBLE, DEFAULT_DOUBLE); client.alterTable(tableName, ato);
In the sample code, AlterTableOptions is the set of table attributes to be modified. In the example, a column is added to the table.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot