Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink authored Jul 19, 2024
1 parent d92b3b8 commit 1f641b2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This extension adds a filesystem abstraction for Azure blob storage to DuckDB. To use it, install latest DuckDB. The extension currently supports only **reads** and **globs**.

## Basics
Setup authentication (leverages either Azure CLI or Managed Identity):
```sql
CREATE SECRET secret1 (
Expand All @@ -13,23 +14,25 @@ CREATE SECRET secret1 (

Then to query a file on azure:
```sql
SELECT count(*) FROM 'azure://<my_container>/<my_file>.<parquet_or_csv>';
SELECT count(*) FROM 'az://<my_container>/<my_file>.<parquet_or_csv>';
```

Globbing is also supported:
```sql
SELECT count(*) FROM 'azure://dummy_container/*.csv';
SELECT count(*) FROM 'az://dummy_container/*.csv';
```

## Other authentication methods
Other authentication options available:
- Connection string
### Connection string
```sql
CREATE SECRET secret2 (
TYPE AZURE,
CONNECTION_STRING '<value>'
);
```
- Service Principal (replace `CLIENT_SECRET` with `CLIENT_CERTIFICATE_PATH` to use a client certificate)
### Service Principal
(replace `CLIENT_SECRET` with `CLIENT_CERTIFICATE_PATH` to use a client certificate)
```sql
CREATE SECRET azure3 (
TYPE AZURE,
Expand All @@ -40,7 +43,8 @@ CREATE SECRET azure3 (
ACCOUNT_NAME '⟨storage account name⟩'
);
```
- Access token (its audience needs to be `https://storage.azure.com`)
### Access token
(its audience needs to be `https://storage.azure.com`)
```sql
CREATE SECRET secret4 (
TYPE AZURE,
Expand All @@ -49,7 +53,7 @@ CREATE SECRET secret4 (
ACCOUNT_NAME '⟨storage account name⟩'
);
```
- Anonymous
### Anonymous
```sql
CREATE SECRET secret5 (
TYPE AZURE,
Expand Down

0 comments on commit 1f641b2

Please sign in to comment.