You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Sudip Mukherjee <sm...@commvault.com> on 2015/08/18 15:14:22 UTC

[DRILL] Column display for mongodb

Hi,
I was trying to use mongodb plugin with apache drill (1.1) using MSQuery. I could browse through the collection I have (the sample zipcode database) but I was not able get the columns displayed. What could I be missing here?
Could you please help to troubleshoot?

[cid:image001.png@01D0D9E5.7916A610]


Thanks,
Sudip



***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

RE: [DRILL] Column display for mongodb

Posted by Sudip Mukherjee <sm...@commvault.com>.
Thank you so much. I am able to use the views.

Regards,
Sudip

-----Original Message-----
From: Andries Engelbrecht [mailto:aengelbrecht@maprtech.com] 
Sent: 18 August 2015 PM 09:17
To: user@drill.apache.org
Subject: Re: [DRILL] Column display for mongodb

Most tools today require the metadata to be available when they connect to a data source like Drill.
As Drill works with multiple data sources where schema is only discovered at query time, it can create challenges for Tools that require a predefined schema at connection time. 

The best way to workaround this with these Tools are to use Drill Views to predefine a schema for these tools to use. This provides the required Schema information to Tools at connection time. Nothing in the View gets materialized at creation, so easy to maintain and update as needed. Also you can apply some SQL logic to the View, not just column name and data type casting, which can be very handy for some Drill data sources such as Mongo and JSON.

—Andries

> On Aug 18, 2015, at 7:22 AM, Tugdual Grall <tu...@gmail.com> wrote:
> 
> Hello,
> 
> Maybe the Excel client needs some metadata, and the MongoDB plugin is 
> getting the schema on read (as you read data from your query)
> 
> One solution, would be to create a view and use this view into your 
> excel query, see
> 
> https://drill.apache.org/docs/create-view/
> 
> Can you test and let us know?
> 
> Regards
> Tug
> @tgrall
> 
> On Tuesday, August 18, 2015, Sudip Mukherjee 
> <sm...@commvault.com>
> wrote:
> 
>> Hi Kristine,
>> Yes, I am also able to use the example queries. I wanted to see the 
>> columns while trying from excel so that I could selectively choose some.
>> But it is showing *.
>> 
>> Thanks,
>> Sudip
>> 
>> -----Original Message-----
>> From: Kristine Hahn [mailto:khahn@maprtech.com <javascript:;>]
>> Sent: 18 August 2015 PM 07:28
>> To: user@drill.apache.org <javascript:;>
>> Subject: Re: [DRILL] Column display for mongodb
>> 
>> I can use Drill to query a Mongo table and the column output is fine 
>> as shown in 
>> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example
>> -queries
>> 
>> Why do mention MS Query? Please try the steps in 
>> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill
>> <
>> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example
>> -queries
>>> 
>> 
>> On Tuesday, August 18, 2015, Sudip Mukherjee 
>> <smukherjee@commvault.com <javascript:;>>
>> wrote:
>> 
>>> Hi,
>>> 
>>> I was trying to use mongodb plugin with apache drill (1.1) using MSQuery.
>>> I could browse through the collection I have (the sample zipcode
>>> database) but I was not able get the columns displayed. What could I 
>>> be
>> missing here?
>>> 
>>> Could you please help to troubleshoot?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Thanks,
>>> 
>>> Sudip
>>> 
>>> 
>>> ***************************Legal 
>>> Disclaimer***************************
>>> "This communication may contain confidential and privileged material 
>>> for the sole use of the intended recipient. Any unauthorized review, 
>>> use or distribution by others is strictly prohibited. If you have 
>>> received the message by mistake, please advise the sender by reply 
>>> email
>> and delete the message. Thank you."
>>> ********************************************************************
>>> **
>>> 
>>> 
>> 
>> --
>> Kristine Hahn
>> Sr. Technical Writer
>> 415-497-8107 @krishahn skype:krishahn
>> 
>> 
>> 
>> ***************************Legal 
>> Disclaimer***************************
>> "This communication may contain confidential and privileged material 
>> for the sole use of the intended recipient. Any unauthorized review, 
>> use or distribution by others is strictly prohibited. If you have 
>> received the message by mistake, please advise the sender by reply 
>> email and delete the message. Thank you."
>> **********************************************************************




