[JBoss JIRA] (TEIIDDES-2746) Dynamic VDB export and import set bigdecimal precision to 20 if not defined and should be 0
by Debbie Steigner (JIRA)
Debbie Steigner created TEIIDDES-2746:
-----------------------------------------
Summary: Dynamic VDB export and import set bigdecimal precision to 20 if not defined and should be 0
Key: TEIIDDES-2746
URL: https://issues.jboss.org/browse/TEIIDDES-2746
Project: Teiid Designer
Issue Type: Bug
Components: Dynamic VDBs
Affects Versions: 9.2
Reporter: Debbie Steigner
Assignee: Barry LaFond
Import vdb-xml into Teiid vdb: attribute with bigdecimal type (without precision) gets converted into bigdecimal(20) type (with precision=20), expected bigdecimal type
and
Export teiid-vdb to vdb-xml: attribute with bigdecimal type (without precision) gets converted into bigdecimal(20) type (with precision=20), expected bigdecimal type
If no precision is specified default to 0.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2414) Large transformation SQL is not exported to INDEX file.
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2414?page=com.atlassian.jira.plu... ]
Steven Hawkins commented on TEIIDDES-2414:
------------------------------------------
Just wanted to check what was the resolution here - are there any actions we need to take on the Teiid side?
> Large transformation SQL is not exported to INDEX file.
> -------------------------------------------------------
>
> Key: TEIIDDES-2414
> URL: https://issues.jboss.org/browse/TEIIDDES-2414
> Project: Teiid Designer
> Issue Type: Bug
> Components: Import/Export, Patch Release
> Affects Versions: 8.3.4
> Reporter: Hisanobu Okuda
> Assignee: Paul Richardson
> Fix For: 9.2.1
>
> Attachments: reosurce-problem-marker.png, test.csv
>
>
> A large transformation SQL of a view model is not exported to INDEX file.
> I have a large transformation SQL > 8192 bytes in my view model. TDesigner fails to convert the xmi to XXXXXXXXXX.INDEX file. There is no transformation SQL in the INDEX file, therefore, deploying my vdb fails and the vdb is inactivated. When you deploy the vdb, you can see the following message in a log file:-
> {code}
> 17:16:11,632 WARN [org.teiid.PLANNER.RESOLVER] (teiid-async-threads - 2) TEIID31079 View ViewModel.new_table is not defined by a query expression.
> 17:16:11,636 INFO [org.teiid.RUNTIME] (teiid-async-threads - 2) TEIID40073 The metadata for the VDB test.1 is loaded, however it is not valid. Check models for errors. Correct the metadata and re-deploy.
> 17:16:11,637 INFO [org.teiid.RUNTIME] (teiid-async-threads - 2) TEIID40003 VDB test.1 is set to FAILED
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2710) WS Create Operation Wizard - Creating a method with no input message
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2710?page=com.atlassian.jira.plu... ]
Barry LaFond updated TEIIDDES-2710:
-----------------------------------
Attachment: create-operation-dialog.png
> WS Create Operation Wizard - Creating a method with no input message
> --------------------------------------------------------------------
>
> Key: TEIIDDES-2710
> URL: https://issues.jboss.org/browse/TEIIDDES-2710
> Project: Teiid Designer
> Issue Type: Bug
> Components: Patch Release, Web Services Support
> Affects Versions: 9.0.4
> Reporter: Matus Makovy
> Assignee: Barry LaFond
> Fix For: 9.2.1
>
> Attachments: create-operation-dialog.png
>
>
> Coppied from BZ:
> Description of problem:
> Web service model , create operation model does not allow to create operations without input or output. Indeed it's possible to ignore warning messages and create the operation anyway. In that case wizard puts nameless and typeless messages in the schema and requires removing messages from the schema with an alternate editor.
> Version-Release number of selected component (if applicable):
>
> TD 9.0.3.Finalv2015
> How reproducible:
> Try to create a new operation in web service model
> Steps to Reproduce:
> 1. Pick one the interfaces that you have in wsdl
> 2. Create a new operation, give it a name
> 3. Try to get rid of input message, remove it's name and create
> Actual results:
> Malformed view schema
> Expected results:
> create the operation without the undesired message type
> Additional info:
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2710) WS Create Operation Wizard - Creating a method with no input message
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2710?page=com.atlassian.jira.plu... ]
Barry LaFond resolved TEIIDDES-2710.
------------------------------------
Resolution: Done
master: https://github.com/Teiid-Designer/teiid-designer/commit/6971fc8e6c454df41...
> WS Create Operation Wizard - Creating a method with no input message
> --------------------------------------------------------------------
>
> Key: TEIIDDES-2710
> URL: https://issues.jboss.org/browse/TEIIDDES-2710
> Project: Teiid Designer
> Issue Type: Bug
> Components: Patch Release, Web Services Support
> Affects Versions: 9.0.4
> Reporter: Matus Makovy
> Assignee: Barry LaFond
> Fix For: 9.2.1
>
> Attachments: create-operation-dialog.png
>
>
> Coppied from BZ:
> Description of problem:
> Web service model , create operation model does not allow to create operations without input or output. Indeed it's possible to ignore warning messages and create the operation anyway. In that case wizard puts nameless and typeless messages in the schema and requires removing messages from the schema with an alternate editor.
> Version-Release number of selected component (if applicable):
>
> TD 9.0.3.Finalv2015
> How reproducible:
> Try to create a new operation in web service model
> Steps to Reproduce:
> 1. Pick one the interfaces that you have in wsdl
> 2. Create a new operation, give it a name
> 3. Try to get rid of input message, remove it's name and create
> Actual results:
> Malformed view schema
> Expected results:
> create the operation without the undesired message type
> Additional info:
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2698) REST procedure in generated dynamic VDB does not work
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2698?page=com.atlassian.jira.plu... ]
Barry LaFond resolved TEIIDDES-2698.
------------------------------------
Resolution: Done
https://github.com/Teiid-Designer/teiid-designer/commit/76b3870d94cdb2f90...
> REST procedure in generated dynamic VDB does not work
> -----------------------------------------------------
>
> Key: TEIIDDES-2698
> URL: https://issues.jboss.org/browse/TEIIDDES-2698
> Project: Teiid Designer
> Issue Type: Bug
> Components: Dynamic VDBs, Extension Framework, VDB & Execution
> Affects Versions: 9.0.4
> Reporter: Andrej Šmigala
> Assignee: Mark Drilling
> Fix For: 9.2.1
>
> Attachments: DynamicProcedureProject.zip
>
>
> When a VDB containing view model with a REST procedure is exported as a dynamic VDB, the resulting autogenrated WAR does not work. This is because the generated DDL does not contain the OPTIONS clause with REST properties, nor does it contain the required SET NAMESPACE statement
> Generated DDL:
> {code:sql}
> CREATE VIRTUAL PROCEDURE testProc (p1 string(4000))
> AS
> BEGIN
> SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1, 'elem2' AS elem2)) AS xml_out;
> END;
> {code}
> Expected DDL (note that this also incorporates TEIIDDES-2697):
> {code:sql}
> SET NAMESPACE 'http://teiid.org/rest' AS REST;
> CREATE VIRTUAL PROCEDURE testProc (p1 string(4000)) RETURNS TABLE (xml_out xml) OPTIONS ("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
> AS
> BEGIN
> SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1, 'elem2' AS elem2)) AS xml_out;
> END;
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2738) REST procedure not imported correctly from dynamic VDB
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2738?page=com.atlassian.jira.plu... ]
Barry LaFond resolved TEIIDDES-2738.
------------------------------------
Resolution: Done
master: https://github.com/Teiid-Designer/teiid-designer/commit/76b3870d94cdb2f90...
> REST procedure not imported correctly from dynamic VDB
> -------------------------------------------------------
>
> Key: TEIIDDES-2738
> URL: https://issues.jboss.org/browse/TEIIDDES-2738
> Project: Teiid Designer
> Issue Type: Bug
> Components: Import/Export, Patch Release, VDB & Execution
> Affects Versions: 9.0.4
> Reporter: Andrej Šmigala
> Assignee: Barry LaFond
> Fix For: 9.2.1
>
>
> When importing a dynamic VDB with REST procedure, the created procedure does not have the REST options set.
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <vdb name="RestProcedureVdbDynamic" version="1">
> <description />
> <property name="{http://teiid.org/rest}auto-generate" value="true" />
> <model name="ProcedureModel" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> SET NAMESPACE 'http://teiid.org/rest' AS REST;
> CREATE VIRTUAL PROCEDURE testProc (p1 string(4000)) RETURNS TABLE (xml_out xml) OPTIONS ("REST:METHOD" 'GET', "REST:URI" 'test/{p1}')
> AS
> BEGIN
> SELECT XMLELEMENT(NAME test, XMLFOREST(ProcedureModel.testProc.p1 AS elem1, 'elem2' AS elem2)) AS xml_out;
> END;
> ]]></metadata>
> </model>
> </vdb>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2745) Extension properties not imported from dynamic VDB
by Andrej Šmigala (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2745?page=com.atlassian.jira.plu... ]
Andrej Šmigala updated TEIIDDES-2745:
-------------------------------------
Description:
When importing a dynamic VDB containing models with extension properties, the properties are not imported.
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<vdb name="MatViewsVdb" version="1">
<description>For testing of materialized views</description>
<model name="Source">
<source name="Source" translator-name="h2-override"
connection-jndi-name="java:/mat-views-ds" />
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE customers (
id integer,
name string(4000),
address string(4000),
CONSTRAINT PK_ID PRIMARY KEY(id)
) OPTIONS(NAMEINSOURCE 'customer')
CREATE FOREIGN TABLE orders (
id integer,
customer_id integer,
amount integer,
CONSTRAINT PK_ID PRIMARY KEY(id),
CONSTRAINT FK_CUST FOREIGN KEY(customer_id) REFERENCES customers(id)
) OPTIONS(NAMEINSOURCE 'order')
]]>
</metadata>
</model>
<!-- TODO: change the CONVERTs to integer once TEIIDDES-2737 is resolved -->
<model name="ViewModel" type="VIRTUAL">
<metadata type="DDL"><![CDATA[
CREATE VIEW internal_short_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,before_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE before_load=before_load+1;'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,after_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE after_load=after_load+1;'')'
)
AS /*+ cache(ttl:100)*/SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
CREATE VIEW internal_long_ttl (
customer_id integer PRIMARY KEY,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE')
AS /*+ cache(ttl:1000 updatable)*/ SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
CREATE VIEW external_long_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
MATERIALIZED_TABLE 'Source.DB.PUBLIC.MAT_VIEW',
"teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
"teiid_rel:MATVIEW_STATUS_TABLE" 'Source.DB.PUBLIC.STATUS',
"teiid_rel:ON_VDB_START_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_create) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_create from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:ON_VDB_DROP_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_drop) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_drop from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO mat_view_stage(customer_id,total_amount) SELECT c.id AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''truncate table mat_view_stage'');exec Source.native(''MERGE INTO check_table(id,before_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT before_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''ALTER TABLE mat_view_stage RENAME TO mat_view_temp'');exec Source.native(''ALTER TABLE mat_view RENAME TO mat_view_stage'');exec Source.native(''ALTER TABLE mat_view_temp RENAME TO mat_view'');exec Source.native(''MERGE INTO check_table(id,after_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT after_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
"teiid_rel:MATVIEW_TTL" 2000)
AS SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
]]>
</metadata>
</model>
<translator name="h2-override" type="h2">
<property name="SupportsDirectQueryProcedure" value="true" />
</translator>
</vdb>
{code}
was:
When importing a dynamic VDB containing models with extension properties, the properties are not imported.
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<vdb name="MatViewsVdb" version="1">
<description>For testing of materialized views</description>
<model name="Source">
<source name="Source" translator-name="h2-override"
connection-jndi-name="java:/mat-views-ds" />
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE customers (
id integer,
name string(4000),
address string(4000),
CONSTRAINT PK_ID PRIMARY KEY(id)
) OPTIONS(NAMEINSOURCE 'customer')
CREATE FOREIGN TABLE orders (
id integer,
customer_id integer,
amount integer,
CONSTRAINT PK_ID PRIMARY KEY(id),
CONSTRAINT FK_CUST FOREIGN KEY(customer_id) REFERENCES customers(id)
) OPTIONS(NAMEINSOURCE 'order')
]]>
</metadata>
</model>
<!-- TODO: change the CONVERTs to integer once TEIIDDES-2737 is resolved -->
<model name="ViewModel" type="VIRTUAL">
<metadata type="DDL"><![CDATA[
CREATE VIEW internal_short_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,before_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE before_load=before_load+1;'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,after_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE after_load=after_load+1;'')'
)
AS /*+ cache(ttl:100)*/SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
CREATE VIEW internal_long_ttl (
customer_id integer PRIMARY KEY,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE')
AS /*+ cache(ttl:1000 updatable)*/SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
CREATE VIEW external_long_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
MATERIALIZED_TABLE 'Source.DB.PUBLIC.MAT_VIEW',
"teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
"teiid_rel:MATVIEW_STATUS_TABLE" 'Source.DB.PUBLIC.STATUS',
"teiid_rel:ON_VDB_START_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_create) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_create from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:ON_VDB_DROP_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_drop) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_drop from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO mat_view_stage(customer_id,total_amount) SELECT c.id AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''truncate table mat_view_stage'');exec Source.native(''MERGE INTO check_table(id,before_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT before_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''ALTER TABLE mat_view_stage RENAME TO mat_view_temp'');exec Source.native(''ALTER TABLE mat_view RENAME TO mat_view_stage'');exec Source.native(''ALTER TABLE mat_view_temp RENAME TO mat_view'');exec Source.native(''MERGE INTO check_table(id,after_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT after_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
"teiid_rel:MATVIEW_TTL" 2000)
AS SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
]]>
</metadata>
</model>
<translator name="h2-override" type="h2">
<property name="SupportsDirectQueryProcedure" value="true" />
</translator>
</vdb>
{code}
> Extension properties not imported from dynamic VDB
> --------------------------------------------------
>
> Key: TEIIDDES-2745
> URL: https://issues.jboss.org/browse/TEIIDDES-2745
> Project: Teiid Designer
> Issue Type: Bug
> Components: Dynamic VDBs
> Affects Versions: 9.0.4
> Reporter: Andrej Šmigala
>
> When importing a dynamic VDB containing models with extension properties, the properties are not imported.
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <vdb name="MatViewsVdb" version="1">
> <description>For testing of materialized views</description>
>
> <model name="Source">
> <source name="Source" translator-name="h2-override"
> connection-jndi-name="java:/mat-views-ds" />
> <metadata type="DDL"><![CDATA[
>
> CREATE FOREIGN TABLE customers (
> id integer,
> name string(4000),
> address string(4000),
> CONSTRAINT PK_ID PRIMARY KEY(id)
> ) OPTIONS(NAMEINSOURCE 'customer')
>
> CREATE FOREIGN TABLE orders (
> id integer,
> customer_id integer,
> amount integer,
> CONSTRAINT PK_ID PRIMARY KEY(id),
> CONSTRAINT FK_CUST FOREIGN KEY(customer_id) REFERENCES customers(id)
> ) OPTIONS(NAMEINSOURCE 'order')
> ]]>
> </metadata>
> </model>
>
> <!-- TODO: change the CONVERTs to integer once TEIIDDES-2737 is resolved -->
> <model name="ViewModel" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW internal_short_ttl (
> customer_id integer NOT NULL,
> total_amount integer
> ) OPTIONS (MATERIALIZED 'TRUE',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,before_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE before_load=before_load+1;'');',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,after_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE after_load=after_load+1;'')'
> )
> AS /*+ cache(ttl:100)*/SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
>
> CREATE VIEW internal_long_ttl (
> customer_id integer PRIMARY KEY,
> total_amount integer
> ) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE')
> AS /*+ cache(ttl:1000 updatable)*/ SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
>
> CREATE VIEW external_long_ttl (
> customer_id integer NOT NULL,
> total_amount integer
> ) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
> MATERIALIZED_TABLE 'Source.DB.PUBLIC.MAT_VIEW',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'Source.DB.PUBLIC.STATUS',
> "teiid_rel:ON_VDB_START_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_create) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_create from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
> "teiid_rel:ON_VDB_DROP_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_drop) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_drop from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
> "teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO mat_view_stage(customer_id,total_amount) SELECT c.id AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''truncate table mat_view_stage'');exec Source.native(''MERGE INTO check_table(id,before_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT before_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''ALTER TABLE mat_view_stage RENAME TO mat_view_temp'');exec Source.native(''ALTER TABLE mat_view RENAME TO mat_view_stage'');exec Source.native(''ALTER TABLE mat_view_temp RENAME TO mat_view'');exec Source.native(''MERGE INTO check_table(id,after_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT after_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 2000)
> AS SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
> ]]>
> </metadata>
> </model>
> <translator name="h2-override" type="h2">
> <property name="SupportsDirectQueryProcedure" value="true" />
> </translator>
> </vdb>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2745) Extension properties not imported from dynamic VDB
by Andrej Šmigala (JIRA)
Andrej Šmigala created TEIIDDES-2745:
----------------------------------------
Summary: Extension properties not imported from dynamic VDB
Key: TEIIDDES-2745
URL: https://issues.jboss.org/browse/TEIIDDES-2745
Project: Teiid Designer
Issue Type: Bug
Components: Dynamic VDBs
Affects Versions: 9.0.4
Reporter: Andrej Šmigala
When importing a dynamic VDB containing models with extension properties, the properties are not imported.
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<vdb name="MatViewsVdb" version="1">
<description>For testing of materialized views</description>
<model name="Source">
<source name="Source" translator-name="h2-override"
connection-jndi-name="java:/mat-views-ds" />
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE customers (
id integer,
name string(4000),
address string(4000),
CONSTRAINT PK_ID PRIMARY KEY(id)
) OPTIONS(NAMEINSOURCE 'customer')
CREATE FOREIGN TABLE orders (
id integer,
customer_id integer,
amount integer,
CONSTRAINT PK_ID PRIMARY KEY(id),
CONSTRAINT FK_CUST FOREIGN KEY(customer_id) REFERENCES customers(id)
) OPTIONS(NAMEINSOURCE 'order')
]]>
</metadata>
</model>
<!-- TODO: change the CONVERTs to integer once TEIIDDES-2737 is resolved -->
<model name="ViewModel" type="VIRTUAL">
<metadata type="DDL"><![CDATA[
CREATE VIEW internal_short_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,before_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE before_load=before_load+1;'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute Source.native(''INSERT INTO check_table(id,after_load) VALUES (''internal_short_ttl'',1) ON DUPLICATE KEY UPDATE after_load=after_load+1;'')'
)
AS /*+ cache(ttl:100)*/SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
CREATE VIEW internal_long_ttl (
customer_id integer PRIMARY KEY,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE')
AS /*+ cache(ttl:1000 updatable)*/SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
CREATE VIEW external_long_ttl (
customer_id integer NOT NULL,
total_amount integer
) OPTIONS (MATERIALIZED 'TRUE', UPDATABLE 'FALSE',
MATERIALIZED_TABLE 'Source.DB.PUBLIC.MAT_VIEW',
"teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
"teiid_rel:MATVIEW_STATUS_TABLE" 'Source.DB.PUBLIC.STATUS',
"teiid_rel:ON_VDB_START_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_create) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_create from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:ON_VDB_DROP_SCRIPT" 'exec Source.native(''MERGE INTO check_table(id,vdb_drop) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT vdb_drop from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_LOAD_SCRIPT" 'INSERT INTO mat_view_stage(customer_id,total_amount) SELECT c.id AS customer_id, CONVERT(SUM(o.amount),integer) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;',
"teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute Source.native(''truncate table mat_view_stage'');exec Source.native(''MERGE INTO check_table(id,before_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT before_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'exec Source.native(''ALTER TABLE mat_view_stage RENAME TO mat_view_temp'');exec Source.native(''ALTER TABLE mat_view RENAME TO mat_view_stage'');exec Source.native(''ALTER TABLE mat_view_temp RENAME TO mat_view'');exec Source.native(''MERGE INTO check_table(id,after_load) KEY(id) VALUES (''''external_long_ttl'''',COALESCE((SELECT after_load from check_table WHERE id=''''external_long_ttl''''),0)+1)'');',
"teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
"teiid_rel:MATVIEW_TTL" 2000)
AS SELECT c.id AS customer_id, CONVERT(SUM(o.amount),biginteger) AS total_amount FROM customers c INNER JOIN orders o ON c.id = o.customer_id GROUP BY c.id;
]]>
</metadata>
</model>
<translator name="h2-override" type="h2">
<property name="SupportsDirectQueryProcedure" value="true" />
</translator>
</vdb>
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years
[JBoss JIRA] (TEIIDDES-2570) RelationalTable contains methods for single UniqueConstraint and collection of UniqueConstraints
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2570?page=com.atlassian.jira.plu... ]
Barry LaFond updated TEIIDDES-2570:
-----------------------------------
Attachment: edit-unique-constraint-dialog.png
unique-constraint-tab.png
> RelationalTable contains methods for single UniqueConstraint and collection of UniqueConstraints
> ------------------------------------------------------------------------------------------------
>
> Key: TEIIDDES-2570
> URL: https://issues.jboss.org/browse/TEIIDDES-2570
> Project: Teiid Designer
> Issue Type: Bug
> Components: Import/Export, Patch Release
> Affects Versions: 9.0.1
> Reporter: Paul Richardson
> Assignee: Barry LaFond
> Fix For: 9.2.1
>
> Attachments: edit-unique-constraint-dialog.png, unique-constraint-tab.png
>
>
> While round tripping DDL import and export, the RelationalTable is used to store table unique constraint. The DDL Importer stores the new constraints in the uniqueConstraints collection. However, when saving the model to the BasicTableImpl instance, it actually only looks at the single uniqueConstraint so values are lost.
> Dynamic Vdb work has united these fields but retained the getUniqueConstraint() and setUniqueConstraint() methods for backward compatibility with the RelationalTableEditorPanel and ViewTableEditorPanel. These methods are deprecated and the panels should be fixed to support entering multiple unique constraints.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years