帮助文档 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
帮助文档 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 表格存储
  4. 开发参考
  5. API参考(数据管理)
  6. DataType定义
  7. TableOptions

TableOptions

  • DataType定义
  • 发布于 2025-04-22
  • 0 次阅读
文档编辑
文档编辑

表示表的可选配置,包括TimeToLive、最大版本数等。

数据结构

message TableOptions {
    optional int32 time_to_live = 1; 
    optional int32 max_versions = 2; 
    optional int64 deviation_cell_version_in_sec = 5; 
    optional bool allow_update = 6;
}

名称

类型

是否必选

描述

time_to_live

int32

否

数据生命周期,即数据的过期时间。当数据的保存时间超过设置的数据生命周期时,系统会自动清理超过数据生命周期的数据。

数据生命周期至少为86400秒(一天)或-1(数据永不过期)。

max_versions

int32

否

最大版本数,即属性列能够保留数据的最大版本个数。当属性列数据的版本个数超过设置的最大版本数时,系统会自动删除较早版本的数据。

deviation_cell_version_in_sec

int64

否

有效版本偏差,即写入数据的时间戳与系统当前时间的偏差允许最大值。只有当写入数据所有列的版本号与写入时时间的差值在数据有效版本偏差范围内,数据才能成功写入。

属性列的有效版本范围为[max{数据写入时间-有效版本偏差,数据写入时间-数据生命周期},数据写入时间+有效版本偏差)。

allow_update

bool

否

是否允许通过UpdateRow更新写入数据。默认值为true,表示允许通过UpdateRow更新写入数据。

当要使用多元索引生命周期功能时,您必须设置此参数为false,即不允许通过UpdateRow更新写入数据。

相关文章

ActionType 2025-04-22 14:32

在GetStreamRecord的响应消息中表示操作类型。 枚举取值列表

Aggregation 2025-04-22 14:32

表示单个统计聚合配置。 数据结构 message Aggregation { optional string name = 1; optional AggregationType type = 2;

AggregationResult 2025-04-22 14:32

表示单个统计聚合Aggregation的返回信息。 数据结构 message AggregationResult { optional string name = 1; optional Aggregatio

Aggregations 2025-04-22 14:32

表示统计聚合配置。 数据结构 message Aggregations { repeated Aggregation aggs = 1; }

AggregationsResult 2025-04-22 14:32

表示统计聚合中Aggregation的返回信息。 数据结构 message AggregationsResult { repeated AggregationResult agg_results = 1; }

AggregationType 2025-04-22 14:32

表示统计聚合类型。 枚举取值列表 AGG_AVG表示求平均值。 AGG_DISTINCT_COUNT表示去重统计行数,

目录
Copyright © 2025 your company All Rights Reserved. Powered by 博智数字服务平台.
闽ICP备08105208号-1