Azure Storage and Data Lake
Lesson opener
In one line: Azure Data Lake Storage is Blob Storage with a hierarchical namespace turned on. Directories become real objects, and you cannot turn that switch back off.
Why it matters: Northline lands a stock extract every night. The first design uses one container named data and file names like stock_final_v3.csv. Analysts cannot tell raw from published. A cleanup deletes a prefix by copying every blob. Figures are illustrative.
Before this lesson: You can place a storage account in a resource group that a sandbox cleanup will not delete.
What you will be able to do
- Separate a blob container from a hierarchical namespace.
- Lay out raw, curated, and published paths as a convention.
- Say what a lifecycle rule changes, and what it does not.
- Combine resource access and directory access without granting the whole account.
Prerequisites
Lessons 1 and 2. You do not need to create an account to finish the practice.
Blobs, directories, and tiers
Blob Storage stores objects in containers (https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction). Without a hierarchical namespace, a "folder" is only a prefix in the blob name. Renaming a prefix means copying blobs and deleting the sources.
Azure Data Lake Storage is not a separate account type. You unlock it by enabling the hierarchical namespace on a storage account that supports it, such as a standard general-purpose v2 account (https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction). Directories are real. Renaming or deleting a directory is an operation on that directory (https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-namespace). After you enable the hierarchical namespace, you cannot revert the account to a flat namespace. Decide before the production account is full.
Access has two layers when the hierarchical namespace is on (https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-access-control). Azure role-based access control applies at the Azure scope you assign (account, container, and so on). Access control lists apply to directories and files. A person can have a data-plane role and still be limited by an ACL on one directory. This course does not treat a shared account key as the team password. Microsoft documents Microsoft Entra ID and shared access signatures as the preferred authorizations for data access.
Lifecycle management can move blobs between access tiers or delete them on a schedule you write (https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview). A rule is not a backup. Deleting a raw file after seven days is only safe if a later path still holds what the business must keep.
Northline's path convention, which is not an Azure feature:
raw/stock/yyyy/mm/dd/— the extract as it arrived, withas_ofin the path.curated/stock/— checked rows, still a copy of the warehouse.published/stock/— the path Power BI is allowed to read.
def lake_path(zone, subject, as_of):
if zone not in {"raw", "curated", "published"}:
raise ValueError("unknown zone")
return f"{zone}/{subject}/{as_of}"
def lifecycle_may_delete(zone, keep_published):
if zone == "published" and keep_published:
return False
return zone == "raw"
assert lake_path("raw", "stock", "2026-09-30") == "raw/stock/2026-09-30"
assert lifecycle_may_delete("raw", True) is True
assert lifecycle_may_delete("published", True) is FalseTeacher walkthrough: FX-100 lands once
All figures are illustrative.
- The storage account is in
rg-nl-analyticswith the hierarchical namespace enabled. - The factory writes
raw/stock/2026-09-30/stock.csv. The warehouse system remains the system of record. - A check job writes passing rows to
curated/stock/2026-09-30/. It does not overwrite raw. - Validation: the raw file's row count matches the extract log. FX-100's units match the warehouse screen for that
as_of. The published path is empty until curated passes.
A second workplace case
Retail photos and stock files share one container. A lifecycle rule meant for photos deletes raw/stock because the rule's prefix was raw/. The stock reload has nothing to read. Prefixes are part of the rule. A photo container and a stock filesystem do not share a delete rule.
Failure example: the folder that was only a name
Symptom: Renaming stock_final to stock_2026-09-30 takes hours and the bill spikes. Some tools still see the old files.
Diagnosis: The account has no hierarchical namespace. The "folder" was a name prefix. The tool copied every blob and deleted the originals. The root cause is the account setting, chosen before the data arrived.
Correction: New analytics accounts enable the hierarchical namespace before the first production load. Do not promise a revert. Existing flat accounts need a planned upgrade, not a Friday rename.
Validation: On a test account with the namespace on, renaming a directory is one operation and the file count is unchanged. The production account's property shows the hierarchical namespace enabled before the load.
Guided practice: write the three paths
Scenario: A supplier price file arrives nightly. Finance must keep the published price for the month. Raw files older than 14 days may go. Figures are illustrative. Fourteen days is Northline's choice, not a platform default.
Hints:
- Which zone may a lifecycle rule delete?
- What must be true before publish?
- Who is the system of record for the price?
Complete solution:
Raw path: raw/price/2026-09-30/prices.csv. Curated path: curated/price/2026-09-30/ after the row count matches the source log and the currency code is present. Published path: published/price/2026-09/ for the month finance reads. A lifecycle rule may expire raw after 14 days. It must not expire published/ while finance still reads that month. The ERP or the pricing system remains the system of record. The lake is a copy with as_of.
Independent practice
Design paths for one file your team receives.
Acceptance criteria:
- You name raw, curated, and published paths, including a date.
- You say whether the account needs a hierarchical namespace, and that it cannot be turned off later.
- You name one lifecycle action and the zone it may touch.
- You name who may read published data, and you do not hand them the account key.
- You name the system of record and the check that the copy matches it.
Common mistakes
- One container called
datafor raw and published files. - A lifecycle rule with a short prefix that covers more than the zone you meant.
- Sharing the storage account key in a chat because "RBAC was slow."
- Believing a directory delete on a flat account is one metadata call.
Quick check
- What setting turns on Azure Data Lake Storage capabilities?
- Can you turn the hierarchical namespace off after it is on?
- What is a folder name on an account without that namespace?
- Which zone in Northline's convention may the sample rule delete?
- Do ACLs replace Azure role assignments?
Answers:
- The hierarchical namespace on the storage account.
- No. The documented behavior is that you cannot revert to a flat namespace.
- A prefix in the blob name, not a real directory object.
- Raw, and only when published data must be kept.
- No. Role assignments and ACLs both apply. One does not erase the other.
Quiz alignment
The quiz asks you to enable the namespace on purpose, to keep lifecycle rules off the published zone, and to refuse a shared account key as the team design.
Lesson summary
Blob Storage plus a hierarchical namespace is the lake. Directories are real, and the switch sticks. Split raw, curated, and published. Expire only what you have agreed to lose. Grant directory access without handing out the account key.
Bridge to the next lesson
The next lesson schedules the job that writes raw/stock/. You will name the pipeline, the trigger, and the run you trust.