Azure Blob Storage is Microsoft’s object storage solution that allows you to store and manage massive amounts of unstructured data.

Syntax

CREATE SINK [ IF NOT EXISTS ] sink_name
[FROM sink_from | AS select_query]
WITH (
   connector='azblob',
   connector_parameter = 'value', ...
);

Parameters

Parameter namesDescription
azblob.container_nameRequired. The name of the Azure Blob Storage container.
azblob.pathRequired. The directory where the sink file is located.
azblob.credentials.account_nameOptional. The Azure Storage account name for authentication.
azblob.credentials.account_keyOptional. The access key for the Azure Storage account.
azblob.endpoint_urlRequired. The URL endpoint for the Azure Blob Storage service.
typeRequired. Defines the type of the sink. Options include append-only or upsert.

Example

CREATE SINK azblob_sink AS SELECT v1
FROM t
WITH (
    connector='azblob',
    azblob.path = 'test_sink/',
    azblob.container_name = '<container_name>',
    azblob.credentials.account_name = '<account_name>',
    azblob.credentials.account_key = '<account_key>',
    azblob.endpoint_url = '<endpoint_url>',
    type = 'append-only',
)FORMAT PLAIN ENCODE PARQUET(force_append_only=true);

For more information about encode Parquet or JSON, see Sink data in parquet or json format.