我有一个Hive脚本脚本,可以将数据从DynamoDB移动到S3,
CREATE EXTERNAL TABLE ddb-table (hash_key string, sort_key string, value string)
STORED BY 'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler'
TBLPROPERTIES (
"dynamodb.table.name" = "ddb-table",
"dynamodb.column.mapping" = "hash:hash,range:range,data:data"
);
CREATE EXTERNAL TABLE s3-bucket (hash string, range string, data string)
PARTITIONED BY (hash_key STRING)
LOCATION 's3://some-bucket-name/';
INSERT OVERWRITE TABLE s3-bucket PARTITION (hash_key)
SELECT sort_key string, value string, hash_key string
FROM ddb-table;
但是我想控制文件名格式。我想在{3}中使用hash_key
以及其他值作为文件名前缀。这可能吗?