Discussion:
Join tables from different databases returns empty result
Prisdha Dharma
2018-11-06 22:23:58 UTC
Permalink
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
Khurram Faraaz
2018-11-07 00:04:03 UTC
Permalink
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
Post by Prisdha Dharma
Hi,
I'm using Apache Drill to join 2 tables from different databases on MySql server
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
Arjun kr
2018-11-07 00:42:09 UTC
Permalink
Does it return any result if you query on individual tables with the corresponding filter applied in Drill?

Thanks,

Arjun
________________________________
From: Khurram Faraaz <***@mapr.com>
Sent: Wednesday, November 7, 2018 5:34 AM
To: ***@drill.apache.org
Cc: ***@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
Post by Prisdha Dharma
Hi,
I'm using Apache Drill to join 2 tables from different databases on MySql
server
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
Prisdha Dharma
2018-11-13 18:38:35 UTC
Permalink
Hi Arjun,

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

Regards,

Prisdha Dharma
________________________________
From: Arjun kr <***@outlook.com>
Sent: Tuesday, November 6, 2018 4:42 PM
To: ***@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 <***@mapr.com>
Sent: Wednesday, November 7, 2018 5:34 AM
To: ***@drill.apache.org
Cc: ***@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
Post by Prisdha Dharma
Hi,
I'm using Apache Drill to join 2 tables from different databases on MySql server
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
Loading...