Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

127
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda