环境信息:
- nebula 版本:v1.2.0
- 部署方式:docker-compose
- nebula exchange:v1.1.0
问题的具体描述:导入 Hive 表数据,bigint 类型的字段无法映射到 nebula graph 里 timestamp 类型的字段。
Hive 表:
CREATE TABLE `job_demo`(
`task_id` string,
`start_time` bigint)
PARTITIONED BY (
`dt` string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\u0001'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
LOCATION
'hdfs://.....'
TBLPROPERTIES (
'transient_lastDdlTime'='1612084522')
Hive 数据预览
Nebula Graph
nebula exchange config 中字段的映射关系
# Processing tags
tags: [
# Loading from Hive
{
name: job
type: {
source: hive
sink: client
}
exec: "select task_id, start_time from job_demo where dt='20210121'"
fields: [task_id, start_time]
nebula.fields: [job_oid, start_time]
vertex: {
field: task_id
policy: "hash"
}
batch: 1024
partition: 32
isImplicit: true
}
]
查询不到插入的记录:以上述 hive 数据预览截图的第一条数据为例