Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
using the presto-client-node docs aren't clear for me

I am trying to use the following package to connect to a presto db in Node.

This is what I have so far.

const presto = require('presto-client')

const client = new presto.Client({
  host: 'xxx-presto-da.xxx.com',
  port: 1234,
  catalog: 'gridhive',
  schema: 'rpt',
  source: 'nodejs-client',
  basic_auth: {user: 'xxx', password: 'xxx'},
})

const getPrestoData = () => {
  client.execute({
    query: `
      select some query
    `,
    data: function (error, data, columns, stats) {
      console.log('data:', data)
      return data
    },
    success: function (error, stats) {},
  })
}

console.log(getPrestoData())

But this is what's returned

13:56:15 in sellersjson-analysis/src/lib via ⬢ v18.3.0 
> node presto.js
undefined

I am not sure what is being undefined. I just want to know the best way to implement this. Am I doing it correctly?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!