Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for COPY TO/FROM Azure Blob Storage #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aykut-bozkurt
Copy link
Collaborator

@aykut-bozkurt aykut-bozkurt commented Oct 23, 2024

Supports following Azure Blob uri forms:

  • az://{container}/key
  • azure://{container}/key
  • https://{account}.blob.core.windows.net/{container}/key

Configuration

The simplest way to configure object storage is by creating the standard ~/.azure/config file:

$ cat ~/.azure/config
[storage]
account = devstoreaccount1
key = Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

Alternatively, you can use the following environment variables when starting postgres to configure the Azure Blob Storage client:

  • AZURE_STORAGE_ACCOUNT: the storage account name of the Azure Blob
  • AZURE_STORAGE_KEY: the storage key of the Azure Blob
  • AZURE_STORAGE_SAS_TOKEN: the storage SAS token for the Azure Blob
  • AZURE_CONFIG_FILE: an alternative location for the config file

Bonus
Additionally, PR supports following S3 uri forms:

  • s3://{bucket}/key
  • s3a://{bucket}/key
  • https://s3.amazonaws.com/{bucket}/key
  • https://{bucket}.s3.amazonaws.com/key

Closes #50

@aykut-bozkurt aykut-bozkurt marked this pull request as draft October 23, 2024 17:53
@aykut-bozkurt aykut-bozkurt marked this pull request as ready for review October 23, 2024 17:55
@aykut-bozkurt aykut-bozkurt marked this pull request as draft October 23, 2024 17:55
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/azure-blob-storage branch 3 times, most recently from b9114cf to 2feb683 Compare October 26, 2024 00:47
@aykut-bozkurt aykut-bozkurt marked this pull request as ready for review October 26, 2024 00:48
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/azure-blob-storage branch 2 times, most recently from 3d026b6 to afb3c71 Compare November 9, 2024 22:25
Supports following Azure Blob uri forms:
- `az://{container}/key`
- `azure://{container}/key`
- `https://{account}.blob.core.windows.net/{container}/key`

**Configuration**

The simplest way to configure object storage is by creating the standard [`~/.azure/config`](https://learn.microsoft.com/en-us/cli/azure/azure-cli-configuration?view=azure-cli-latest) file:

```bash
$ cat ~/.azure/config
[storage]
account = devstoreaccount1
key = Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
```

Alternatively, you can use the following environment variables when starting postgres to configure the Azure Blob Storage client:
- `AZURE_STORAGE_ACCOUNT`: the storage account name of the Azure Blob
- `AZURE_STORAGE_KEY`: the storage key of the Azure Blob
- `AZURE_STORAGE_SAS_TOKEN`: the storage SAS token for the Azure Blob
- `AZURE_CONFIG_FILE`: an alternative location for the config file

**Bonus**
Additionally, PR supports following S3 uri forms:
- `s3://{bucket}/key`
- `s3a://{bucket}/key`
- `https://s3.amazonaws.com/{bucket}/key`
- `https://{bucket}.s3.amazonaws.com/key`

Closes #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What would be needed to use Azure Blob Storage?
1 participant