Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can I connect nodejs with teradata (any nodejs npm for this)?

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?

like image 308
Prafulla Patil Avatar asked May 07 '15 23:05

Prafulla Patil


People also ask

Is node JS and npm the same?

js or Node is an open-source, cross-platform, JavaScript runtime environment(JSRE) that executes JavaScript code outside of a web browser. npm is a package manager(like Nuget package manager in . NET -Microsoft ) for the JavaScript programming language.

Is node js necessary for npm?

To publish and install packages to and from the public npm registry or a private npm registry, you must install Node. js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager like nvm to install Node.

Which platform can node JS run on?

Node. js is officially supported on Linux, macOS and Microsoft Windows 8.1 and Server 2012 (and later), with tier 2 support for SmartOS and IBM AIX and experimental support for FreeBSD. OpenBSD also works, and LTS versions available for IBM i (AS/400).

Can I use node js in JavaScript?

Node.js allows you to run JavaScript on the server.


2 Answers

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

like image 31
JS1 Avatar answered Sep 19 '22 20:09

JS1


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.

like image 84
Sripaul Avatar answered Sep 19 '22 20:09

Sripaul