Class SchemaFromCsv

java.lang.Object
com.illumon.iris.db.util.schemas.SchemaFromCsv

public class SchemaFromCsv extends Object
A utility to read CSV files of table metadata and create schemas based on them. The CSV must contain columns specifying column names and data types, similar to the Table produced by Table.view()
  • Constructor Details

    • SchemaFromCsv

      public SchemaFromCsv()
  • Method Details

    • main

      public static void main(String[] args) throws org.apache.commons.cli.ParseException, IOException
      Throws:
      org.apache.commons.cli.ParseException
      IOException
    • createAndWriteSchemas

      public static void createAndWriteSchemas(Stream<SchemaDescriptor> schemas, File outDirectory) throws IOException
      Throws:
      IOException
    • getLoggerPathAddition

      public static String getLoggerPathAddition(String prefix)
    • getStructPathAddition

      public static String getStructPathAddition(String prefix)
    • generateSchemaString

      public static String generateSchemaString(SchemaDescriptor schema)
      Creates a String of Table schema XML with partitioning and merge information.
      Parameters:
      schema - A SchemaDescriptor that represents the layout of a Deephaven Table
      Returns:
      A string of XML that can be used for a .schema file for the Table
    • generateSchemaElement

      public static org.jdom2.Document generateSchemaElement(SchemaDescriptor schema)