# azure-arm-datalake-analytics

> Microsoft Azure Data Lake Analytics Management Client Library for node

Latest version **3.1.0-preview** (published 2018-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install azure-arm-datalake-analytics
pnpm add azure-arm-datalake-analytics
yarn add azure-arm-datalake-analytics
bun add azure-arm-datalake-analytics
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0-preview |
| Published | 2018-11-07 |
| First published | 2015-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1174 |
| Author | Microsoft Corporation |
| Maintainers | windowsazure |
| Keywords | node, azure |

## Links

- npm: https://www.npmjs.com/package/azure-arm-datalake-analytics
- Repository: https://github.com/Azure/azure-sdk-for-node
- Homepage: http://github.com/Azure/azure-sdk-for-node
- Issues: http://github.com/Azure/azure-sdk-for-node/issues
- npm.io page: https://npm.io/package/azure-arm-datalake-analytics

## Dependencies (2)

- [ms-rest](https://npm.io/package/ms-rest.md) ^2.2.2
- [ms-rest-azure](https://npm.io/package/ms-rest-azure.md) ^2.3.3

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 3.1.0-preview (latest) — 2018-11-07
- 3.0.0-preview — 2017-09-28
- 2.3.0-preview — 2017-06-30
- 2.0.0-preview — 2017-04-03
- 1.0.2-preview — 2017-03-31
- 1.0.1-preview — 2016-12-06
- 1.0.0-preview — 2016-11-16
- 0.4.3 — 2016-09-02
- 0.4.2 — 2016-07-06
- 0.4.1 — 2016-06-16
- 0.4.0 — 2016-05-25
- 0.3.2 — 2016-04-28
- 0.3.1 — 2016-04-28
- 0.2.0 — 2016-03-23
- 0.1.6 — 2015-12-17
- … 6 more at https://npm.io/package/azure-arm-datalake-analytics/versions

## README

# Microsoft Azure SDK for Node.js - Data Lake Analytics

This project provides a Node.js package that makes it easy to manage Azure Data Lake Analytics accounts.

Right now it supports:

  *  **Node.js version: 6.x.x or higher**

## Features

- Account management: create, get, list, update, and delete.
- Account storage management: add, get, list update and delete Data Lake Store accounts and Azure Storage accounts from an existing Data Lake analytics account.
- Job management: submit, get, list, cancel.
- Catalog management: get, list, create (secrets and credentials), update (secrets and credentials), delete (secrets and credentials).

## How to Install

```bash
npm install azure-arm-datalake-analytics
```

## How to Use

### Authentication, account, job and catalog client creation and listing jobs as an example

### Login and list jobs using promises
 ```javascript
 var msRestAzure = require('ms-rest-azure');
 var adlaManagement = require("azure-arm-datalake-analytics");

 // Interactive Login
 // It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful, 
 // the user will get a DeviceTokenCredentials object.
 msRestAzure.interactiveLogin().then((credentials) => {
  var acccountClient = new adlaManagement.DataLakeAnalyticsAccountClient(credentials, 'your-subscription-id');
  var jobClient = new adlaManagement.DataLakeAnalyticsJobClient(credentials, 'azuredatalakeanalytics.net');
  var catalogClient = new adlaManagement.DataLakeAnalyticsCatalogClient(credentials, 'azuredatalakeanalytics.net');
  return jobClient.job.list(accountName);
}).then((jobs) => {
  console.log(result);
  return;
}).catch((err) => {
  console.log('An error occured');
  console.dir(err, {depth: null, colors: true});
});
 ```

### Create a Data Lake Analytics Account using callback pattern
```javascript
var util = require('util');
var resourceGroupName = 'testrg';
var accountName = 'testadlaacct';
var location = 'eastus2';

// A Data Lake Store account must already have been created to create
// a Data Lake Analytics account. See the Data Lake Store readme for
// information on doing so. For now, we assume one exists already.
var datalakeStoreAccountName = 'existingadlsaccount';

// account object to create
var accountToCreate = {
  tags: {
    testtag1: 'testvalue1',
    testtag2: 'testvalue2'
  },
  location: location,
  defaultDataLakeStoreAccount: datalakeStoreAccountName,
  dataLakeStoreAccounts: [
    {
      name: datalakeStoreAccountName
    }
  ]
};

client.account.create(resourceGroupName, accountName, accountToCreate, function (err, result, request, response) {
  if (err) {
    console.log(err);
    /*err has reference to the actual request and response, so you can see what was sent and received on the wire.
      The structure of err looks like this:
      err: {
        code: 'Error Code',
        message: 'Error Message',
        body: 'The response body if any',
        request: reference to a stripped version of http request
        response: reference to a stripped version of the response
      }
    */
  } else {
    console.log('result is: ' + util.inspect(result, {depth: null}));
  }
});
```

### Get a list of jobs using callback pattern

```javascript
var util = require('util');
var accountName = 'testadlaacct';
jobClient.job.list(accountName, function (err, result, request, response) {
  if (err) {
    console.log(err);
  } else {
    console.log('result is: ' + util.inspect(result, {depth: null}));
  }
});
```

### Get a list of databases in the Data Lake Analytics Catalog using Promise that provides the HttpOperationResponse<T> wrapper
```javascript
var util = require('util');
var accountName = 'testadlaacct';
catalogClient.catalog.listDatabasesWithHttpOperationResponse(accountName).then((httpOperationResponse) => {
  console.log('Deserialized Result (list of databases)');
  console.dir(httpOperationResponse.body, {depth: null, colors: true});
  console.log('Actual Request');
  console.dir(httpOperationResponse.request, {depth: null, colors: true});
  console.log('Raw Response');
  console.dir(httpOperationResponse.response, {depth: 3, colors: true});
}).catch((err) => {
  console.log('An error occurred.');
  console.dir(err, {depth: null, colors: true});
});
```

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/azure/azure-sdk-for-node)
- [Microsoft Azure SDK for Node.js - Data Lake Store Management](https://github.com/Azure/azure-sdk-for-node/tree/autorest/lib/services/dataLake.Store)

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