# gatsby-source-azure-storage

> Source plugin for pulling data into Gatsby from Azure Storage.

Latest version **0.2.1** (published 2018-08-05) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install gatsby-source-azure-storage
pnpm add gatsby-source-azure-storage
yarn add gatsby-source-azure-storage
bun add gatsby-source-azure-storage
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2018-08-05 |
| First published | 2018-07-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 40.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Daniel Oliver |
| Maintainers | danieloliver |
| Keywords | gatsby, gatsby-plugin, gatsby-source-plugin, azure, azure-storage |

## Links

- npm: https://www.npmjs.com/package/gatsby-source-azure-storage
- Repository: https://github.com/DanielOliver/gatsby-source-azure-storage
- Homepage: https://github.com/DanielOliver/gatsby-source-azure-storage#readme
- Issues: https://github.com/DanielOliver/gatsby-source-azure-storage/issues
- npm.io page: https://npm.io/package/gatsby-source-azure-storage

## Dependencies (3)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [azure-storage](https://npm.io/package/azure-storage.md) ^2.10.0
- [gatsby-source-filesystem](https://npm.io/package/gatsby-source-filesystem.md) ^1.5.39

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2018-08-05
- 0.2.0 — 2018-07-31
- 0.1.6 — 2018-07-30
- 0.1.5 — 2018-07-22
- 0.1.4 — 2018-07-22
- 0.1.3 — 2018-07-22
- 0.1.2 — 2018-07-22
- 0.1.1 — 2018-07-22
- 0.1.0 — 2018-07-22

## README

# gatsby-source-azure-storage

Source plugin for pulling data into Gatsby from Azure Storage.  Wrapper around [Azure-Storage-Node](https://github.com/Azure/azure-storage-node)

## How to use

```javascript
// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-azure-storage",
      options: {
        tables: [
          {
            name: "<tableName1>"
          },
          {
            name: "<tableName2>",
            type: "<tableNameTypeLabel2>"
          }
        ],
        containers: [
          {
            name: "<containerName1>",
            // If defined, downloads the blobs in this container to this folder.
            localFolder: 'test2'
          }
        ],
        // If defined, downloads the blobs in all containers above (unless overriden on the container) to this folder.
        containerLocalFolder: 'test'
      },
    }
  ],
}
```

## Environment variables

* AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY
* or
* AZURE_STORAGE_CONNECTION_STRING.

## Example: reading table from Azure Storage

![screenshot](example_table_screenshot.png)

gatsby-config.js looks like this:

```javascript
module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-azure-storage",
      options: {
        tables: [
          {
            name: "meetup"
          },
          {
            name: "events",
            type: "eventTypeName"
          }
        ],
        containers: [
          {
            name: "container1",
            // If defined, downloads the files in this container to this folder.
            localFolder: 'test2'
          }
        ],
        // If defined, downloads the files in all containers (unless overriden on the container) to this folder.
        containerLocalFolder: 'test'
      },
    }
  ]
}
```

Below is a sample query for fetching the above table's rows, as well as the other metadata available.

```graphql
query exampleQuery {
  allMeetup {
    edges {
      node {
        PartitionKey
        RowKey
        LastEventsQueriedUTC
        LastQueriedUTC
        Timestamp
        FullName
        MembersCount
        City
        State
        Country
        Timezone
        Link
        id
      }
    }
  }
  allAzureContainer {
    edges {
      node {
        id
        name
        localFolder
      }
    }
  }
  allAzureTable {
    edges {
      node {
        name
        type
        id
      }
    }
  }
  allAzureBlob {
    edges {
      node {
        id
        localPath
        name
        container
        contentMD5
        blobType
        creationTime
        lastModified
      }
    }
  }
}
```

---
_Source: https://npm.io/package/gatsby-source-azure-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
