[JBoss JIRA] (TEIID-4900) Implement limit to / exclude import options
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4900?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4900:
-------------------------------------
Fix Version/s: 10.x
(was: 9.3)
Summary: Implement limit to / exclude import options (was: limit to / exclude import option issues)
Assignee: (was: Steven Hawkins)
> Implement limit to / exclude import options
> -------------------------------------------
>
> Key: TEIID-4900
> URL: https://issues.jboss.org/browse/TEIID-4900
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors, Query Engine
> Affects Versions: 9.2
> Reporter: Steven Hawkins
> Fix For: 10.x
>
>
> TEIID-4899 removed support for LIMIT TO / EXCLUDE since the semantics of LIMIT TO / EXCLUDE does not match the regex base support in several of the translators. Also JDBC does not support a specific include, only exclude.
> There are two options:
> These need to be handled at the engine level as general options instead - and leave the import settings to be importer specific. However that requires generic logic for repairing the metadata should a foreign key or other references be made to an excluded table.
> If they are mapped to translator options then we'll need to translate the table names in the an appropriate regex expression.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4900) limit to / exclude import option issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4900?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4900:
----------------------------------
Description:
TEIID-4899 removed support for LIMIT TO / EXCLUDE since the semantics of LIMIT TO / EXCLUDE does not match the regex base support in several of the translators. Also JDBC does not support a specific include, only exclude.
There are two options:
These need to be handled at the engine level as general options instead - and leave the import settings to be importer specific. However that requires generic logic for repairing the metadata should a foreign key or other references be made to an excluded table.
If they are mapped to translator options then we'll need to translate the table names in the an appropriate regex expression.
was:
The import LIMIT TO option is not implemented by any importer. Mapping to importer.includeTables effectively does nothing.
Also the semantics of exclude does not match the regex based exclusion supported by the jdbc translator.
These need to be handled at the engine level as general options instead - and leave the import settings to be importer specific.
> limit to / exclude import option issues
> ---------------------------------------
>
> Key: TEIID-4900
> URL: https://issues.jboss.org/browse/TEIID-4900
> Project: Teiid
> Issue Type: Sub-task
> Components: Misc. Connectors, Query Engine
> Affects Versions: 9.2
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.x
>
>
> TEIID-4899 removed support for LIMIT TO / EXCLUDE since the semantics of LIMIT TO / EXCLUDE does not match the regex base support in several of the translators. Also JDBC does not support a specific include, only exclude.
> There are two options:
> These need to be handled at the engine level as general options instead - and leave the import settings to be importer specific. However that requires generic logic for repairing the metadata should a foreign key or other references be made to an excluded table.
> If they are mapped to translator options then we'll need to translate the table names in the an appropriate regex expression.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4900) limit to / exclude import option issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4900?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4900:
----------------------------------
Parent: (was: TEIID-4899)
Issue Type: Enhancement (was: Sub-task)
> limit to / exclude import option issues
> ---------------------------------------
>
> Key: TEIID-4900
> URL: https://issues.jboss.org/browse/TEIID-4900
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors, Query Engine
> Affects Versions: 9.2
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.x
>
>
> TEIID-4899 removed support for LIMIT TO / EXCLUDE since the semantics of LIMIT TO / EXCLUDE does not match the regex base support in several of the translators. Also JDBC does not support a specific include, only exclude.
> There are two options:
> These need to be handled at the engine level as general options instead - and leave the import settings to be importer specific. However that requires generic logic for repairing the metadata should a foreign key or other references be made to an excluded table.
> If they are mapped to translator options then we'll need to translate the table names in the an appropriate regex expression.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4899) import foreign schema "import qualifiers" problem
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4899?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4899:
---------------------------------------
After further review TEIID-4900 was captured - we may need to rethink exposing these as options or changing the way they are implemented.
> import foreign schema "import qualifiers" problem
> -------------------------------------------------
>
> Key: TEIID-4899
> URL: https://issues.jboss.org/browse/TEIID-4899
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.3
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 9.3, 9.2.3
>
>
> Hi I'm trying to import a schema but I get an error
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> This results in an error:
> 09:57:34,782 ERROR [org.teiid.RUNTIME] (Worker6) TEIID30021 Uncaught exception processing work: org.teiid.metadata.ParseException: TEIID31259 In the
> statement ending with token ) on line 45 column 1 the ddl is not valid: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:567)
> at org.teiid.runtime.AbstractVDBDeployer.processVDBDDL(AbstractVDBDeployer.java:358)
> at org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:262)
> at org.teiid.jboss.VDBService.access$1000(VDBService.java:82)
> at org.teiid.jboss.VDBService$6.run(VDBService.java:362)
> at org.teiid.jboss.VDBService$7.run(VDBService.java:392)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.teiid.metadata.DuplicateRecordException: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.metadata.Schema.addTable(Schema.java:51)
> at org.teiid.metadata.MetadataFactory.addTable(MetadataFactory.java:179)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:368)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:351)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getTables(JDBCMetdataProcessor.java:324)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(JDBCMetdataProcessor.java:166)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:306)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
> at org.teiid.metadata.MetadataRepository.loadMetadata(MetadataRepository.java:46)
> at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:85)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.runtime.AbstractVDBDeployer$2.importSchema(AbstractVDBDeployer.java:334)
> at org.teiid.query.parser.SQLParser.importSchema(SQLParser.java:15411)
> at org.teiid.query.parser.SQLParser.ddlStmt(SQLParser.java:12641)
> at org.teiid.query.parser.SQLParser.parseMetadata(SQLParser.java:12577)
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:561)
> ... 11 more
> Changing the import statement to only the desired tables results in the same error.
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> LIMIT TO (LABANALYSE,LABANALYSECODE,LABANALYSESERIZIVCODE,LABERROR,LABFMD2ARTS,LABORDER,LABORDER2PRINT,LABPAT,LABPAT2ORDER,LABPRINTERCONFIG, LABPRINTERCONFIG_BACKUP,LABSPECIMEN,LABTITEL)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> Now explicitly stating that this TOAD_PLAN_TABLE should be ignored:
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> EXCEPT (TOAD_PLAN_TABLE)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> results in:
> [standalone@localhost:9990 /] deploy D:\workspaceTeiid\IZ\vdb4-vdb.ddl
> {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jbos
> s.deployment.unit.\"vdb4-vdb.ddl\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"vdb4-vdb.ddl\".PARSE: WFLYSRV015
> 3: Failed to process phase PARSE of deployment \"vdb4-vdb.ddl\"
> Caused by: org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered
> \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLAN_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\"
> Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLA
> N_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\""},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"vdb4-vdb.ddl\".PAR
> SE"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}}}
> Also a small note about the docs:
> In the [example|https://teiid.gitbooks.io/documents/content/v/9.2.x/reference/ddl_deployment_mode.html#import_schema] "LIMIT TO customers, orders" should be "LIMIT TO (customers, orders)".
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4900) limit to / exclude import option issues
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4900:
-------------------------------------
Summary: limit to / exclude import option issues
Key: TEIID-4900
URL: https://issues.jboss.org/browse/TEIID-4900
Project: Teiid
Issue Type: Sub-task
Components: Misc. Connectors, Query Engine
Affects Versions: 9.2
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 9.3
The import LIMIT TO option is not implemented by any importer. Mapping to importer.includeTables effectively does nothing.
Also the semantics of exclude does not match the regex based exclusion supported by the jdbc translator.
These need to be handled at the engine level as general options instead - and leave the import settings to be importer specific.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4885) Costing issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4885?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4885:
----------------------------------
Fix Version/s: 9.2.3
> Costing issues
> --------------
>
> Key: TEIID-4885
> URL: https://issues.jboss.org/browse/TEIID-4885
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.3, 9.2.3
>
>
> There were several deficiencies introduced with TEIID-4332 -
> In some circumstances very low ndv values on the large side of a join would cause a dependent join in an unexpected direction.
> The row estimate derived for a join without ndv information would tend to be too low, which would have a cumulative effect through further joins.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4899) import foreign schema "import qualifiers" problem
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4899?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4899.
-----------------------------------
Resolution: Done
> import foreign schema "import qualifiers" problem
> -------------------------------------------------
>
> Key: TEIID-4899
> URL: https://issues.jboss.org/browse/TEIID-4899
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.3
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 9.3, 9.2.3
>
>
> Hi I'm trying to import a schema but I get an error
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> This results in an error:
> 09:57:34,782 ERROR [org.teiid.RUNTIME] (Worker6) TEIID30021 Uncaught exception processing work: org.teiid.metadata.ParseException: TEIID31259 In the
> statement ending with token ) on line 45 column 1 the ddl is not valid: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:567)
> at org.teiid.runtime.AbstractVDBDeployer.processVDBDDL(AbstractVDBDeployer.java:358)
> at org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:262)
> at org.teiid.jboss.VDBService.access$1000(VDBService.java:82)
> at org.teiid.jboss.VDBService$6.run(VDBService.java:362)
> at org.teiid.jboss.VDBService$7.run(VDBService.java:392)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.teiid.metadata.DuplicateRecordException: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.metadata.Schema.addTable(Schema.java:51)
> at org.teiid.metadata.MetadataFactory.addTable(MetadataFactory.java:179)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:368)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:351)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getTables(JDBCMetdataProcessor.java:324)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(JDBCMetdataProcessor.java:166)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:306)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
> at org.teiid.metadata.MetadataRepository.loadMetadata(MetadataRepository.java:46)
> at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:85)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.runtime.AbstractVDBDeployer$2.importSchema(AbstractVDBDeployer.java:334)
> at org.teiid.query.parser.SQLParser.importSchema(SQLParser.java:15411)
> at org.teiid.query.parser.SQLParser.ddlStmt(SQLParser.java:12641)
> at org.teiid.query.parser.SQLParser.parseMetadata(SQLParser.java:12577)
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:561)
> ... 11 more
> Changing the import statement to only the desired tables results in the same error.
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> LIMIT TO (LABANALYSE,LABANALYSECODE,LABANALYSESERIZIVCODE,LABERROR,LABFMD2ARTS,LABORDER,LABORDER2PRINT,LABPAT,LABPAT2ORDER,LABPRINTERCONFIG, LABPRINTERCONFIG_BACKUP,LABSPECIMEN,LABTITEL)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> Now explicitly stating that this TOAD_PLAN_TABLE should be ignored:
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> EXCEPT (TOAD_PLAN_TABLE)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> results in:
> [standalone@localhost:9990 /] deploy D:\workspaceTeiid\IZ\vdb4-vdb.ddl
> {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jbos
> s.deployment.unit.\"vdb4-vdb.ddl\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"vdb4-vdb.ddl\".PARSE: WFLYSRV015
> 3: Failed to process phase PARSE of deployment \"vdb4-vdb.ddl\"
> Caused by: org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered
> \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLAN_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\"
> Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLA
> N_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\""},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"vdb4-vdb.ddl\".PAR
> SE"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}}}
> Also a small note about the docs:
> In the [example|https://teiid.gitbooks.io/documents/content/v/9.2.x/reference/ddl_deployment_mode.html#import_schema] "LIMIT TO customers, orders" should be "LIMIT TO (customers, orders)".
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4899) import foreign schema "import qualifiers" problem
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4899?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4899:
----------------------------------
Component/s: Query Engine
Fix Version/s: 9.3
9.2.3
Corrected and expanded the ddl logic for 9.3. Updated 9.2.x with the grammar fix.
> import foreign schema "import qualifiers" problem
> -------------------------------------------------
>
> Key: TEIID-4899
> URL: https://issues.jboss.org/browse/TEIID-4899
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.3
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 9.3, 9.2.3
>
>
> Hi I'm trying to import a schema but I get an error
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> This results in an error:
> 09:57:34,782 ERROR [org.teiid.RUNTIME] (Worker6) TEIID30021 Uncaught exception processing work: org.teiid.metadata.ParseException: TEIID31259 In the
> statement ending with token ) on line 45 column 1 the ddl is not valid: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:567)
> at org.teiid.runtime.AbstractVDBDeployer.processVDBDDL(AbstractVDBDeployer.java:358)
> at org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:262)
> at org.teiid.jboss.VDBService.access$1000(VDBService.java:82)
> at org.teiid.jboss.VDBService$6.run(VDBService.java:362)
> at org.teiid.jboss.VDBService$7.run(VDBService.java:392)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.teiid.metadata.DuplicateRecordException: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.metadata.Schema.addTable(Schema.java:51)
> at org.teiid.metadata.MetadataFactory.addTable(MetadataFactory.java:179)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:368)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:351)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getTables(JDBCMetdataProcessor.java:324)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(JDBCMetdataProcessor.java:166)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:306)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
> at org.teiid.metadata.MetadataRepository.loadMetadata(MetadataRepository.java:46)
> at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:85)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.runtime.AbstractVDBDeployer$2.importSchema(AbstractVDBDeployer.java:334)
> at org.teiid.query.parser.SQLParser.importSchema(SQLParser.java:15411)
> at org.teiid.query.parser.SQLParser.ddlStmt(SQLParser.java:12641)
> at org.teiid.query.parser.SQLParser.parseMetadata(SQLParser.java:12577)
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:561)
> ... 11 more
> Changing the import statement to only the desired tables results in the same error.
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> LIMIT TO (LABANALYSE,LABANALYSECODE,LABANALYSESERIZIVCODE,LABERROR,LABFMD2ARTS,LABORDER,LABORDER2PRINT,LABPAT,LABPAT2ORDER,LABPRINTERCONFIG, LABPRINTERCONFIG_BACKUP,LABSPECIMEN,LABTITEL)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> Now explicitly stating that this TOAD_PLAN_TABLE should be ignored:
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> EXCEPT (TOAD_PLAN_TABLE)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> results in:
> [standalone@localhost:9990 /] deploy D:\workspaceTeiid\IZ\vdb4-vdb.ddl
> {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jbos
> s.deployment.unit.\"vdb4-vdb.ddl\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"vdb4-vdb.ddl\".PARSE: WFLYSRV015
> 3: Failed to process phase PARSE of deployment \"vdb4-vdb.ddl\"
> Caused by: org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered
> \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLAN_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\"
> Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLA
> N_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\""},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"vdb4-vdb.ddl\".PAR
> SE"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}}}
> Also a small note about the docs:
> In the [example|https://teiid.gitbooks.io/documents/content/v/9.2.x/reference/ddl_deployment_mode.html#import_schema] "LIMIT TO customers, orders" should be "LIMIT TO (customers, orders)".
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (TEIID-4899) import foreign schema "import qualifiers" problem
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4899?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4899:
---------------------------------------
Yes, there are multiple issues. The first is the grammar is incorrect. The next is the latest refactoring did not reassociate the includes/excludes with the import properties. I'll get that corrected.
> import foreign schema "import qualifiers" problem
> -------------------------------------------------
>
> Key: TEIID-4899
> URL: https://issues.jboss.org/browse/TEIID-4899
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.3
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
>
> Hi I'm trying to import a schema but I get an error
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> This results in an error:
> 09:57:34,782 ERROR [org.teiid.RUNTIME] (Worker6) TEIID30021 Uncaught exception processing work: org.teiid.metadata.ParseException: TEIID31259 In the
> statement ending with token ) on line 45 column 1 the ddl is not valid: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:567)
> at org.teiid.runtime.AbstractVDBDeployer.processVDBDDL(AbstractVDBDeployer.java:358)
> at org.teiid.runtime.AbstractVDBDeployer.metadataLoaded(AbstractVDBDeployer.java:262)
> at org.teiid.jboss.VDBService.access$1000(VDBService.java:82)
> at org.teiid.jboss.VDBService$6.run(VDBService.java:362)
> at org.teiid.jboss.VDBService$7.run(VDBService.java:392)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.teiid.metadata.DuplicateRecordException: TEIID60013 Duplicate Table TOAD_PLAN_TABLE
> at org.teiid.metadata.Schema.addTable(Schema.java:51)
> at org.teiid.metadata.MetadataFactory.addTable(MetadataFactory.java:179)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:368)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:351)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getTables(JDBCMetdataProcessor.java:324)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(JDBCMetdataProcessor.java:166)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:306)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
> at org.teiid.metadata.MetadataRepository.loadMetadata(MetadataRepository.java:46)
> at org.teiid.runtime.AbstractVDBDeployer$MetadataRepositoryWrapper.loadMetadata(AbstractVDBDeployer.java:85)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.runtime.AbstractVDBDeployer$2.importSchema(AbstractVDBDeployer.java:334)
> at org.teiid.query.parser.SQLParser.importSchema(SQLParser.java:15411)
> at org.teiid.query.parser.SQLParser.ddlStmt(SQLParser.java:12641)
> at org.teiid.query.parser.SQLParser.parseMetadata(SQLParser.java:12577)
> at org.teiid.query.parser.QueryParser.parseDDL(QueryParser.java:561)
> ... 11 more
> Changing the import statement to only the desired tables results in the same error.
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> LIMIT TO (LABANALYSE,LABANALYSECODE,LABANALYSESERIZIVCODE,LABERROR,LABFMD2ARTS,LABORDER,LABORDER2PRINT,LABPAT,LABPAT2ORDER,LABPRINTERCONFIG, LABPRINTERCONFIG_BACKUP,LABSPECIMEN,LABTITEL)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> Now explicitly stating that this TOAD_PLAN_TABLE should be ignored:
> {code:sql}
> IMPORT FOREIGN SCHEMA GLIMS
> EXCEPT (TOAD_PLAN_TABLE)
> FROM SERVER glims
> INTO glims
> OPTIONS(
> importer.useFullSchemaName false,
> importer.tableTypes 'TABLE,VIEW'
> );
> {code}
> results in:
> [standalone@localhost:9990 /] deploy D:\workspaceTeiid\IZ\vdb4-vdb.ddl
> {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jbos
> s.deployment.unit.\"vdb4-vdb.ddl\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"vdb4-vdb.ddl\".PARSE: WFLYSRV015
> 3: Failed to process phase PARSE of deployment \"vdb4-vdb.ddl\"
> Caused by: org.teiid.metadata.ParseException: TEIID30386 org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered
> \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLAN_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\"
> Caused by: org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered \"FOREIGN SCHEMA GLIMS [*]EXCEPT[*] (TOAD_PLA
> N_TABLE\" at line 40, column 9.
> Was expecting: \"from\" | \"limit\" | \"(\""},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"vdb4-vdb.ddl\".PAR
> SE"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}}}
> Also a small note about the docs:
> In the [example|https://teiid.gitbooks.io/documents/content/v/9.2.x/reference/ddl_deployment_mode.html#import_schema] "LIMIT TO customers, orders" should be "LIMIT TO (customers, orders)".
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months