[JBoss JIRA] (TEIID-4999) Archetypes should not use Teiid packages
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4999:
-------------------------------------
Summary: Archetypes should not use Teiid packages
Key: TEIID-4999
URL: https://issues.jboss.org/browse/TEIID-4999
Project: Teiid
Issue Type: Quality Risk
Components: Build/Kits, Documentation
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 10.0
The archetypes are hardcoded to expect the use of org.jboss.teiid packages. This should be changed to allow for any package.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4998) Query with the XML functions can't be evaluated because outer selects aren't visible for the inner statements.
by Debbie Steigner (JIRA)
[ https://issues.jboss.org/browse/TEIID-4998?page=com.atlassian.jira.plugin... ]
Debbie Steigner commented on TEIID-4998:
----------------------------------------
The below transformation should work:
BEGIN
SELECT XMLELEMENT(NAME root, XMLAGG(XMLELEMENT(NAME "order", XMLELEMENT(NAME id, OrderID),XMLELEMENT(NAME "date",OrderDate),XMLELEMENT(NAME details,(SELECT XMLAGG(XMLELEMENT(NAME detail, XMLELEMENT(NAME unitprice, UnitPrice), XMLELEMENT(NAME quantity,Quantity), XMLELEMENT(NAME products,(SELECT XMLAGG(XMLELEMENT(NAME product, XMLELEMENT(NAME name, ProductName), XMLELEMENT(NAME quantityPerUnit, QuantityPerUnit), XMLELEMENT(NAME inStock,UnitsinStock))) FROM northwind.products as prd where odl.ProductID = ProductID)))) from northwind.order_details as odl where OrderID = odr.OrderID))))) as xml_out from northwind.orders as odr where OrderID IN (10248);
END
I also tried with XMLFOREST, but received the same error:
BEGIN
SELECT XMLELEMENT(NAME Orders,
XMLAGG(
XMLELEMENT(NAME "order",
XMLFOREST(
OrderID as "id",
OrderDate as "date",
(SELECT XMLAGG(
XMLELEMENT(NAME Detail,
XMLFOREST(
UnitPrice as "unitprice",
Quantity as "quantity",
(SELECT XMLAGG(
XMLELEMENT(NAME Product,
XMLFOREST(
ProductName as "name",
QuantityPerUnit as "quantityperUnit",
UnitsinStock as "inStock"
)
)
)
FROM northwind.products as prd where odl.ProductID = ProductID
) AS Products
)
)
)
FROM northwind.order_details as odl where OrderID = odr.OrderID
) AS Details
)
)
)
) as xml_out from northwind.orders as odr where OrderID IN (10248);
END
If i remove all the nested xmlaggs and use a view table that joins the 3 tables together:
BEGIN
SELECT XMLELEMENT(NAME orders, XMLAGG(XMLELEMENT(NAME "order", XMLELEMENT(NAME id, nwrest.allorders.OrderID), XMLELEMENT(NAME "date", nwrest.allorders.OrderDate), XMLELEMENT(NAME unitprice, nwrest.allorders.UnitPrice), XMLELEMENT(NAME quantity, nwrest.allorders.Quantity), XMLELEMENT(NAME name, nwrest.allorders.ProductName), XMLELEMENT(NAME quantityPerUnit, nwrest.allorders.QuantityPerUnit), XMLELEMENT(NAME inStock, nwrest.allorders.UnitsInStock)))) AS xml_out FROM nwrest.allorders WHERE nwrest.allorders.OrderID = 10248;
END
It works but doesn't give the xml structure the customer is looking for:
<orders>
<order>
<id>10248</id>
<date>1996-07-04T05:00:00Z</date>
<unitprice>14</unitprice>
<quantity>12</quantity>
<name>Queso Cabrales</name>
<quantityPerUnit>1 kg pkg.</quantityPerUnit>
<inStock>22</inStock>
</order>
<order>
<id>10248</id>
<date>1996-07-04T05:00:00Z</date>
<unitprice>9.8</unitprice>
<quantity>10</quantity>
<name>Singaporean Hokkien Fried Mee</name>
<quantityPerUnit>32 - 1 kg pkgs.</quantityPerUnit>
<inStock>26</inStock>
</order>
<order>
<id>10248</id>
<date>1996-07-04T05:00:00Z</date>
<unitprice>34.8</unitprice>
<quantity>5</quantity>
<name>Mozzarella di Giovanni</name>
<quantityPerUnit>24 - 200 g pkgs.</quantityPerUnit>
<inStock>14</inStock>
</order>
</orders>
> Query with the XML functions can't be evaluated because outer selects aren't visible for the inner statements.
> --------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-4998
> URL: https://issues.jboss.org/browse/TEIID-4998
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.11.6_3
> Reporter: Colin Mondesir
> Assignee: Steven Hawkins
>
> When creating an XML structure with the XML (XMLELEMENT,XMLAGG, etc.) functions and select for selecting the data from the view models, the query in the procedure can't be evaluated because the outer selects aren't visible for the inner statements.
> org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate odr.OrderID: No value was available
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4998) Query with the XML functions can't be evaluated because outer selects aren't visible for the inner statements.
by Colin Mondesir (JIRA)
Colin Mondesir created TEIID-4998:
-------------------------------------
Summary: Query with the XML functions can't be evaluated because outer selects aren't visible for the inner statements.
Key: TEIID-4998
URL: https://issues.jboss.org/browse/TEIID-4998
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.11.6_3
Reporter: Colin Mondesir
Assignee: Steven Hawkins
When creating an XML structure with the XML (XMLELEMENT,XMLAGG, etc.) functions and select for selecting the data from the view models, the query in the procedure can't be evaluated because the outer selects aren't visible for the inner statements.
org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidComponentException: TEIID30328 Unable to evaluate odr.OrderID: No value was available
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4997) Teiid on/with Spark
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4997:
-------------------------------------
Summary: Teiid on/with Spark
Key: TEIID-4997
URL: https://issues.jboss.org/browse/TEIID-4997
Project: Teiid
Issue Type: Feature Request
Components: Build/Kits, Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
With the availability of Spark on OpenShift, we should provide a cooperative planning/execution mode for Teiid that utilizes the Spark engine.
Roughly this would look like a Teiid master running embedded with the Spark master serving the typical JDBC/ODBC/OData endpoints. On an incoming query the optimizer would choose to process against Spark or to process with Teiid - if processing with Teiid that may still require submitting the job to a worker to avoid burdening the master. Alternatively the Teiid master could run in a separate pod with the additional serialization costs, however initially the remote Spark [JDBC/ODBC layer|https://spark.apache.org/docs/latest/sql-programming-guide.html#dis...] will not be available in the OpenShift effort.
If execution against Spark is chosen, then instead of a typical Teiid processor plan a spark job will be created instead. Initially this could be limited to relational plans, but could be expanded to include procedure language support translated to python, scala, etc. The spark job would represent each source access as a [temporary view|https://spark.apache.org/docs/latest/sql-programming-guide.html#jdbc...] accessing the relevant pushdown query. Ideally this would be executed against a Teiid Embedded instance running in the worker node. If remote this would incur an extra hop and have security considerations. This can be thought of as using Teiid for its virtualization and access layer features. The rest of the processing about the access layers could then be represented as Spark SQL.
For example a Teiid user query of "select * from hdfs.tbl h, oracle.tbl o where h.id = o.id order by h.col" would become the Spark SQL job:
CREATE TEMPORARY VIEW h
USING org.apache.spark.sql.jdbc
OPTIONS (
url "jdbc:teiid:vdb",
dbtable "(select col ... from hdfs.tbl)",
fetchSize '1024,
...
)
CREATE TEMPORARY VIEW o
USING org.apache.spark.sql.jdbc
OPTIONS (
url "jdbc:teiid:vdb",
dbtable "(select col ... from oracle.tbl)",
fetchSize '1024,
...
)
SELECT * FROM h inner join o on h.id
The challenges/considerations of this are:
* Utilizing embedded with coordinated VDB management. There's the associated issue of driver management as well.
* Translating Teiid SQL to Spark SQL. All Teiid functions, udfs, aggregate functions would need to be made known to Spark. Table function constructs, such as XMLTABLE, TEXTTABLE, etc. could initially just be treated as access layer concerns. Type issues would exist as xml/clob/json would map to string.
* no xa support
* we'd need to provide reasonable values for fetch size, partition information, etc. in the access layer queries.
* We'd have to determine the extent to which federated join optimizations need to be conveyed (dependent join and pushdown) as that would go beyond simply translating to Spark SQL.
* there's a potential to use [global temporary views|http://www.gatorsmile.io/globaltempview/] which is a more convenient way of adding virtualization to Spark.
* Large internal materialization should be re-targeted to Spark or JDG
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4989) Impala - Select * fails with reserved words in query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4989?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4989:
----------------------------------
Issue Type: Bug (was: Enhancement)
Fix Version/s: 10.0
9.3.2
> Impala - Select * fails with reserved words in query
> ----------------------------------------------------
>
> Key: TEIID-4989
> URL: https://issues.jboss.org/browse/TEIID-4989
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 9.1.3
> Environment: Ubuntu linux 6+ x64
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 10.0, 9.3.2
>
>
> Impala translator can handle reserved words in queries by quoting but doing select * the query fails in an unhelpful way. Example:
> --succeeds
> select calendar_type,
> start_date,
> calendar_year,
> quarter_structure,
> date_key,
> 'month',
> week,
> day_of_month
> from warehouse.dim_advertiser_calendar;
> fails due to reserved word "month" as a column in the virtual table:
> select * from warehouse.dim_advertiser_calendar;
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4989) Impala - Select * fails with reserved words in query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4989?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4989.
-----------------------------------
Resolution: Done
Added the missing quoting.
We should probably change the default import to use JDBC DatabaseMetaData now that support has matured.
> Impala - Select * fails with reserved words in query
> ----------------------------------------------------
>
> Key: TEIID-4989
> URL: https://issues.jboss.org/browse/TEIID-4989
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 9.1.3
> Environment: Ubuntu linux 6+ x64
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 10.0, 9.3.2
>
>
> Impala translator can handle reserved words in queries by quoting but doing select * the query fails in an unhelpful way. Example:
> --succeeds
> select calendar_type,
> start_date,
> calendar_year,
> quarter_structure,
> date_key,
> 'month',
> week,
> day_of_month
> from warehouse.dim_advertiser_calendar;
> fails due to reserved word "month" as a column in the virtual table:
> select * from warehouse.dim_advertiser_calendar;
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months