Package: adlmagics
Azure Data Service Notebook (Alpha)Azure Data Service Notebook is a set of extentions for working with Azure Data Service (e.g. Azure Data Lake, HDIsight, CosmosDB, Azure SQL and Azure Data Warehouse etc.) usingJupyter Notebook.WARNING: This SDK/CLI is currently in very early stage of development. It can and will change in backwards incompatible ways.Latest Version:0.0.1a0FeatureAzure Data Service Notebook currently provides a set ofJupyter Magic Functionsfor users to access Azure Data Lake. Available magics are captured in the table below. Please click on the command name to see the syntax reference.CommandFunction%adl loginLine magic*to log in to Azure Data Lake.%adl listaccountsLine magic to list the Azure Data Lake Analytic accounts for current user.%adl listjobsLine magic to list the Azure Data Lake jobs for a given account.%%adl submitjobCell magic*to submit a USQL job to Azure Data Lake cluster.%adl viewjobLine magic to view detailed job info.%adl liststoreaccountsLine magic to list the Azure Data Lake Store accounts.%adl liststorefoldersLine magic to list the folders under a given directory.%adl liststorefilesLine magic to list the files under a given directory.%adl sampleLine magic to sample a given file, return results as Pandas DataFrame.%adl logoutLine magic to log out.*Please checkMagic Functionsfor detailed definiton ofLine magicandCell magics.InstallationDownload and Installpython 3.6+Install jupyter:pip install jupyterInstall adlmagic extention :pip install --no-cache-dir adlmagicsExamplesadlmagics_demo.ipynb, demo file ofadlmgicsfunctions for Azure Data Lake job control and data exploration.usql_samples.ipynb,  samples code of common U-SQL scenarios, e.g. query a TSV file, create a database, populate table, query table and create rowset in script.FeedbackYou can submitbug reportorfeature requestdirectly in this repo. Our team will triage issues actively.Reference%adl loginLine magic to login to Azure Data Lake service.%adl login --tenant <tenant>Input ParametersNameTypeExampleDescriptiontenantrequiredstringmicrosoft.onmicrosoft.comThe value of this argument can either be an.onmicrosoft.comdomain or the Azure object ID for the tenant.%adl listaccountsLine magic to enumerate the Azure Data Lake Analytic accounts for current user. The account list will be returned as Pandas DataFrame, you can call Pandas funtions directly afterward.%adl listaccounts	--page_index
			--page_account_numberInput ParametersNameTypeExampleDescriptionpage_indexrequiredint0The result page number. This must be greater than 0. Default value is 0.page_account_numberrequiredint10The number of results per page.%adl listjobsLine magic to enumerate the Azure Data Lake jobs for a given account. The job list will be returned as Pandas DataFrame, you can call Pandas funtions directly afterward.%adl listjobs	--account <azure data lake analytic account> 
		--page_index
		--page_account_numberInput ParametersNameTypeExampleDescriptionaccountrequiredstringtelemetryadlaThe Azure Data Lake Analytics account to list the job from.page_indexrequiredint0The result page number. This must be greater than 0. Default value is 0.page_account_numberrequiredint10The number of results per page.%%adl submitjobCell magic to submit a U-SQL job to Azure Data Lake cluster.%%adl submitjob	--account <zure data lake analytic account>
		--name <job name>
		--parallelism
		--priority
		--runtimeInput ParametersNameTypeExampleDescriptionaccountrequiredstringtelemetryadlathe Azure Data Lake Analytics account to execute job operations on.namerequiredstringmyscriptthe friendly name of the job to submit.parallelismint5the degree of parallelism used for this job. This must be greater than 0, if set to less than 0 it will default to 1.priorityint1000the priority value for the current job. Lower numbers have a higher priority. By default, a job has a priority of 1000. This must be greater than 0.runtimestringdefaultthe runtime version of the Data Lake Analytics engine to use for the specific type of job being run.%adl viewjobLine magic to view detailed job info.%adl view job	--account <azure data lake analytic account>
		--job_id <job GUID to be viewed>Input ParametersNameTypeExampleDescriptionaccountrequiredstringtelemetryadlathe Azure Data Lake Analytics account to execute job operations on.job_idrequiredGUID36a62f78-1881-1935-8a6a-9e37b497582djob identifier. uniquely identifies the job across all jobs submitted to the service.%adl liststoreaccontsLine magic to list the Azure Data Lake Store accounts.%adl liststoreaccounts%adl liststorefoldersLine magic to list the folders under a given directory.%adl liststorefolders	--account <azure data lake store account>
			--folder_pathInput ParametersNameTypeExampleDescriptionaccountrequiredstringtelemetryadlsthe name of the Data Lake Store account.folder_pathrequiredstringroot/datathe directory path under the Data Lake Store account.%adl liststorefilesLine magic to list the files under a given directory.%adl liststorefiles	--account <azure data lake store account>
			--folder_pathInput ParametersNameTypeExampleDescriptionaccountrequiredstringtelemetryadlsthe name of the Data Lake Store account.folder_pathrequiredstringroot/datathe directory path under the Data Lake Store account.%adl sampleLine magic to sample a given file, return results as Pandas DataFrame.%adl sample	--account <azure data lake store account>
		--file_path 
		--file_type 
		--encoding 
		--row_numberInput ParametersNameTypeExampleDescriptionaccountrequiredstringtelemetryadlsthe name of the Data Lake Store account.file_pathrequiredstringroot/data/sample.tsvthe file path to sample data from.file_typestringtsvthe type of the file to sample from.encodingstringUTF-8encoding type of the file.row_numberint10number of rows to read from the file.%adl logoutLine magic to log out.%adl logoutContributingThis project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visithttps://cla.microsoft.com.When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.This project has adopted theMicrosoft Open Source Code of Conduct.
For more information see theCode of Conduct FAQor
contactopencode@microsoft.comwith any additional questions or comments.