Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Importante
Azure Data Lake Analytics è stato ritirato il 29 febbraio 2024. Per altre informazioni, vedere questo annuncio.
Per l'analisi dei dati, l'organizzazione può usare Azure Synapse Analytics o Microsoft Fabric.
Questo articolo descrive come gestire account, origini dati, utenti e processi di Azure Data Lake Analytics usando un'app scritta con Azure SDK per Node.js.
Sono supportate le versioni seguenti:
- Node.js versione: 0.10.0 o versione successiva
- Versione dell'API REST per l'account: 2015-10-01-preview
Funzionalità
- Gestione account: creare, ottenere, elencare, aggiornare ed eliminare.
Modalità di installazione
npm install @azure/arm-datalake-analytics
Eseguire l'autenticazione con Microsoft Entra ID
const { DefaultAzureCredential } = require("@azure/identity");
//service principal authentication
var credentials = new DefaultAzureCredential();
Creare il client di Data Lake Analytics
const { DataLakeAnalyticsAccountManagementClient } = require("@azure/arm-datalake-analytics");
var accountClient = new DataLakeAnalyticsAccountManagementClient(credentials, 'your-subscription-id');
Creare un account Data Lake Analytics
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'
},
name: accountName,
location: location,
properties: {
defaultDataLakeStoreAccount: datalakeStoreAccountName,
dataLakeStoreAccounts: [
{
name: datalakeStoreAccountName
}
]
}
};
client.accounts.beginCreateAndWait(resourceGroupName, accountName, accountToCreate).then((result)=>{
console.log('result is: ' + util.inspect(result, {depth: null}));
}).catch((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
}
*/
})