Git Product home page Git Product logo

Comments (14)

frankgh avatar frankgh commented on June 15, 2024

@sree80 please modify your $PXF_CONF/servers/mydb/report.sql file with the following:

SELECT dept.name AS name, count(*) AS count, max(emp.salary) AS max
FROM demodb.dept JOIN demodb.emp
ON dept.id = emp.dept_id
GROUP BY dept.name

Please note that I removed the semicolon at the end of the query. We will take this feedback and will create a bug.

from pxf.

sree80 avatar sree80 commented on June 15, 2024

I tried it without the semicolon and got the same error. Thank you.

from pxf.

frankgh avatar frankgh commented on June 15, 2024

@sree80 I was able to get it to work. In my case I used the mysql database, and I removed the db name from the table names:

SELECT dept.name AS name, count(*) AS count, max(emp.salary) AS max
FROM dept JOIN emp
ON dept.id = emp.dept_id
GROUP BY dept.name

I hope this helps

from pxf.

frankgh avatar frankgh commented on June 15, 2024

In a multinode cluster, you will have to run pxf cluster sync

from pxf.

sree80 avatar sree80 commented on June 15, 2024

Same Error , even after removing the db name from the table names.
It looks like it is complaining somewhere around this line - right syntax to use near ':report' at line 1

ERROR: remote component error (500) from '127.0.0.1:5888': type Exception report message You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':report' at line 1 description The server encountered an internal error that prevented it from fulfilling this request. exception java.io.IOException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':report' at line 1 (libchurl.c:944) (seg1 slice1 172.17.0.2:50001 pid=8466) (libchurl.c:944)
CONTEXT: External table dept_report

from pxf.

sree80 avatar sree80 commented on June 15, 2024

I am using MYSQL 5.1 and JDBC 5.1

from pxf.

denalex avatar denalex commented on June 15, 2024

I assume you're using the latest code, correct ? You can turn on TRACE level logging and see the exact SQL statement being sent to MySQL via JDBC in pxf-service.log file.

It looks like maybe if your code is old, the named query feature is not available and query:report is being used as a table name ?

from pxf.

frankgh avatar frankgh commented on June 15, 2024

@sree80 what version of Greenplum are you using? Named query feature was introduced in Greenplum 5.19, make sure you are using Greenplum 5.19 and PXF version 5.4.0

> $PXF_HOME/bin/pxf version
PXF version 5.4.0

from pxf.

sree80 avatar sree80 commented on June 15, 2024

PostgreSQL 9.4.20
Greenplum Database 6.0.0-beta.3
PXF version 5.3.2

from pxf.

sree80 avatar sree80 commented on June 15, 2024

If i have to upgrade PXF Version to 5.4.0. From where Can I find this Version.

from pxf.

denalex avatar denalex commented on June 15, 2024

You can get it with Pivotal GPDB 5.19 distribution or build from the open source, but it will not be officially supported by Pivotal with GPDB 6 (beta) until after it ships with the next beta release of Pivotal GPDB 6.

from pxf.

sree80 avatar sree80 commented on June 15, 2024

thanks so much.

from pxf.

frankgh avatar frankgh commented on June 15, 2024

Thanks for reporting this issue. We added a fix for semicolon. In your case, the query was not working because you are on PXF version 5.3.2 that does not support Named Queries

from pxf.

lavjain avatar lavjain commented on June 15, 2024

PXF 5.4.0 is also available at https://github.com/greenplum-db/pxf/releases/tag/5.4.0

from pxf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.