Class IngesterUtils

java.lang.Object
com.illumon.iris.utils.IngesterUtils

public class IngesterUtils extends Object
Importer utilities required for the Illumon importers
  • Field Details

  • Constructor Details

    • IngesterUtils

      public IngesterUtils(com.fishlib.io.logger.Logger log, String partition)
  • Method Details

    • getFilenameAry

      public String[] getFilenameAry(String serverName, String pattern, boolean isPrefix)
    • getColumnNamesFromSchema

      public static List<String> getColumnNamesFromSchema(org.jdom2.Element sourceElement, @NotNull TableDefinition tableDefinition, boolean includePartitioningColumn)
      Returns a list of column source names from a schema and ImportSource. This is useful for importing from sources that don't include column names in the source data.
      Parameters:
      sourceElement - Optional Schema ImportSource to use when finding alternate source names for table columns.
      tableDefinition - TableDefinition object for the table.
      includePartitioningColumn - Whether to include the partitioning column in the resultant list.
      Returns:
      A list of column names.
    • processNamedOptionalArgs

      public static Map<String,String> processNamedOptionalArgs(@NotNull String[] args, int startIndex, @NotNull String... allowedArgumentKeys)
    • getPreviousTradingDay

      public static String getPreviousTradingDay(String date) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • getDateNDaysPrevious

      public static String getDateNDaysPrevious(String date, int daysprevious)
    • getDateTime

      public static DBDateTime getDateTime(String namespace, String dateString)
    • getDateTime

      public static DBDateTime getDateTime(String dateString)
    • safeGetBoolean

      public static boolean safeGetBoolean(Object o, boolean defaultValue)
    • safeGetInt

      public static int safeGetInt(Object o, int defaultValue)