| Package | Description |
|---|---|
| com.aliyun.odps | |
| com.aliyun.odps.data |
表示Odps任务输入/输出的数据结构,例如TableInfo。
|
| com.aliyun.odps.io |
ODPS中使用的Writable数据类型,目前只有Graph作业需要使用
|
| Modifier and Type | Method and Description |
|---|---|
Column |
Column.ColumnBuilder.build() |
Column |
TableSchema.getColumn(int idx)
获得列信息
|
Column |
TableSchema.getColumn(String name)
取得列对象
|
Column |
TableSchema.getPartitionColumn(int idx) |
Column |
TableSchema.getPartitionColumn(String name)
获得分区列定义
|
| Modifier and Type | Method and Description |
|---|---|
List<Column> |
TableSchema.getAllColumns() |
List<Column> |
TableSchema.getColumns()
获得列定义列表
|
List<Column> |
TableSchema.getPartitionColumns()
获得分区列定义列表
|
| Modifier and Type | Method and Description |
|---|---|
void |
TableSchema.addColumn(Column c)
表增加一列
本方法不用于直接修改 SQL 表结构,适用于执行 MR 作业定义输入列等场景。
|
void |
TableSchema.addPartitionColumn(Column c)
表增加一个分区列
|
TableSchema.Builder |
TableSchema.Builder.withColumn(Column column) |
TableSchema.Builder |
TableSchema.Builder.withPartitionColumn(Column column) |
| Modifier and Type | Method and Description |
|---|---|
void |
TableSchema.setColumns(List<Column> columns) |
void |
TableSchema.setPartitionColumns(ArrayList<Column> partitionColumns) |
TableSchema.Builder |
TableSchema.Builder.withColumns(List<Column> columns) |
| Modifier and Type | Method and Description |
|---|---|
Column[] |
Record.getColumns()
获得记录中包含的所有字段
|
Column[] |
ArrayRecord.getColumns() |
| Constructor and Description |
|---|
ArrayRecord(Column[] columns) |
ArrayRecord(Column[] columns,
boolean strictTypeValidation) |
ArrayRecord(Column[] columns,
boolean strictTypeValidation,
Long fieldMaxSize) |
ArrayRecord(Column[] columns,
Object[] values) |
ArrayRecord(Column[] columns,
Object[] values,
boolean strictTypeValidation) |
| Modifier and Type | Method and Description |
|---|---|
Column |
WritableRecord.getField(int index)
获取列属性.
|
Column[] |
WritableRecord.getFields()
获取所有列属性,不包括分区列(Partition columns)
|
Copyright © 2024 Alibaba Cloud Computing. All rights reserved.