deephaven.ImportTools.XmlImport¶
Tools for programmatically executing XML batch imports.
-
class
XmlImportBuilder
(*args, **kwargs)¶ -
build
()¶ Creates an XmlImport object using the properties that have been set in the XmlImport.Builder.
- Returns
(com.illumon.iris.importers.util.XmlImport) A XmlImport object.
-
property
builder
¶ The java builder object.
-
setConstantColumnValue
(constantColumnValue)¶ Sets the value to use for source columns with a sourceType of CONSTANT.
- Parameters
constantColumnValue – java.lang.String
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setDelimiter
(delimiter)¶ - Set the delimiter character used for array data elements. Default is comma.
This can be used to set a different character such as pipe (|), semi-colon (;), or any other single character.
- Parameters
delimiter – char
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setDestinationDirectory
(destinationDirectory)¶ Sets the destination directory.
- Parameters
destinationDirectory – (java.io.File) - destination directory.
- Returns
(ImportBuilder.T) this builder.
-
setDestinationPartitions
(destinationPartitions)¶ Sets the destination partitions
- Overload 1
- param destinationPartitions
(java.lang.String) - destination partitions.
- return
(ImportBuilder.T) this builder.
- Overload 2
- param destinationPartitions
(java.lang.String[]) - destination partitions.
- return
(ImportBuilder.T) this builder.
-
setElementType
(elementType)¶ Sets the name or path of the element that will contain data elements.
- Parameters
elementType – java.lang.String
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setMaxDepth
(maxDepth)¶ - Sets a value indicating, starting from Start Depth, how many levels of element paths to traverse and
concatenate to provide a list that can be selected under Element Name.
- Parameters
maxDepth – int
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setOutputMode
(outputMode)¶ Sets the output mode.
- Overload 1
- param outputMode
(com.illumon.iris.importers.ImportOutputMode) - output mode.
- return
(ImportBuilder.T) this builder.
- Overload 2
- param outputMode
(java.lang.String) - output mode.
- return
(ImportBuilder.T) this builder.
-
setPartitionColumn
(partitionColumn)¶ Sets the partition column.
- Parameters
partitionColumn – (java.lang.String) - partition column.
- Returns
(ImportBuilder.T) this builder.
-
setPositionValues
(positionValues)¶ - Set whether field values within the document will be found by name or by position.
E.g., a value called Price might be contained in an element named Price, or an attribute named Price. When this option is included, field names (column names) will be taken from the table schema, and the data values will be parsed into them by matching the position of the value with the position of column in the schema.
- Parameters
positionValues – boolean
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setSchemaService
(schemaService)¶ Sets the schema service.
- Parameters
schemaService – (com.illumon.iris.db.schema.SchemaService) - schema service.
- Returns
(ImportBuilder.T) this builder.
-
setSourceDirectory
(sourceDirectory)¶ Sets the source directory.
- Overload 1
- param sourceDirectory
(java.io.File) - source directory
- return
(FileImportBuilder.T) this builder
- Overload 2
- param sourceDirectory
(java.lang.String) - source directory
- return
(FileImportBuilder.T) this builder
-
setSourceFile
(sourceFile)¶ Sets the source file.
- Parameters
sourceFile – (java.lang.String) - source file
- Returns
(FileImportBuilder.T) this builder
-
setSourceGlob
(sourceGlob)¶ Sets the source glob.
- Parameters
sourceGlob – (java.lang.String) - source glob
- Returns
(FileImportBuilder.T) this builer
-
setSourceName
(sourceName)¶ Sets the source name.
- Parameters
sourceName – (java.lang.String) - source name.
- Returns
(ImportBuilder.T) this builder.
-
setStartDepth
(startDepth)¶ - Set the value, under the element indicated by Start Index, indication how many levels of first children
to traverse to find an element that contains data to import.
- Parameters
startDepth – int
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setStartIndex
(startIndex)¶ - Set the value starting from the root of the document, of the index (1 being the first top-level element
in the document after the root) of the element under which data can be found.
- Parameters
startIndex – int
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setStrict
(strict)¶ Sets strict checking.
- Parameters
strict – (boolean) - strict.
- Returns
(ImportBuilder.T) this builder.
-
setUseAttributeValues
(useAttributeValues)¶ Sets whether field values will be taken from attribute values. E.g.,
- Parameters
useAttributeValues – boolean
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
setUseElementValues
(useElementValues)¶ Sets whether field values will be taken from element values. E.g., 10.25>
- Parameters
useElementValues – boolean
- Returns
(com.illumon.iris.importers.util.XmlImport.Builder) this builder.
-
-
builder
(namespace, table)¶ - Creates a new XmlImportBuilder object. Method calls on this object can then be used to configure
the import and run it.
- Parameters
namespace – (java.lang.String) - The String name of the namespace into which data will be imported.
table – (java.lang.String) - The String name of the table into which data will be imported.
- Returns
(com.illumon.iris.importers.util.XmlImportBuilder) new XmlImportBuilder object.