Skip to content

Commit

Permalink
[HIVE] Validate field extraction
Browse files Browse the repository at this point in the history
Double check JSON input (which has a different schema)

Relates #259

(cherry picked from commit e479bc2)
  • Loading branch information
costin committed Oct 3, 2014
1 parent 21b9841 commit 36e4621
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -65,7 +65,7 @@ public void processField(Settings settings, String fl) {
// replace column name with _colX (which is what Hive uses during serialization)
fieldName = columnNames.get(getFieldName().toLowerCase(Locale.ENGLISH));

if (!StringUtils.hasText(fieldName)) {
if (!settings.getInputAsJson() && !StringUtils.hasText(fieldName)) {
throw new EsHadoopIllegalArgumentException(
String.format(
"Cannot find field [%s] in mapping %s ; maybe a value was specified without '<','>' or there is a typo?",
Expand Down

0 comments on commit 36e4621

Please sign in to comment.