***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: [DRILL] Column display for mongodb

Posted by Andries Engelbrecht <ae...@maprtech.com>.
Most tools today require the metadata to be available when they connect to a data source like Drill.
As Drill works with multiple data sources where schema is only discovered at query time, it can create challenges for Tools that require a predefined schema at connection time. 

The best way to workaround this with these Tools are to use Drill Views to predefine a schema for these tools to use. This provides the required Schema information to Tools at connection time. Nothing in the View gets materialized at creation, so easy to maintain and update as needed. Also you can apply some SQL logic to the View, not just column name and data type casting, which can be very handy for some Drill data sources such as Mongo and JSON.

—Andries

> On Aug 18, 2015, at 7:22 AM, Tugdual Grall <tu...@gmail.com> wrote:
> 
> Hello,
> 
> Maybe the Excel client needs some metadata, and the MongoDB plugin is
> getting the schema on read (as you read data from your query)
> 
> One solution, would be to create a view and use this view into your excel
> query, see
> 
> https://drill.apache.org/docs/create-view/
> 
> Can you test and let us know?
> 
> Regards
> Tug
> @tgrall
> 
> On Tuesday, August 18, 2015, Sudip Mukherjee <sm...@commvault.com>
> wrote:
> 
>> Hi Kristine,
>> Yes, I am also able to use the example queries. I wanted to see the
>> columns while trying from excel so that I could selectively choose some.
>> But it is showing *.
>> 
>> Thanks,
>> Sudip
>> 
>> -----Original Message-----
>> From: Kristine Hahn [mailto:khahn@maprtech.com <javascript:;>]
>> Sent: 18 August 2015 PM 07:28
>> To: user@drill.apache.org <javascript:;>
>> Subject: Re: [DRILL] Column display for mongodb
>> 
>> I can use Drill to query a Mongo table and the column output is fine as
>> shown in
>> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries
>> 
>> Why do mention MS Query? Please try the steps in
>> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill
>> <
>> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries
>>> 
>> 
>> On Tuesday, August 18, 2015, Sudip Mukherjee <smukherjee@commvault.com
>> <javascript:;>>
>> wrote:
>> 
>>> Hi,
>>> 
>>> I was trying to use mongodb plugin with apache drill (1.1) using MSQuery.
>>> I could browse through the collection I have (the sample zipcode
>>> database) but I was not able get the columns displayed. What could I be
>> missing here?
>>> 
>>> Could you please help to troubleshoot?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Thanks,
>>> 
>>> Sudip
>>> 
>>> 
>>> ***************************Legal Disclaimer***************************
>>> "This communication may contain confidential and privileged material
>>> for the sole use of the intended recipient. Any unauthorized review,
>>> use or distribution by others is strictly prohibited. If you have
>>> received the message by mistake, please advise the sender by reply email
>> and delete the message. Thank you."
>>> **********************************************************************
>>> 
>>> 
>> 
>> --
>> Kristine Hahn
>> Sr. Technical Writer
>> 415-497-8107 @krishahn skype:krishahn
>> 
>> 
>> 
>> ***************************Legal Disclaimer***************************
>> "This communication may contain confidential and privileged material for
>> the
>> sole use of the intended recipient. Any unauthorized review, use or
>> distribution
>> by others is strictly prohibited. If you have received the message by
>> mistake,
>> please advise the sender by reply email and delete the message. Thank you."
>> **********************************************************************


Re: [DRILL] Column display for mongodb

Posted by Tugdual Grall <tu...@gmail.com>.
Hello,

Maybe the Excel client needs some metadata, and the MongoDB plugin is
getting the schema on read (as you read data from your query)

One solution, would be to create a view and use this view into your excel
query, see

https://drill.apache.org/docs/create-view/

Can you test and let us know?

Regards
Tug
@tgrall

On Tuesday, August 18, 2015, Sudip Mukherjee <sm...@commvault.com>
wrote:

