public abstract class AbstractElasticSearchDataContext extends QueryPostprocessDataContext implements DataContext, UpdateableDataContext
Modifier and Type | Field and Description |
---|---|
protected List<SimpleTableDef> |
dynamicTableDefinitions |
protected String |
indexName |
protected List<SimpleTableDef> |
staticTableDefinitions |
static org.elasticsearch.common.unit.TimeValue |
TIMEOUT_SCROLL |
INFORMATION_SCHEMA_NAME, SYSTEM_PROPERTY_CREATE_DEFAULT_TABLE_ALIAS
Constructor and Description |
---|
AbstractElasticSearchDataContext(String indexName,
SimpleTableDef... tableDefinitions)
Constructs a
AbstractElasticSearchDataContext . |
Modifier and Type | Method and Description |
---|---|
protected abstract SimpleTableDef[] |
detectSchema()
Performs an analysis of the available indexes in an ElasticSearch
cluster instance and detects the elasticsearch types structure
based on the metadata provided by the ElasticSearch java client.
|
String |
getIndexName()
Gets the name of the index that this
DataContext is working on. |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
protected boolean |
limitMaxRowsIsSet(int maxRows) |
protected static SimpleTableDef[] |
sortTables(List<SimpleTableDef> result) |
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTableSelect, materializeTable
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemas
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeUpdate
compileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemas
public static final org.elasticsearch.common.unit.TimeValue TIMEOUT_SCROLL
protected final String indexName
protected final List<SimpleTableDef> staticTableDefinitions
protected final List<SimpleTableDef> dynamicTableDefinitions
public AbstractElasticSearchDataContext(String indexName, SimpleTableDef... tableDefinitions)
AbstractElasticSearchDataContext
. This constructor
accepts a custom array of SimpleTableDef
s which allows the user
to define his own view on the indexes in the engine.indexName
- the name of the ElasticSearch index to representtableDefinitions
- an array of SimpleTableDef
s, which define the table
and column model of the ElasticSearch index.protected abstract SimpleTableDef[] detectSchema()
protected Schema getMainSchema() throws MetaModelException
getMainSchema
in class QueryPostprocessDataContext
MetaModelException
protected String getMainSchemaName() throws MetaModelException
getMainSchemaName
in class QueryPostprocessDataContext
MetaModelException
public String getIndexName()
DataContext
is working on.protected boolean limitMaxRowsIsSet(int maxRows)
protected static SimpleTableDef[] sortTables(List<SimpleTableDef> result)
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.