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
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
var msRestAzure = ;var adlaManagement = ; // 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;
Create a Data Lake Analytics Account using callback pattern
var 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 createvar accountToCreate = tags: testtag1: 'testvalue1' testtag2: 'testvalue2' location: location defaultDataLakeStoreAccount: datalakeStoreAccountName dataLakeStoreAccounts: name: datalakeStoreAccountName ; clientaccount;
Get a list of jobs using callback pattern
var util = ;var accountName = 'testadlaacct';jobClientjob;
Get a list of databases in the Data Lake Analytics Catalog using Promise that provides the HttpOperationResponse wrapper
var util = ;var accountName = 'testadlaacct';catalogClientcatalog;