6

Is there anyway I can connect teradata to nodejs server? I have use case where I need to pull teradata information in my rest APIs.

Can I use this npm package?

Opal
  • 81,889
  • 28
  • 189
  • 210
Prafulla Patil
  • 171
  • 1
  • 7

2 Answers2

5

Yes. Absolutely. It will work just fine. Please find the configuration below.

var config = {
    libpath: './jar/terajdbc4.jar',
    libs: ['./jar/tdgssconfig.jar'],
    drivername: 'com.teradata.jdbc.TeraDriver',
    url: 'jdbc:teradata://myteradata.test.com',
    // optionally
    user: 'sr0898',
    password: '***',
};

jdbc.initialize(config, function(err, res)

The key is to have the jars downloaded and referred to. Hope this helps.

Sripaul
  • 2,227
  • 9
  • 36
  • 60
3

Node.js Teradata Driver Now Available

The Teradata nodejs-driver node module is a Database API Specification v2.0 compliant driver for Node.js and the Teradata SQL Engine.

Includes

  • Typescript / Javascript npm module
  • Database API Specification v2.0 compliant driver
  • 127 Unit Tests
  • Examples Guide
  • Documentation for Setup and Running, Connection Parameters, Stored Password Protection, Data Types, Module Exceptions

Supported Platforms

  • Node.js:
    • 8.x, 9.x, 10.x, 11.x
  • Operating Systems:
    • Apple macOS, Microsoft Windows, Linux

Github repo: https://github.com/Teradata/nodejs-driver

NPM Module: https://www.npmjs.com/package/teradata-nodejs-driver

JS1
  • 31
  • 2
  • How do you specify the host and database correctly? I keep getting: "Error: [Version 42659830765e8ee7b720b821cd0b35677b82dbd5] [Session 0] [Teradata SQL Driver] Failed to connect to myServer:1025" – Anton Oct 14 '21 at 12:16