> Hi Kristine,
> Yes, I am also able to use the example queries. I wanted to see the
> columns while trying from excel so that I could selectively choose some.
> But it is showing *.
>
> Thanks,
> Sudip
>
> -----Original Message-----
> From: Kristine Hahn [mailto:khahn@maprtech.com <javascript:;>]
> Sent: 18 August 2015 PM 07:28
> To: user@drill.apache.org <javascript:;>
> Subject: Re: [DRILL] Column display for mongodb
>
> I can use Drill to query a Mongo table and the column output is fine as
> shown in
> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries
>
> Why do mention MS Query? Please try the steps in
> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill
> <
> http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries
> >
>
> On Tuesday, August 18, 2015, Sudip Mukherjee <smukherjee@commvault.com
> <javascript:;>>
> wrote:
>
> > Hi,
> >
> > I was trying to use mongodb plugin with apache drill (1.1) using MSQuery.
> > I could browse through the collection I have (the sample zipcode
> > database) but I was not able get the columns displayed. What could I be
> missing here?
> >
> > Could you please help to troubleshoot?
> >
> >
> >
> >
> >
> >
> >
> > Thanks,
> >
> > Sudip
> >
> >
> > ***************************Legal Disclaimer***************************
> > "This communication may contain confidential and privileged material
> > for the sole use of the intended recipient. Any unauthorized review,
> > use or distribution by others is strictly prohibited. If you have
> > received the message by mistake, please advise the sender by reply email
> and delete the message. Thank you."
> > **********************************************************************
> >
> >
>
> --
> Kristine Hahn
> Sr. Technical Writer
> 415-497-8107 @krishahn skype:krishahn
>
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for
> the
> sole use of the intended recipient. Any unauthorized review, use or
> distribution
> by others is strictly prohibited. If you have received the message by
> mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************

RE: [DRILL] Column display for mongodb

Posted by Sudip Mukherjee <sm...@commvault.com>.
Hi Kristine,
Yes, I am also able to use the example queries. I wanted to see the columns while trying from excel so that I could selectively choose some. But it is showing *.

Thanks,
Sudip

-----Original Message-----
From: Kristine Hahn [mailto:khahn@maprtech.com] 
Sent: 18 August 2015 PM 07:28
To: user@drill.apache.org
Subject: Re: [DRILL] Column display for mongodb

I can use Drill to query a Mongo table and the column output is fine as shown in http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries

Why do mention MS Query? Please try the steps in http://drill.apache.org/docs/mongodb-plugin-for-apache-drill
<http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries>

On Tuesday, August 18, 2015, Sudip Mukherjee <sm...@commvault.com>
wrote:

> Hi,
>
> I was trying to use mongodb plugin with apache drill (1.1) using MSQuery.
> I could browse through the collection I have (the sample zipcode 
> database) but I was not able get the columns displayed. What could I be missing here?
>
> Could you please help to troubleshoot?
>
>
>
>
>
>
>
> Thanks,
>
> Sudip
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material 
> for the sole use of the intended recipient. Any unauthorized review, 
> use or distribution by others is strictly prohibited. If you have 
> received the message by mistake, please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************
>
>

--
Kristine Hahn
Sr. Technical Writer
415-497-8107 @krishahn skype:krishahn



***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: [DRILL] Column display for mongodb

Posted by Kristine Hahn <kh...@maprtech.com>.
I can use Drill to query a Mongo table and the column output is fine as
shown in
http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries

Why do mention MS Query? Please try the steps in
http://drill.apache.org/docs/mongodb-plugin-for-apache-drill
<http://drill.apache.org/docs/mongodb-plugin-for-apache-drill/#example-queries>

On Tuesday, August 18, 2015, Sudip Mukherjee <sm...@commvault.com>
wrote:

> Hi,
>
> I was trying to use mongodb plugin with apache drill (1.1) using MSQuery.
> I could browse through the collection I have (the sample zipcode database)
> but I was not able get the columns displayed. What could I be missing here?
>
> Could you please help to troubleshoot?
>
>
>
>
>
>
>
> Thanks,
>
> Sudip
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for the
> sole use of the intended recipient. Any unauthorized review, use or distribution
> by others is strictly prohibited. If you have received the message by mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************
>
>

-- 
Kristine Hahn
Sr. Technical Writer
415-497-8107 @krishahn skype:krishahn