J'ai créé simple table appelé test3redshift amazone copie à l'aide JSON ayant du mal à
create table if not exists test3(
Studies varchar(300) not null,
Series varchar(500) not null
);
J'ai des données JSON
{
"Studies": [{
"studyinstanceuid": "2.16.840.1.114151",
"studydescription": "Some study",
"studydatetime": "2014-10-03 08:36:00"
}],
"Series": [{
"SeriesKey": "abc",
"SeriesInstanceUid": "xyz",
"studyinstanceuid": "2.16.840.1.114151",
"SeriesDateTime": "2014-10-03 09:05:09"
}, {
"SeriesKey": "efg",
"SeriesInstanceUid": "stw",
"studyinstanceuid": "2.16.840.1.114151",
"SeriesDateTime": "0001-01-01 00:00:00"
}],
"ExamKey": "exam-key",
}
et voici mon json_path
{
"jsonpaths": [
"$['Studies']",
"$['Series']"
]
}
deux les données json et le chemin json sont chargés dans s3.
J'essaie d'exécuter la commande de copie suivante dans redshift consule.
copy test3
from 's3://mybucket/redshift_demo/input.json'
credentials 'aws_access_key_id=my_key;aws_secret_access_key=my_access'
json 's3://mybucket/redsift_demo/json_path.json'
Je reçois l'erreur suivante. Quelqu'un peut-il aider s'il vous plaît été bloqué sur cela pour un certain temps maintenant.
Amazon](500310) Invalid operation: Number of jsonpaths and the number of columns should match. JSONPath size: 1, Number of columns in table or column list: 2
Details:
-----------------------------------------------
error: Number of jsonpaths and the number of columns should match. JSONPath size: 1, Number of columns in table or column list: 2
code: 8001
context:
query: 1125432
location: s3_utility.cpp:670
process: padbmaster [pid=83747]
-----------------------------------------------;
1 statement failed.
Temps d'exécution: 1.58s
Le problème avec les informations d'identification et s3 rien à voir avec redshift j'ai pu résoudre ce problème. – balaji