heavyai-connector icon indicating copy to clipboard operation
heavyai-connector copied to clipboard

Error: No result to process

Open whitehander opened this issue 6 years ago • 3 comments

I caught error that error, when call con.query function

const MapdCon = require('mapd-connector')
const con = new MapdCon()
    .host('**IP**')
    .port(9092)
    .protocol('http')
    .dbName('**DBname**')
    .user('**userName**')
    .password('**pass**')
    .connect((err, con) => {
            if (err) console.log(err)
            con.getTablesAsync().then(res => console.log(res)) // <--- it is works properly
            con.query("SELECT * FROM table')", // <---- not working!
            (err, result) => {
                    if (err) console.log(err)
                    console.log(result)
            })
    })

/home/node_modules/mapd-connector/dist/node-connector.js:31524
        throw e; // re-throw the error to Rx
        ^

Error: No result to process
at /home/node_modules/mapd-connector/dist/node-connector.js:31857:18
at MapdCon.processResults (/home/node_modules/mapd-connector/dist/node-connector.js:30363:35)
at MapdCon.query [as queryAsync] (/home/node_modules/mapd-connector/dist/node-connector.js:30860:24)
at MapdCon.connector.(anonymous function) [as query] (/home/node_modules/mapd-connector/dist/node-connector.js:31516:25)
at MapdCon.host.port.protocol.dbName.user.password.connect (/home/index.js:12:21)
at /home/node_modules/mapd-connector/dist/node-connector.js:30469:12
at /home/node_modules/mapd-connector/dist/node-connector.js:1993:16
at process._tickCallback (internal/process/next_tick.js:61:11)

whitehander avatar Sep 11 '18 01:09 whitehander

@whitehander Hi! It seems like there might be a syntax issue with your query - instead of "SELECT * FROM table')", it should probably be "SELECT * FROM table". Could you try that?

jonvuri avatar Sep 12 '18 18:09 jonvuri

@jrajav Hi! Thanks for give opinion. but That is my mistake when i masking my private codes. still not solved that problem...

whitehander avatar Sep 13 '18 07:09 whitehander

@whitehander Does the same query work if you try it through the mapdql utility that comes with mapd-core?

jonvuri avatar Oct 15 '18 22:10 jonvuri