§ Lesson 05 / Specification Attributes

The cross-cutting rules.

Attributes are requirements that apply across a FOCUS dataset rather than at the column level. They define naming, data types, formatting, granularity, and recency. This is the longest lesson — reference it with the spec open in another tab.

5.1 — Attributes overview

Attributes make data usable across all FOCUS datasets, regardless of origin. The reference is in v1.2 here: focus.finops.org/…/v1-2/#attributes.

5.2 — Column Handling

Naming and ordering conventions for columns. Consistent names mean SQL is portable across all FOCUS sources.

Column name rules

Column order rules

Examples

ColumnStatusNote
ResourceIdValidPascal case, allowed Id abbreviation.
Resource_IdInvalidSnake case → should be ResourceId.
BillingAcctIdInvalidUses abbreviation “Acct” → BillingAccountId.
SKUIDInvalidAll caps → SkuId.

5.3 — Null Handling

FOCUS columns MUST use null when there’s no value — not empty strings, not 0, not "Not Applicable". Each column’s Content Constraints section indicates whether it allows nulls.

5.4 — Numeric Format

All numeric columns MUST contain a single numeric value. Allowed: integers, decimals, scientific notation. Forbidden: ranges, arrays, fractional notation (1/2), thousands separators, currency symbols, units of measure, positive signs (+). Negative signs are allowed.

AllowedNot allowed
87090, 1.259, -100.2, 35.2E-71 ½, $32, +333, 32 GiB, 3,432,342, [3,5,8]

5.5 — Date/Time Format

All date/time values MUST be in UTC, conform to ISO 8601, and end with Z:

YYYY-MM-DDTHH:mm:ssZ

5.6 — Currency Format

Currency columns MUST use a three-letter alphabetic code per ISO 4217:2015 (USD, EUR, JPY). Two currency types:

Billing Currency must always be a national currency. Virtual currency may appear in Pricing Currency.

5.7 — String Handling

Practical rule: join on immutable IDs, not mutable names. Use Resource ID for long-term tracking; use Resource Name for display.

5.8 — Discount Handling

Discount methods directly impact savings calculations. Some providers show list-price usage rows then subtract discounts in separate rows (causing double-count); others apply inline. Misunderstanding this can inflate “we saved $X” reports by 2–10×.

5.9 — Key-Value Format (Tags)

The most common Key-Value column is Tags. Format relies on JSON (ECMA 404):

{"team":"ops", "env":"prod", "owner":"finops", "review":null}

5.10 — Unit Format

Unit values follow one of three composite patterns:

Valid time-based units

Year, Month, Day, Hour, Minute, Second. Week is NOT a valid time-based unit.

Naming rules

5.11 — Metadata

FOCUS metadata tells you how to work with billing data before you load it. Two entities:

For cloud billing data, consider precision 30 / scale 15 — you’ll work with many small numbers that compose into very large totals.

Knowledge check

Q. A new data engineer joins your team and writes a small script to query “all resources missing a name”. They use WHERE ResourceName = '' and get zero results — even though half the fleet has no name set. What’s wrong?

Use IS NULL. FOCUS Null Handling requires nullable columns to use null for absent values — never empty strings, never placeholder text like "Not Applicable", never 0 for numeric columns. Filtering with = '' matches actual empty strings (which a conformant generator won’t emit) and silently misses every null. Same applies to aggregations — use COALESCE() / IFNULL to keep nulls from skewing results.