You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by packeteer cheng <ch...@hotmail.com> on 2015/04/06 23:06:08 UTC
Metamodel question
Hi all,I have couple of questions to ask as below:
1)
I have seen the Operator Type “IN”, “LIKE” etc. Is
there any plan for the following operators?
NOT IN
NOT LIKE
START WITH
NOT START WITH
2)
Schema discovery. I am able to discover the
tables and their columns by given database (schema) name). Is there a way to
discover all the databases contains by the given connection(data context)?
3)
For MongoDB, XML or json file connector, how do
I query, filter or perform aggregation from sub document.
Example:
{ "product": "Product ABC",
"Model": "Model ABC",
"Transaction": { [
{"Date": "ISO Date",
"Amount": 10000.00},
{"Date": "ISO Date",
"Amount": 1200.00},
]}
}
Is there a way to return the flatten table, and how
do I write a query to filter by date, and to obtain the total amount?
4)
Is there a plan to support Impala and Hive
connector?
Thank you.regardspacketeer
Re: Metamodel question
Posted by Kasper Sørensen <i....@gmail.com>.
Hi packeteer,
My 5 cents ...
1 and 4) For the questions regarding "plans to do something" - that all
depends on who wants to do it :-) I think adding those features would be
cool. Maybe you want to help out in making it a reality. I don't see anyone
right now working on it, but I also would expect encouragement and not any
resistance to those who want to take it forward.
2) I think you're simply looking for the DataContext.getSchemas() method?
3) This is the most difficult question. Some of these implementations
allows you to pass one or more SimpleTableDef objects. These objects may
have special column names that refer to a nested object. For instance the
XML structures can be traversed using slash ("/") and if I recall correctly
the JSON structures can be traversed using dot. See for instance here:
http://wiki.apache.org/metamodel/examples/XmlTableMapping
Best regards,
Kasper
2015-04-06 23:06 GMT+02:00 packeteer cheng <ch...@hotmail.com>:
> Hi all,I have couple of questions to ask as below:
>
>
>
> 1)
> I have seen the Operator Type “IN”, “LIKE” etc. Is
> there any plan for the following operators?
>
> NOT IN
>
> NOT LIKE
>
> START WITH
>
> NOT START WITH
>
>
>
> 2)
> Schema discovery. I am able to discover the
> tables and their columns by given database (schema) name). Is there a way
> to
> discover all the databases contains by the given connection(data context)?
>
>
> 3)
> For MongoDB, XML or json file connector, how do
> I query, filter or perform aggregation from sub document.
>
> Example:
>
> { "product": "Product ABC",
>
> "Model": "Model ABC",
>
> "Transaction": { [
>
> {"Date": "ISO Date",
>
> "Amount": 10000.00},
>
> {"Date": "ISO Date",
>
> "Amount": 1200.00},
>
> ]}
>
> }
>
> Is there a way to return the flatten table, and how
> do I write a query to filter by date, and to obtain the total amount?
>
>
>
> 4)
> Is there a plan to support Impala and Hive
> connector?
>
> Thank you.regardspacketeer