diff --git a/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java b/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java index ac5b8b26..5878a3ed 100644 --- a/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java +++ b/src/main/java/com/socrata/datasync/config/controlfile/ControlFile.java @@ -105,6 +105,11 @@ public static ControlFile generateControlFile(final String fileToPublish, .trimWhitespace(true) .trimServerWhitespace(true) .overrides(new HashMap()); + + // for replace jobs, calculate column statistics + if (PublishMethod.replace.equals(publishMethod)) + ftc.columnStatistics(true); + } if (isCsv) { diff --git a/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java b/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java index 38330d98..6970a36f 100644 --- a/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java +++ b/src/main/java/com/socrata/datasync/config/controlfile/FileTypeControl.java @@ -40,6 +40,7 @@ public class FileTypeControl { public Map syntheticPoints; public Boolean useSocrataGeocoding; public String action; + public Boolean columnStatistics; public FileTypeControl() {} @@ -142,6 +143,7 @@ public Set lookupTimestampFormatting() { public FileTypeControl hasHeaderRow(boolean h) { hasHeaderRow = h; return this;} public FileTypeControl action(String a) { action = a; return this;} -} + + public FileTypeControl columnStatistics(boolean u) { columnStatistics = u; return this; }