public class SqlflowShardedSQLEnv extends TSQLEnv
Parses catalog.json files from the sharded export format, loading metadata including tables, views, columns, and synonyms. Supports different database topologies based on the manifest configuration.
The sharded format structure:
manifest.json catalog/<shardId>.catalog.json source/<shardId>.source.jsonl index/<shardId>.source.idx
TSQLEnv.InvalidNameFormExceptioncatalogCollationCaseSensitive, columnCollationCaseSensitive, DEFAULT_DB_NAME, DEFAULT_SCHEMA_NAME, DEFAULT_SERVER_NAME, defaultCollationCaseSensitive, functionCollationCaseSensitive, isAliasReferenceForbidden, SNOWFLAKE_SCHEMA_AFTER_DATABASE_SWITCH, tableCollationCaseSensitive| Constructor and Description |
|---|
SqlflowShardedSQLEnv(String defaultServer,
String defaultDatabase,
String defaultSchema,
EDbVendor dbVendor,
Map server,
String baseDir)
Constructor with explicit base directory for catalog files.
|
SqlflowShardedSQLEnv(String defaultServer,
String defaultDatabase,
String defaultSchema,
EDbVendor dbVendor,
Map server,
String baseDir,
IdentifierInputForm nameForm) |
SqlflowShardedSQLEnv(String defaultServer,
String defaultDatabase,
String defaultSchema,
EDbVendor dbVendor,
Map server,
String baseDir,
IdentifierInputForm nameForm,
IdentifierProfile identifierProfile)
Same input, analyzed under an explicit identifier configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initSQLEnv()
This method must be override in the subclass to build a SQL environment with real metadata.
|
addFunction, addFunction, addOraclePackage, addProcedure, addSQLRoutine, addTable, addTrigger, addView, columnInTable, compareColumn, compareColumn, compareIdentifier, compareIdentifier, compareIdentifier, compareQualifiedColumn, compareQualifiedTable, compareTable, compareTable, copy, createSQLCatalog, createSQLSchema, delimitedChar, doAddCatalog, doAddSchemaObject, doAddSchemaObject, doSearchSchemaObject, endsWithDelimitedIdentifier, findSchemaAfterDatabaseSwitch, getAFullQualifiedSchemaObjectName, getCatalogList, getCatalogProvider, getCatalogStore, getColumnInTable, getColumnsInTable, getDatabaseName, getDatabaseName, getDBVendor, getDefaultCatalogName, getDefaultSchemaName, getDefaultServerName, getIdentifierProfile, getIdentifierService, getNumberOfTables, getObjectName, getObjectName, getProcedureParameterPresets, getProcedureParameterValue, getProcedureParameterValue, getSchemaName, getSchemaName, getSQLCatalog, getSQLSchema, getStmtSeparatorChar, getVariableValue, hasCatalogMetadata, hasParameterPresets, isAliasOccludingColumn, isAliasVisibleInHaving, isDelimitedIdentifier, isDelimitedIdentifier, isEnableGetMetadataFromDDL, isHavingAliasOutrankingUngroupedColumn, matchSubObjectNameToWhole, normalizeIdentifier, normalizeIdentifier, parseNameForm, putSchemaObject, qualifyForPresets, requireSqlLexicalNameForm, searchCatalog, searchFunction, searchFunction, searchSchemaObject, searchSchemaObject, searchTable, searchTable, setCatalogProviderForCompatibility, setDefaultCatalogName, setDefaultSchemaName, setDefaultServerName, setEnableGetMetadataFromDDL, setProcedureParameterValue, setProcedureParameterValue, supportCatalog, supportSchema, toLexical, toLexical, toStringpublic SqlflowShardedSQLEnv(String defaultServer, String defaultDatabase, String defaultSchema, EDbVendor dbVendor, Map server, String baseDir)
defaultServer - default server namedefaultDatabase - default database namedefaultSchema - default schema namedbVendor - database vendorserver - server configuration from manifestbaseDir - base directory containing catalog/, source/, index/ subdirectoriespublic SqlflowShardedSQLEnv(String defaultServer, String defaultDatabase, String defaultSchema, EDbVendor dbVendor, Map server, String baseDir, IdentifierInputForm nameForm)
nameForm - how the manifest and its catalog shards write object names: as SQL text
("Amount", the exporter's form and the default) or as the names the
database catalog holds (Amount). Declared once, at the manifest
root, as nameForm. See TSQLEnv.toLexical(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.sqlenv.ESQLDataObjectType, java.lang.String, gudusoft.gsqlparser.sqlenv.IdentifierInputForm).public SqlflowShardedSQLEnv(String defaultServer, String defaultDatabase, String defaultSchema, EDbVendor dbVendor, Map server, String baseDir, IdentifierInputForm nameForm, IdentifierProfile identifierProfile)
The metadata this environment registers is indexed with identifierProfile, so the
analysis that reads it back asks the catalog the same question it was filled with. A profile
belonging to another vendor is not applied (IdentifierProfile.forVendorOr(gudusoft.gsqlparser.sqlenv.IdentifierProfile, gudusoft.gsqlparser.EDbVendor)); null means
the vendor default.
public void initSQLEnv()
TSQLEnvinitSQLEnv in class TSQLEnv