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

feat(data-warehouse): Added a doc on connecting azure blobs #8972

Merged
merged 10 commits into from
Jul 16, 2024
45 changes: 45 additions & 0 deletions contents/docs/data-warehouse/setup/azure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Linking Azure as a source
sidebar: Docs
showTitle: true
availability:
free: full
selfServe: full
enterprise: full
---

The data warehouse can link to data in your Azure storage accounts.

1. Create an Azure storage account
2. Create a blob container
3. Upload data and link to PostHog

### Step 1: Create an Azure storage account
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved
Firstly, log into Azure and go to Storage Accounts, then create a storage account by following [this Azure guide](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal#create-a-storage-account). In the "Advanced" section, ensure to check "Allow enabling anonymous access on individual containers"
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved

![enabling anonymous access](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2024_07_15_at_17_48_56_e83877dec0.png)

### Step 2: Create a blob container
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved
Once the storage account has been created, follow [this guide to create a blob container](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container).

When creating the container, ensure you set the "anonymous access level" to Blob (anonymous read access)
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved

![container anonymous access level](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2024_07_15_at_17_54_36_2bb9d63ebd.png)

### Step 3: Upload data and link to PostHog
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved
[Upload your data to the newly created container](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#upload-a-block-blob), Parquet files are the recommended format, but PostHog also work with JSON and CSVs too.
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved

Find the newly created file via the storage browser menu item. Once found, open the details and find the URL property - copy this to your clipboard, we'll need it when linking to the file in PostHog.
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved

![copy blob file](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2024_07_15_at_17_59_09_2f888aaa2f.png)

1. On PostHog, open your Data Warehouse tab and hit "Link source" in the top right corner
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved
2. Select Azure from the self managed section
3. Enter a name for your dataset and paste the copied URL into the "Files URL pattern" box
4. Select the correct format for your data
5. Enter the storage account name (this is name of the storage account you created in step 1)
6. Find and paste your storage account key next - you can use [this Azure doc](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys) to view your access keys
Gilbert09 marked this conversation as resolved.
Show resolved Hide resolved

![linking your data in posthog](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2024_07_15_at_18_10_06_f93fadf82b.png)

That's it! You should be able to query the data from the PostHog SQL editor.
1 change: 1 addition & 0 deletions contents/docs/data-warehouse/setup/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ To link a source, go to the data warehouse tab, and click **Link source** in the
- Snowflake
- R2
- Google Cloud Storage
- [Azure](/docs/data-warehouse/setup/azure)

You can find the set up instructions in-app or in the source specific docs.

Expand Down
Loading