
[英]How should records be formatted for AWS Kinesis Firehose to Redshift?
[英]Best way to load 1MM JSON records into AWS Redshift with Kinesis Firehose?
我有一堆 JSON 记录,我想通过 Kinesis Firehose 从 S3 添加到 Amazon Redshift 实例。 它有数百个文件,无论是提供还是获取,每个文件都有大约 1,000 条记录,每个文件看起来像下面的示例。 出于我的目的,我不关心info
条目,至少现在是这样。 我有一个可用的 Kinesis Firehose 服务,它可以使用示例股票代码数据更新我的 Redshift 数据库,所以这部分没问题。 我的问题是(希望这实际上不应该分成两个不同的帖子):
info
放在数据库中并且永远不会触摸它,但如果有理由不这样做,或者比这更清洁的方式,我会很高兴听到它。features
的单个manufacturer
,并且每个manufacturer
可能有几十个features
时,为features
制作单独的数据库表是否有意义,或者我是从 Python dict/Perl hash 的角度来看它是否有意义?当我需要稍后将它们重新连接在一起时,SQL DB 没有意义吗?样本:
{
"info": {
"generated_on": "2022-08-09 19:25:34",
"version": "v1"
},
"manufacturer": [
{
"name": "Audi",
"id": 1,
"num_features": 2,
"features": [
{
"name": "seat heaters",
"standard": "N",
"cost": 100
},
{
"name": "A/C",
"standard": "Y",
"cost": 0
}
]
},
{
"name": "BMW",
"id": 2,
"num_features": 3,
"features": [
{
"name": "seat heaters",
"standard": "Y",
"cost": 0
},
{
"name": "backup camera",
"standard": "N",
"cost": 500
},
{
"name": "A/C",
"standard": "Y",
"cost": 0
}
]
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.