/** * <p> * A list of columns by which the table is partitioned. Only primitive types are supported as partition keys. * </p> * <p> * When creating a table used by Athena, and you do not specify any <code>partitionKeys</code>, you must at least * set the value of <code>partitionKeys</code> to an empty list. For example: * </p> * <p> * <code>"PartitionKeys": []</code> * </p> * * @param partitionKeys * A list of columns by which the table is partitioned. Only primitive types are supported as partition * keys.</p> * <p> * When creating a table used by Athena, and you do not specify any <code>partitionKeys</code>, you must at * least set the value of <code>partitionKeys</code> to an empty list. For example: * </p> * <p> * <code>"PartitionKeys": []</code> * @return Returns a reference to this object so that method calls can be chained together. */ public TableInput withPartitionKeys(java.util.Collection<Column> partitionKeys) { setPartitionKeys(partitionKeys); return this; }
setPartitionKeys(new java.util.ArrayList<Column>(partitionKeys.length));
public static TableInput convertTable(Table table) { TableInput input = new TableInput(); input.setName(table.getTableName()); input.setOwner(table.getOwner()); input.setTableType(table.getTableType()); input.setStorageDescriptor(convertStorage(table.getStorage(), table.getDataColumns())); input.setPartitionKeys(table.getPartitionColumns().stream().map(GlueInputConverter::convertColumn).collect(toList())); input.setParameters(table.getParameters()); table.getViewOriginalText().ifPresent(input::setViewOriginalText); table.getViewExpandedText().ifPresent(input::setViewExpandedText); return input; }
tableInput.setPartitionKeys(new ListUnmarshaller<Column>(ColumnJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * A list of columns by which the table is partitioned. Only primitive types are supported as partition keys. * </p> * <p> * When creating a table used by Athena, and you do not specify any <code>partitionKeys</code>, you must at least * set the value of <code>partitionKeys</code> to an empty list. For example: * </p> * <p> * <code>"PartitionKeys": []</code> * </p> * * @param partitionKeys * A list of columns by which the table is partitioned. Only primitive types are supported as partition * keys.</p> * <p> * When creating a table used by Athena, and you do not specify any <code>partitionKeys</code>, you must at * least set the value of <code>partitionKeys</code> to an empty list. For example: * </p> * <p> * <code>"PartitionKeys": []</code> * @return Returns a reference to this object so that method calls can be chained together. */ public TableInput withPartitionKeys(java.util.Collection<Column> partitionKeys) { setPartitionKeys(partitionKeys); return this; }
setPartitionKeys(new java.util.ArrayList<Column>(partitionKeys.length));
public static TableInput convertTable(Table table) { TableInput input = new TableInput(); input.setName(table.getTableName()); input.setOwner(table.getOwner()); input.setTableType(table.getTableType()); input.setStorageDescriptor(convertStorage(table.getStorage(), table.getDataColumns())); input.setPartitionKeys(table.getPartitionColumns().stream().map(GlueInputConverter::convertColumn).collect(toList())); input.setParameters(table.getParameters()); table.getViewOriginalText().ifPresent(input::setViewOriginalText); table.getViewExpandedText().ifPresent(input::setViewExpandedText); return input; }
tableInput.setPartitionKeys(new ListUnmarshaller<Column>(ColumnJsonUnmarshaller.getInstance()).unmarshall(context));