# azure-arm-datalake-store

> Microsoft Azure Data Lake Store Management Client Library for node

Latest version **3.1.2-preview** (published 2020-07-30) · MIT license · 0 weekly downloads

## Install

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

## 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.2-preview |
| Published | 2020-07-30 |
| First published | 2015-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1 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-store
- 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-store

## 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.2-preview (latest) — 2020-07-30
- 3.1.1-preview — 2019-08-21
- 3.1.0-preview — 2018-11-15
- 3.0.0-preview — 2017-09-28
- 2.1.0-preview — 2017-06-30
- 2.0.1-preview — 2017-05-15
- 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.2 — 2016-09-02
- 0.4.1 — 2016-07-06
- 0.4.0 — 2016-05-25
- 0.3.0 — 2016-04-28
- 0.2.0 — 2016-03-23
- … 5 more at https://npm.io/package/azure-arm-datalake-store/versions

## README

# Microsoft Azure SDK for Node.js - Data Lake Store

This project provides a Node.js package that makes it easy to manage Azure Data Lake Store accounts.

Right now it supports:

  *  **Node.js version: 6.x.x or higher**

## Features

- Account management: create, get, list, update, and delete.
- File system management: create, get, upload, append, download, read, delete, list.

## How to Install

```bash
npm install azure-arm-datalake-store
```

## How to Use

### Authentication, account and filesystem client creation and listing file status as an example

 ```javascript
 var msRestAzure = require('ms-rest-azure');
 var adlsManagement = require("azure-arm-datalake-store");
 
 // 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(function(err, credentials) {
  var accountName = 'testadlsacct';
  var pathToEnumerate = '/myfolder';
  var acccountClient = new adlsManagement.DataLakeStoreAccountClient(credentials, 'your-subscription-id');
  var filesystemClient = new adlsManagement.DataLakeStoreFileSystemClient(credentials);
  filesystemClient.fileSystem.listFileStatus(accountName, pathToEnumerate, function(err, result, request, response) {
    if (err) console.log(err);
    console.log(result);
  });
 });
 ```

### Create a Data Lake Store Account
```javascript
var util = require('util');
var resourceGroupName = 'testrg';
var accountName = 'testadlsacct';
var location = 'eastus2';

// account object to create
var accountToCreate = {
  tags: {
    testtag1: 'testvalue1',
    testtag2: 'testvalue2'
  },
  location: location
};

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}));
  }
});
```

### Create a file with content
```javascript
var util = require('util');
var accountName = 'testadlsacct';
var fileToCreate = '/myfolder/myfile.txt';
var options = {
  streamContents: new Buffer('some string content')
}

filesystemClient.fileSystem.listFileStatus(accountName, fileToCreate, options, function (err, result, request, response) {
  if (err) {
    console.log(err);
  } else {
    // no result is returned, only a 201 response for success.
    console.log('response is: ' + util.inspect(response, {depth: null}));
  }
});
```

### Get a list of files and folders

```javascript
var util = require('util');
var accountName = 'testadlsacct';
var pathToEnumerate = '/myfolder';
filesystemClient.fileSystem.listFileStatus(accountName, pathToEnumerate, function (err, result, request, response) {
  if (err) {
    console.log(err);
  } else {
    console.log('result is: ' + util.inspect(result, {depth: null}));
  }
});
```

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/azure/azure-sdk-for-node)
- [Microsoft Azure SDK for Node.js - Data Lake Analytics Management](https://github.com/Azure/azure-sdk-for-node/tree/autorest/lib/services/dataLake.Store)


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-node%2Flib%2Fservices%2Fdatalake.Store%2FREADME.png)

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