开发者社区> 问答> 正文

java调用api创建分区报错语法错误

调用odps-sdk-core包 PartitionSpec partionSpec =new PartitionSpec(“fq_day='20190318'”);
table.hasPartition(partitionSpec);
报错Invalid name:null
调用table.createPartition(partitionSpec)报错:com.aliyun.odps.NoSuchObjectExpection:ODPS-0130161:Parse exception - line 1:12 mismatched input 'null' expecting Identifier near 'TABLE' in table name

展开
收起
davichi 2019-03-18 17:15:07 2436 0
1 条回答
写回答
取消 提交回答
  • PartitionSpec partionSpec =new PartitionSpec(“fq_day='20190318'”);
    这个只是新建了一个分区对象。
    你需要调用 table.createPartition(partionSpec)才能完成分区的创建。

    2019-07-17 23:31:14
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载