Package com.illumon.iris.pqimport.gui
Class AbstractTestImportQuery
java.lang.Object
com.illumon.iris.db.tables.remotequery.ContextAwareRemoteQuery<Inflatable<Table>>
com.illumon.iris.pqimport.gui.AbstractTestImportQuery
- All Implemented Interfaces:
RemoteQuery<Inflatable<Table>>
,Serializable
- Direct Known Subclasses:
CsvTestImportQuery
,XmlTestImportQuery
Base implementation for CSV and XML preview table implementations that extracts the common logic.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTestImportQuery
(org.jdom2.Element schemaElement, Map<String, Object> typeSpecificFields) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PreviewTableImportTableWriterFactory
doImportAndGetWriterFactory
(com.fishlib.io.logger.Logger logger) Builds an in memory preview table using a temp location and returns the TableWriterFactory to extract the generated table.Execute a query on a remote host.protected String
Returns an implementation specific informative error message when no partitions were generated.getPreviewTable
(com.fishlib.io.logger.Logger logger) Generates and returns an in memory preview table or table stored at a temp location using the provided properties.Methods inherited from class com.illumon.iris.db.tables.remotequery.ContextAwareRemoteQuery
getClient, getLog, getRemoteQueryProcessor, getUserContext, initializeContext, initializeContext, toString
-
Field Details
-
nextSerial
-
schemaElement
protected final org.jdom2.Element schemaElement -
typeSpecificFields
-
-
Constructor Details
-
AbstractTestImportQuery
public AbstractTestImportQuery(org.jdom2.Element schemaElement, Map<String, Object> typeSpecificFields) Constructor.- Parameters:
schemaElement
- The schema element for the import query whose preview table is being generatedtypeSpecificFields
- The type specific fields map object that has all the extracted values from the current import query
-
-
Method Details
-
execute
Description copied from interface:RemoteQuery
Execute a query on a remote host.- Parameters:
database
- database to use for execution.- Returns:
- result of the query.
-
getPreviewTable
Generates and returns an in memory preview table or table stored at a temp location using the provided properties. Delegates the import todoImportAndGetWriterFactory(Logger)
. Returns the table with the partition column- Parameters:
logger
- The (logger) of the current process- Returns:
- The generated preview table instance
-
doImportAndGetWriterFactory
@NotNull protected abstract PreviewTableImportTableWriterFactory doImportAndGetWriterFactory(@NotNull com.fishlib.io.logger.Logger logger) Builds an in memory preview table using a temp location and returns the TableWriterFactory to extract the generated table. Holds the implementation specific logic on building a preview table- Parameters:
logger
- The (logger) of the current process- Returns:
- The table writer factory used in the preview table import
-
getNoDataError
Returns an implementation specific informative error message when no partitions were generated.- Returns:
- error message that no data was found.
-