register_azure_blob_container_datastore: Register an Azure blob container as a datastore

Description Usage Arguments Value Details Examples

View source: R/datastore.R

Description

Register an Azure blob container as a datastore. You can choose to use either the SAS token or the storage account key.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
register_azure_blob_container_datastore(
  workspace,
  datastore_name,
  container_name,
  account_name,
  sas_token = NULL,
  account_key = NULL,
  protocol = NULL,
  endpoint = NULL,
  overwrite = FALSE,
  create_if_not_exists = FALSE,
  skip_validation = FALSE,
  blob_cache_timeout = NULL,
  grant_workspace_access = FALSE,
  subscription_id = NULL,
  resource_group = NULL
)

Arguments

workspace

The Workspace object.

datastore_name

A string of the name of the datastore. The name must be case insensitive and can only contain alphanumeric characters and underscores.

container_name

A string of the name of the Azure blob container.

account_name

A string of the storage account name.

sas_token

A string of the account SAS token.

account_key

A string of the storage account key.

protocol

A string of the protocol to use to connect to the blob container. If NULL, defaults to 'https'.

endpoint

A string of the endpoint of the blob container. If NULL, defaults to 'core.windows.net'.

overwrite

If TRUE, overwrites an existing datastore. If the datastore does not exist, it will create one.

create_if_not_exists

If TRUE, creates the blob container if it does not exists.

skip_validation

If TRUE, skips validation of storage keys.

blob_cache_timeout

An integer of the cache timeout in seconds when this blob is mounted. If NULL, defaults to no timeout (i.e. blobs will be cached for the duration of the job when read).

grant_workspace_access

If TRUE, grants workspace Managed Identities (MSI) access to the user storage account. This should be set to TRUE if the storage account is in VNET. If TRUE, Azure ML will use the workspace MSI token to grant access to the user storage account. It may take a while for the granted access to reflect.

subscription_id

A string of the subscription id of the storage account.

resource_group

A string of the resource group of the storage account.

Value

The AzureBlobDatastore object.

Details

In general we recommend Azure Blob storage over Azure File storage. Both standard and premium storage are available for blobs. Although more expensive, we suggest premium storage due to faster throughput speeds that may improve the speed of your training runs, particularly if you train against a large dataset.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
ws <- load_workspace_from_config()
ds <- register_azure_blob_container_datastore(ws,
                                              datastore_name = 'mydatastore',
                                              container_name = 'myazureblobcontainername',
                                              account_name = 'mystorageaccoutname',
                                              account_key = 'mystorageaccountkey')

## End(Not run)

azuremlsdk documentation built on Oct. 23, 2020, 8:22 p.m.