> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Standard Columns

> Costory normalizes billing data from AWS, GCP, Azure, Datadog, and Elastic Cloud into a unified schema. Here is how each column is populated per provider.

Costory ingests raw billing exports from each cloud provider and normalizes them into a consistent set of `cos_*` columns. This lets you query, filter, and group costs across providers using a single schema, so you don't need to learn each provider's billing format. For Elastic Cloud setup and grain (project × day × product line), see [Elastic Cloud billing](https://docs.costory.io/setup/billing/elastic-cloud.md). BigQuery job fields (`cos_query_*`) are attached when you connect [BigQuery jobs](https://docs.costory.io/setup/usage-metrics/bigquery-jobs.md). They are not part of the raw GCP billing export.

Columns are organized into the following categories:

| Category | Description |
| - | - |
| **Invoice** | Fields sourced directly from the provider billing export (accounts, charges, services, regions, resources, Kubernetes labels) |
| **Costory** | Fields enriched by Costory (standardized region names, compute metadata, pricing model, marketplace flag) |
| **Datasources** | The Costory datasource that produced the row |

***

## Datasource & Provider Identification

### Invoice Issuer

The legal entity issuing the invoice, it also helps identifying marketplace purchases.

> [tab] AWS
>
> Sourced from `line_item_legal_entity`.

> [tab] GCP
>
> `"Google Cloud"` for first-party Google transactions (Compute Engine,
> Invoice service). For marketplace purchases, falls back to `seller_name` or
> `service.description`.

> [tab] Azure
>
> Hardcoded to `"Azure"`.

> [tab] Datadog
>
> Hardcoded to `"DataDog"`.

> [tab] Elastic Cloud
>
> Hardcoded to `"Elastic Cloud"`.

## Account & Billing

### Billing Account Id

The top-level billing or payer account.

> [tab] AWS
>
> `bill_payer_account_id`

> [tab] GCP
>
> `billing_account_id`

> [tab] Azure
>
> `BillingAccountId`

> [tab] Datadog
>
> `account_name`

> [tab] Elastic Cloud
>
> Elastic **project id** (`id` on the daily project snapshot).

***

### Sub Account ID / Project ID

The sub-account, project, or subscription under which the cost is incurred.

> [tab] AWS
>
> `line_item_usage_account_name`

> [tab] GCP
>
> `project.name` (falls back to `service.description`).

> [tab] Azure
>
> `SubscriptionName`

> [tab] Datadog
>
> `account_name`

> [tab] Elastic Cloud
>
> Elastic **project name** (`name`).

***

## Charge Classification

### Charge Category

Classifies the type of charge. Normalized to one of: `Usage`, `Purchase`, `Tax`, `Adjustment`.

> [tab] AWS
>
> Mapped from `line_item_line_item_type`: - `Usage`,
> `SavingsPlanCoveredUsage`, `SavingsPlanNegation`, `DiscountedUsage`,
> `BundledDiscount`, `Discount`, `PrivateRateDiscount`, `EdpDiscount` becomes
> **Usage** - `Fee`, `SavingsPlanUpfrontFee`, `RIFee`,
> `SavingsPlanRecurringFee` becomes **Purchase** - `Credit`, `Refund` becomes
> **Adjustment** - `Tax` becomes **Tax**

> [tab] GCP
>
> Mapped from `cost_type`: - `regular` becomes **Usage** - `tax` becomes **Tax** -
> `adjustment`, `credit`, `rounding_error`, and discount credit types becomes
> **Adjustment**

> [tab] Azure
>
> Mapped from `ChargeType`: - `Usage`, `UnusedReservation`,
> `UnusedSavingsPlan` becomes **Usage** - `Purchase` becomes **Purchase** - `Tax` becomes
> **Tax** - Everything else becomes **Adjustment**

> [tab] Datadog
>
> Always **Usage**.

> [tab] Elastic Cloud
>
> Always **Usage**.

***

### Charge Description

A human-readable description of the charge line item.

> [tab] AWS
>
> `line_item_line_item_description`

> [tab] GCP
>
> `sku.description`

> [tab] Azure
>
> `COALESCE(ProductName, ServiceName)`

> [tab] Datadog
>
> `charge_type`

> [tab] Elastic Cloud
>
> Full Elastic product line label for that line (same as **Service name**).

***

### Charge Frequency

How often the charge recurs. Normalized to: `One-Time`, `Recurring`, `Usage-Based`.

> [tab] AWS
>
> Based on `bill_bill_type`: - `Refund` or `Purchase` becomes **One-Time** -
> `Anniversary` becomes **Recurring**

> [tab] GCP
>
> Always **Recurring**.

> [tab] Azure
>
> Sourced from the `Frequency` field: - `OneTime` becomes **One-Time** - `Recurring`
> becomes **Recurring** - `UsageBased` becomes **Usage-Based**

> [tab] Datadog
>
> Always **Recurring**.

> [tab] Elastic Cloud
>
> Always **Usage-Based**.

***

## Service & SKU

### Category

A high-level cost category such as Compute, Storage, or Networking.
Mapped from a defined list of services.

> [tab] AWS
>
> Mapped from a defined list of services.

> [tab] GCP
>
> Mapped from a defined list of services.

> [tab] Azure
>
> Mapped from a defined list of services.

> [tab] Datadog
>
> Mapped from a defined list of services.

> [tab] Elastic Cloud
>
> Line **`type`** from the product line JSON (for example **`VCU`**, **`Search AI Lake`**, **`support`**).

***

### Service Name

The name of the cloud service.

> [tab] AWS
>
> `line_item_product_code` for first-party services. For marketplace,
> extracted from `product.key_value` (`product_name`).

> [tab] GCP
>
> `service.description`

> [tab] Azure
>
> `ConsumedService`

> [tab] Datadog
>
> `product_name`

> [tab] Elastic Cloud
>
> Full Elastic product line label for that line (for example `Elasticsearch - General Purpose - Search VCU (GCP us-central1)`).

***

### SKU ID

The SKU identifier.

> [tab] AWS
>
> `product_sku` for first-party services; marketplace product name otherwise.

> [tab] GCP
>
> `sku.id`

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `product_name`

> [tab] Elastic Cloud
>
> Product line **`sku`** code (for example `elasticsearch.general-purpose-search-vcu_gcp-us-central1`).

***

### SKU Description

A human-readable SKU description.

> [tab] AWS
>
> `CONCAT(product_operation, "_", product_product_family)` for first-party
> services; marketplace product name otherwise.

> [tab] GCP
>
> `sku.description`

> [tab] Azure
>
> `meterName`

> [tab] Datadog
>
> `charge_type`

> [tab] Elastic Cloud
>
> Same as **Service name** (human-readable product line label).

***

## Location & Infrastructure

### Availability Zone

The availability zone of the resource.

> [tab] AWS
>
> `line_item_availability_zone`

> [tab] GCP
>
> `location.zone`

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### Region ID

The raw, provider-specific region identifier.

> [tab] AWS
>
> `product.key_value["region"]` or `product_region_code`

> [tab] GCP
>
> `location.region`

> [tab] Azure
>
> `ResourceLocation`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> Parsed from the product line **SKU** when it includes a cloud/region suffix (for example `gcp-us-central1` from `..._gcp-us-central1`); otherwise `NULL`.

***

### Region

The standardized, human-readable region name. Costory maps each provider's raw region identifier to a common name via an internal region mapper.

> [tab] AWS
>
> `StandardRegionName` joined on `product_region_code`.

> [tab] GCP
>
> `StandardRegionName` joined on `location.region`.

> [tab] Azure
>
> `StandardRegionName` joined on `ResourceLocation`.

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> Same **region token** as **Region ID** when present (Elastic encodes region in the SKU string).

***

## Resource

### Resource Id

The unique identifier of the resource.

> [tab] AWS
>
> `line_item_resource_id`

> [tab] GCP
>
> `resource.global_name` (detailed billing only, otherwise `NULL`).

> [tab] Azure
>
> `COALESCE(ResourceId, InstanceId)`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> Elastic **project id** (same as **Billing account id**).

***

### Resource Name

A human-readable name for the resource.

> [tab] AWS
>
> `line_item_resource_id` (same as Resource Id).

> [tab] GCP
>
> `resource.name` (detailed billing only, otherwise `NULL`).

> [tab] Azure
>
> `COALESCE(ResourceGroupName, ResourceGroup)`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> Elastic **project name** (same as **Sub account id**).

***

## Commitment Discounts

### Commitment Discount Category

The type of commitment discount. `Usage` indicates a resource-based commitment (Reserved Instances, resource-based CUDs). `Spend` indicates a dollar-based commitment (Savings Plans, dollar-based CUDs).

> [tab] AWS
>
> * Savings Plan ARN present becomes **Spend** - Reservation ARN present becomes **Usage**

> [tab] GCP
>
> * `COMMITTED_USAGE_DISCOUNT_DOLLAR_BASE` becomes **Spend** -
>   `COMMITTED_USAGE_DISCOUNT` becomes **Usage**

> [tab] Azure
>
> * `microsoft.capacity` in `benefitId` becomes **Usage** -
>   `microsoft.billingbenefits` in `benefitId` becomes **Spend**

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### Commitment Discount Id

The identifier of the commitment discount (ARN, CUD name, or benefit ID).

> [tab] AWS
>
> `savings_plan_savings_plan_a_r_n` or `reservation_reservation_a_r_n`

> [tab] GCP
>
> `cud.full_name` (extracted from credits array).

> [tab] Azure
>
> `benefitId`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

## Compute Enrichment

These fields are enriched by Costory to provide deeper visibility into compute spend.

### Machine Type

The instance or machine type (e.g., `m5.xlarge`, `n2-standard-4`).

> [tab] AWS
>
> Extracted from `line_item_usage_type` after the `:` separator.

> [tab] GCP
>
> From `system_labels` where the key matches `machine_spec`.

> [tab] Azure
>
> Extracted from `ProductName` via regex, for Virtual Machines Compute only.

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### Machine Family

The machine family (e.g., `m5`, `n2`, `Dv3`).

> [tab] AWS
>
> First part of the machine type (split on `.`).

> [tab] GCP
>
> First part of the `machine_spec` system label (split on `-`).

> [tab] Azure
>
> Extracted from `MeterSubCategory` via regex (`Virtual Machines Xxx Series`).

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### Pricing Model (Spot / On Demand)

How the resource is priced. Normalized to: `On Demand`, `Spot`, `Reservation`, `Savings Plan`.

> [tab] AWS
>
> * `DiscountedUsage` becomes **Reservation** - `SavingsPlanCoveredUsage` becomes
>   **Savings Plan** - Usage type contains `SpotUsage` becomes **Spot** - `Usage` becomes
>   **On Demand**

> [tab] GCP
>
> SKU description contains `Spot` or `Preemptible` becomes **Spot**; otherwise **On
> Demand**.

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### Marketplace Purchase

Whether the charge is a marketplace purchase. This field is not populated directly by billing converters. It is derived downstream by Costory.

***

### Line Item Usage Type

The raw usage type from the provider. Not populated as a `cos_*` column in converters. Available via provider-specific labels (e.g., `aws_line_item_usage_type` for AWS).

> [tab] AWS
>
> `line_item_usage_type`

> [tab] GCP
>
> SKU description

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> Line **`type`** on the product line (for example **`VCU`**). Also available on labels such as **`line_type`**.

***

## Kubernetes

These fields provide Kubernetes-level cost attribution. For GCP, most are populated natively from GKE billing labels. For AWS and Azure, they are typically enriched downstream via Costory's K8s integration.

### K8s Cluster Name

The name of the kubernetes cluster.

> [tab] AWS
>
> `NULL` (populated downstream via K8s enrichment).

> [tab] GCP
>
> Label `k8s-cluster-name`.

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### K8s Namespace

The kubernetes namespace for that cost.

> [tab] AWS
>
> `NULL`

> [tab] GCP
>
> Label `k8s-namespace`.

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### K8s Namespace Reallocated

Namespace reallocated: is a view over namespace with the waste cost reallocated to each namespace depending on their usage: this is only available on AWS EKS.

***

### K8s Workload Name

The name of the workload, it's the name of pod it can contain ids.

> [tab] AWS
>
> `NULL`

> [tab] GCP
>
> Label `k8s-workload-name`.

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### K8s Workload Type

The Kubernetes workload type (Deployment, StatefulSet, DaemonSet, etc.).

> [tab] AWS
>
> `NULL`

> [tab] GCP
>
> Label `k8s-workload-type`.

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`

***

### K8s Node Pool Name

The name of the node pool (node group in AWS).

> [tab] AWS
>
> Resource tag matching `nodegroup_name`.

> [tab] GCP
>
> Label `k8s-node-pool-name`.

> [tab] Azure
>
> `NULL`

> [tab] Datadog
>
> `NULL`

> [tab] Elastic Cloud
>
> `NULL`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.