全景图:

用puthivestreaming把hdfs里的数据流到hive表

 

1. 创建hive表

CREATE TABLE IF NOT EXISTS newsinfo.test(
  name STRING
)
CLUSTERED BY (name)INTO 3 BUCKETS
ROW FORMAT DELIMITED
STORED AS ORC
TBLPROPERTIES('transactional'='true');
 

2. 这里用了 ReplaceText 生成 json 数据 (正式环境可以直接从hfs里取到)

用puthivestreaming把hdfs里的数据流到hive表

 

3. 用ConvertJSONToAvro 转换json 到avro

用puthivestreaming把hdfs里的数据流到hive表

{ "name": "dtu", "type": "record", "fields":[ { "name":"name","type": "string" } ] }

 

 

4. PutHiveStreaming

用puthivestreaming把hdfs里的数据流到hive表

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-02-09
  • 2021-11-20
  • 2022-12-23
  • 2021-12-05
  • 2021-09-28
猜你喜欢
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2021-09-22
相关资源
相似解决方案