# tenup

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

Latest version **0.0.6** (published 2017-05-09) · 0 weekly downloads

## Install

```sh
npm install tenup
pnpm add tenup
yarn add tenup
bun add tenup
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-05-09 |
| First published | 2017-03-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tyler Trine and Jamie Cristini |
| Maintainers | theg0df0dder |

## Links

- npm: https://www.npmjs.com/package/tenup
- Homepage: http://www.1010data.com
- npm.io page: https://npm.io/package/tenup

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.2
- [string-template](https://npm.io/package/string-template.md) ^1.0.0

## Recent versions

- 0.0.6 (latest) — 2017-05-09
- 0.0.5 — 2017-05-09
- 0.0.4 — 2017-03-24
- 0.0.3 — 2017-03-23
- 0.0.2 — 2017-03-23
- 0.0.1 — 2017-03-22

## README

# 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
```

```javascript
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'
}
```

---
_Source: https://npm.io/package/tenup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
