New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-datax

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-datax

Data ETL of TS/JS

latest
Source
npmnpm
Version
0.1.9
Version published
Maintainers
1
Created
Source

node-datax

使用TypeScript开发的Node的数据提取工具

安装

$ npm install node-datax

使用

  const { datax } = require('node-datax');
  const srcConnect = { host: '', username: 'postgres', password: '', database: '' }
  const destConnect = { host: '', username: 'postgres', password: '', database: '' }
  try {
    const datax1 = await datax(srcConnect, destConnect, { srcName: 'jcb_cd_test', destName: 'jcb_cd', column: ['*'] })
    datax1.on('finish', (res) => {
      console.log('总条数:', res.count)
      console.log('finish')
    })
    datax1.on('error', (res) => {
      console.log('error')
    })
    datax1.on('data', (res) => {
      console.log('完成条数:', res.count)
    })
  } catch (error) {
    console.log('初始化失败')
  }

开发

  • 修改tsconfig.jsonsourceMapfalse
  • 执行 npm run build命令

Keywords

ETL

FAQs

Package last updated on 01 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts