public class JsonDataContext extends QueryPostprocessDataContext implements DocumentSourceProvider
DataContext implementation that works on JSON files or
Resources.INFORMATION_SCHEMA_NAME, SYSTEM_PROPERTY_CREATE_DEFAULT_TABLE_ALIAS| Constructor and Description |
|---|
JsonDataContext(File file) |
JsonDataContext(Resource resource) |
JsonDataContext(Resource resource,
SchemaBuilder schemaBuilder) |
| Modifier and Type | Method and Description |
|---|---|
DocumentSource |
getDocumentSourceForTable(String sourceCollectionName)
Gets a
DocumentSource for a particular source collection. |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
DocumentSource |
getMixedDocumentSourceForSampling()
Gets a
DocumentSource containing documents of mixed origin and
type. |
protected DataSet |
materializeMainSchemaTable(Table table,
List<Column> columns,
int maxRows)
Executes a simple one-table query against a table in the main schema of the subclasses of this class.
|
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTableSelect, materializeTablecompileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemaspublic JsonDataContext(File file)
public JsonDataContext(Resource resource)
public JsonDataContext(Resource resource, SchemaBuilder schemaBuilder)
protected Schema getMainSchema() throws MetaModelException
getMainSchema in class QueryPostprocessDataContextMetaModelExceptionprotected String getMainSchemaName() throws MetaModelException
getMainSchemaName in class QueryPostprocessDataContextMetaModelExceptionprotected DataSet materializeMainSchemaTable(Table table, List<Column> columns, int maxRows)
QueryPostprocessDataContextmaterializeMainSchemaTable in class QueryPostprocessDataContexttable - the table to querycolumns - the columns of the table to querymaxRows - the maximum amount of rows needed or -1 if all rows are wanted.public DocumentSource getMixedDocumentSourceForSampling()
DocumentSourceProviderDocumentSource containing documents of mixed origin and
type.getMixedDocumentSourceForSampling in interface DocumentSourceProviderpublic DocumentSource getDocumentSourceForTable(String sourceCollectionName)
DocumentSourceProviderDocumentSource for a particular source collection. See
Document.getSourceCollectionName().getDocumentSourceForTable in interface DocumentSourceProviderCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.