Class ImportQueryHelpers

java.lang.Object
io.deephaven.importers.ImportQueryHelpers

public class ImportQueryHelpers extends Object
Helper methods for Import Queries.
  • Constructor Details

    • ImportQueryHelpers

      public ImportQueryHelpers()
  • Method Details

    • getFileListFromFields

      public static List<File> getFileListFromFields(String columnPartitionValue, String partitionSubstitution, String substitutionDateFormat, String sourceFile, String sourceGlob, String sourceDirectory)
      Get the list of files to import based on the provided fields, performing any necessary substitutions.
      Parameters:
      columnPartitionValue - the partition value to use for substitution
      partitionSubstitution - the string to be replaced in sourceFile, sourceGlob, and sourceDirectory
      substitutionDateFormat - the date format to use when formatting the partition value, if applicable
      sourceFile - the source file name (before substitution)
      sourceGlob - the source glob pattern (before substitution)
      sourceDirectory - the source directory (before substitution)
      Returns:
      the list of files to import
    • getColumnNamesFromSchema

      public static List<String> getColumnNamesFromSchema(io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.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.