Skip to content

Athena

Bases: Spout

__init__(output, state, **kwargs)

Initialize the AzureTableStorage class.

Parameters:

Name Type Description Default
output BatchOutput

An instance of the BatchOutput class for saving the data.

required
state State

An instance of the State class for maintaining the state.

required
**kwargs

Additional keyword arguments.

{}

Using geniusrise to invoke via command line

genius AzureTableStorage rise \
    batch \
        --output_s3_bucket my_bucket \
        --output_s3_folder s3/folder \
    none \
    fetch \
        --args account_name=my_account account_key=my_key table_name=my_table

Using geniusrise to invoke via YAML file

version: "1"
spouts:
    my_azure_table_spout:
        name: "AzureTableStorage"
        method: "fetch"
        args:
            account_name: "my_account"
            account_key: "my_key"
            table_name: "my_table"
        output:
            type: "batch"
            args:
                bucket: "my_bucket"
                s3_folder: "s3/folder"

fetch(account_name, account_key, table_name)

📖 Fetch data from Azure Table Storage and save it in batch.

Parameters:

Name Type Description Default
account_name str

The Azure Storage account name.

required
account_key str

The Azure Storage account key.

required
table_name str

The Azure Table Storage table name.

required

Raises:

Type Description
Exception

If unable to connect to Azure Table Storage or fetch the data.