tenup

0.0.6 • Public • Published

Tenup

Execute TenUp commands using the tenup executable via JavaScript. Also see https://www2.1010data.com/documentationcenter/beta/TenupUsersGuide/index_frames.html

Usage

Install with npm

npm install tenup --save-dev
var tenup = require("tenup")

var options = {
    executable: tenup.getPathToTenup(),  // the path to tenup executable (can be overridden)
    login: {},              // login credentials:  TENTENGW, TENTENUID, TENTENPW  or any other args supported via env variables
    table: '',              // the path to the new table
    table_tree_file: '',    // XML file with information about the columns of the uploaded table
    flat_file: '',          // the name of the flat file to upload
    query_file: '',         // a query file containing sql to run against the source table
    sql: '',                // inline sql to run against the source table (used instead a query file)
    connection_string: '',  // odbc connection to use
    title: '',              // optional title for the new table
    args: '',               // additional tenup cmd line args such as -K -y etc.
    logTenUpCmd: false      // log the full tenup command to the console
}

tenup.execute(options, function (status, results) {
  // options see above  
  // callback function(status, results) {
  //    status = true:false the operation succeeded
  //    success results or if status is false - an error message 
  //}
});

##Loading from ODBC-compliant databases with a query file

var options = {
    connection_string: 'DSN=sql1010odbc',
    table: 'path.to.my.new.table',
    query_file: 'queries/my_query.xml'
}

##Loading from ODBC-compliant databases with a sql command

var options = {
    connection_string: 'DSN=sql1010odbc',
    table: 'path.to.my.new.table',
    sql: 'SELECT * FROM my_src_table'
}

##Loading with a Flat File

var options = {
    table_tree_file: 'my_schema.xml',
    flat_file: 'my_data_file'
}

Readme

Keywords

none

Package Sidebar

Install

npm i tenup

Weekly Downloads

6

Version

0.0.6

License

none

Last publish

Collaborators

  • theg0df0dder