azure_blob

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

README

Azure Blob

Write metadata records as NDJSON to an Azure Blob Storage container.

Usage

sinks:
  - name: azure_blob
    config:
      storage_account_url: https://myaccount.blob.core.windows.net
      container_name: my-container
      object_prefix: github-users
      account_key: <your-account-key>

Configuration

Key Type Example Description
storage_account_url string https://myaccount.blob.core.windows.net Azure Storage account URL required
container_name string my-container Name of the blob container to write to required
object_prefix string github-users Prefix for the output blob name. The final blob is named {prefix}-{timestamp}.ndjson. If omitted, the name is {timestamp}.ndjson. optional
account_key string abc123... Azure Storage shared key. Either this or connection_string must be provided. optional
connection_string string DefaultEndpointsProtocol=https;... Azure Storage connection string. Takes precedence over account_key. optional

Behavior

Each Record (Entity + Edges) is serialized as JSON and written as one line in an NDJSON blob in the configured Azure Blob Storage container. A new blob with a timestamped name is created on each run.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger log.Logger) plugins.Syncer

Types

type Config

type Config struct {
	StorageAccountURL string `mapstructure:"storage_account_url" validate:"required"`
	ContainerName     string `mapstructure:"container_name" validate:"required"`
	ObjectPrefix      string `mapstructure:"object_prefix"`
	AccountKey        string `mapstructure:"account_key"`
	ConnectionString  string `mapstructure:"connection_string"`
}

type Sink

type Sink struct {
	plugins.BasePlugin
	// contains filtered or unexported fields
}

func (*Sink) Close

func (s *Sink) Close() error

func (*Sink) Init

func (s *Sink) Init(ctx context.Context, config plugins.Config) (err error)

func (*Sink) Sink

func (s *Sink) Sink(ctx context.Context, batch []models.Record) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL