Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

289
Visualizações
Execute queries on Amazon Redshift using the AWS SDK for JavaScript

I have been following aws-sdk for javascript to execute sql queries on redshift cluster but haven't been able to connect.

Can someone guide me regarding module to use for redshift connection in javascript (except node-redshift) or share a skeleton code with proper parameter names?

Using @aws-sdk/client-redshift

const RedShiftClient = new RedshiftClient({region:'us-west-2'});
const params = {
  ClusterIdentified:'clustername-xxx-aws.com',
  NodeType: 'nodetype',
  MasterUsername:'user',
  MasterPassword:'password',
  ClusterType:'clustertype'
};

const command = new AcceptReservedNodeExchangeCommand(params);
redshiftClient.send(command)
.then(res=>{
//dosomething
})
.catch(err=>{
console.log(err);
});

Receiving error : 2 validation errors found: Value null at 'targeReservedNodeOfferingId' failed to satisfy constraint. Member cannot be null. Value null at 'reserverNodeId' failed to satify constraint. Member cannot be null.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

To execute queries on Amazon Redshift using JavaScript, use RedshiftDataClient (not RedShiftClient ). There are examples in the previous link. This is part of the AWS SDK for JavaScript v3.

To use a RedshiftDataClient object to query data, you can use the following Amazon Redshift values:

  • The name of the database (for example, dev)
  • The name of the database user that you configured
  • The name of the Amazon Redshift cluster (for example, redshift-cluster-1)

These values are used when creating an ExecuteStatementCommand as discussed here:

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-redshift-data/classes/executestatementcommand.html

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda