You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Prisdha Dharma <pr...@intertrust.com> on 2018/11/06 22:23:58 UTC

Join tables from different databases returns empty result

Hi,

I'm using Apache Drill to join 2 tables from different databases on MySql server
When running this query:
SELECT a.name, b.url
FROM pg_authservice.partner a
INNER JOIN pg-edge.graph_apis b
N a.id = b.pid
WHEN a.status = 1 && b.job_status = “COMPLETED”;

I see that Drill returns empty result, even though the join using MySQL returns non-empty data.
Could you please advise.

Prisdha Dharma



Re: Join tables from different databases returns empty result

Posted by Prisdha Dharma <pr...@intertrust.com>.
Hi Arjun,

  Yes. Query individual table with corresponding filter applied via Drill returns non-empty results.

Regards,

Prisdha Dharma
________________________________
From: Arjun kr <ar...@outlook.com>
Sent: Tuesday, November 6, 2018 4:42 PM
To: user@drill.apache.org
Cc: Oleg Mürk
Subject: Re: Join tables from different databases returns empty result


Does it return any result if you query on individual tables with the corresponding filter applied in Drill?

Thanks,

Arjun
________________________________
From: Khurram Faraaz <kf...@mapr.com>
Sent: Wednesday, November 7, 2018 5:34 AM
To: user@drill.apache.org
Cc: omurk@intertrust.com
Subject: Re: Join tables from different databases returns empty result

Hi,

You will have to create a new storage plugin from Drill's Web UI, you can
find the details on the below documentation link, to query MySQL tables
from Apache Drill.
https://drill.apache.org/docs/rdbms-storage-plugin/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrill.apache.org%2Fdocs%2Frdbms-storage-plugin%2F&data=02%7C01%7Cprisdha%40intertrust.com%7C1e6365c7c99b445642f608d6444fdefc%7Ce58768bd6abd4ef4bcb64477e194a310%7C0%7C0%7C636771507160275458&sdata=anYKjefCH1ypsJ8pZNK1SaaMHzjT6eTSLkRkRUoiPtM%3D&reserved=0>

Also please share the query plan if you can generate one using EXPLAIN FOR
command, for that join query from Drill.

Thanks,
Khurram

On Tue, Nov 6, 2018 at 3:58 PM Prisdha Dharma <pr...@intertrust.com>
wrote:

> Hi,
>
> I'm using Apache Drill to join 2 tables from different databases on MySql
> server
> When running this query:
> SELECT a.name, b.url
> FROM pg_authservice.partner a
> INNER JOIN pg-edge.graph_apis b
> N a.id = b.pid
> WHEN a.status = 1 && b.job_status = “COMPLETED”;
>
> I see that Drill returns empty result, even though the join using MySQL
> returns non-empty data.
> Could you please advise.
>
> Prisdha Dharma
>
>
>

Re: Join tables from different databases returns empty result

Posted by Arjun kr <ar...@outlook.com>.
Does it return any result if you query on individual tables with the corresponding filter applied in Drill?

Thanks,

Arjun
________________________________
From: Khurram Faraaz <kf...@mapr.com>
Sent: Wednesday, November 7, 2018 5:34 AM
To: user@drill.apache.org
Cc: omurk@intertrust.com
Subject: Re: Join tables from different databases returns empty result

Hi,

You will have to create a new storage plugin from Drill's Web UI, you can
find the details on the below documentation link, to query MySQL tables
from Apache Drill.
https://drill.apache.org/docs/rdbms-storage-plugin/

Also please share the query plan if you can generate one using EXPLAIN FOR
command, for that join query from Drill.

Thanks,
Khurram

On Tue, Nov 6, 2018 at 3:58 PM Prisdha Dharma <pr...@intertrust.com>
wrote:

> Hi,
>
> I'm using Apache Drill to join 2 tables from different databases on MySql
> server
> When running this query:
> SELECT a.name, b.url
> FROM pg_authservice.partner a
> INNER JOIN pg-edge.graph_apis b
> N a.id = b.pid
> WHEN a.status = 1 && b.job_status = “COMPLETED”;
>
> I see that Drill returns empty result, even though the join using MySQL
> returns non-empty data.
> Could you please advise.
>
> Prisdha Dharma
>
>
>

Re: Join tables from different databases returns empty result

Posted by Khurram Faraaz <kf...@mapr.com>.
Hi,

You will have to create a new storage plugin from Drill's Web UI, you can
find the details on the below documentation link, to query MySQL tables
from Apache Drill.
https://drill.apache.org/docs/rdbms-storage-plugin/

Also please share the query plan if you can generate one using EXPLAIN FOR
command, for that join query from Drill.

Thanks,
Khurram

On Tue, Nov 6, 2018 at 3:58 PM Prisdha Dharma <pr...@intertrust.com>
wrote:

> Hi,
>
> I'm using Apache Drill to join 2 tables from different databases on MySql
> server
> When running this query:
> SELECT a.name, b.url
> FROM pg_authservice.partner a
> INNER JOIN pg-edge.graph_apis b
> N a.id = b.pid
> WHEN a.status = 1 && b.job_status = “COMPLETED”;
>
> I see that Drill returns empty result, even though the join using MySQL
> returns non-empty data.
> Could you please advise.
>
> Prisdha Dharma
>
>
>