|
@@ -51,7 +51,7 @@
|
|
|
{ equals { "${field['name']}" : [] } }
|
|
{ equals { "${field['name']}" : [] } }
|
|
|
]
|
|
]
|
|
|
then : [
|
|
then : [
|
|
|
- { logTrace { format : "Ignoring record because it has no ${field['name']}: {}", args : ["@{}"] } }
|
|
|
|
|
|
|
+ { logInfo { format : "Ignoring record because it has no ${field['name']}: {}", args : ["@{}"] } }
|
|
|
{ dropRecord {} }
|
|
{ dropRecord {} }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
@@ -63,10 +63,21 @@
|
|
|
% for field in fields:
|
|
% for field in fields:
|
|
|
%if field["type"] == 'date':
|
|
%if field["type"] == 'date':
|
|
|
{
|
|
{
|
|
|
- convertTimestamp {
|
|
|
|
|
- field : ${field['name']}
|
|
|
|
|
- outputFormat : "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
|
|
|
|
|
- outputTimezone : UTC
|
|
|
|
|
|
|
+ if {
|
|
|
|
|
+ conditions : [
|
|
|
|
|
+ {
|
|
|
|
|
+ convertTimestamp {
|
|
|
|
|
+ field : ${field['name']}
|
|
|
|
|
+ outputFormat : "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
|
|
|
|
|
+ outputTimezone : UTC
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ then : []
|
|
|
|
|
+ else : [
|
|
|
|
|
+ { logInfo { format : "Ignoring record due to invalid date for ${field['name']}: {}", args : ["@{}"] } }
|
|
|
|
|
+ { dropRecord {} }
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
%endif
|
|
%endif
|
|
@@ -99,13 +110,13 @@
|
|
|
]
|
|
]
|
|
|
then : []
|
|
then : []
|
|
|
else : [
|
|
else : [
|
|
|
- { logTrace { format : "Ignoring record due to incorrect type for ${field['name']}: {}", args : ["@{}"] } }
|
|
|
|
|
|
|
+ { logInfo { format : "Ignoring record due to incorrect type for ${field['name']}: {}", args : ["@{}"] } }
|
|
|
{ dropRecord {} }
|
|
{ dropRecord {} }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
%else:
|
|
%else:
|
|
|
- { logTrace { format : "Ignoring record due to incorrect type for ${field['name']}: {}", args : ["@{}"] } }
|
|
|
|
|
|
|
+ { logInfo { format : "Ignoring record due to incorrect type for ${field['name']}: {}", args : ["@{}"] } }
|
|
|
{ dropRecord {} }
|
|
{ dropRecord {} }
|
|
|
%endif
|
|
%endif
|
|
|
]
|
|
]
|
|
@@ -120,4 +131,4 @@
|
|
|
# Location from which to fetch Solr schema
|
|
# Location from which to fetch Solr schema
|
|
|
solrLocator : <%text>${SOLR_LOCATOR}</%text>
|
|
solrLocator : <%text>${SOLR_LOCATOR}</%text>
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|