You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've compiled a list of gotchas that I've discovered while trying to make COPY command work.
Command keywords must be all capital letters (e.g. COPY, FROM, etc.) while parameter values' casing matches the AWS doc (e.g. aws_access_key_id). Note that AWS allows entire command to be lowercase.
JSON or FORMAT JSON or FORMAT AS JSON must go directly after CREDENTIALS and before any other additional parameters, e.g. TIMEFORMAT, otherwise JSON format is ignored and treated as CSV. This is not the case with AWS, the order is mostly irrelevant.
The UTF-16 encoding is not recognized and not supported.
You have to have your JSON data to be placed in the file as one JSON object per line, e.g.:
{"key":val}
{"key":val}
you cannot use, supported by AWS, pretty printed form of JSON as in:
{
"key":val
}
{
"key":val
}
The JSONPaths file must be written all in one line as:
{ "jsonpaths": [ "$['p1']", "$['p2']", ... ]}
You cannot have your data and your jsonpaths file located under the same prefix of the S3 path, e.g.:
I've compiled a list of gotchas that I've discovered while trying to make COPY command work.
you cannot use, supported by AWS, pretty printed form of JSON as in:
This will read your jsonpaths as data.
I hope it will help folks using this JDBC driver as well as the author, to make some improvements.
The text was updated successfully, but these errors were encountered: