CloudQuery Platform
  • Introduction
    • Welcome to CloudQuery Platform
    • Getting Help
  • Quickstart
    • Creating a New Account
    • Platform Activation
  • Core Concepts
    • Integrations
    • Syncs
    • Filters & Queries
    • SQL Console
    • Reports
      • Built-in Report Templates
      • Reports Yaml Documentation with Examples
        • Full Report Example
  • Integration Guides
    • Setting up an AWS Integration
    • Setting up an AWS Cost and Usage Integration
    • Setting up a GCP Integration
    • Setting up an Azure Integration
    • Setting up a GitHub Integration
    • Setting up a K8s Integration
      • Using AWS EKS
      • Using Azure AKS
      • Using GCP GKE
    • General Integration Setup Guide
    • General Destination Setup Guide
  • Syncs
    • Setting up a Sync
    • Monitoring Sync Status
  • Cloud insights
    • From cloud asset inventory to insights
      • Security-focused queries
      • Compliance-focused queries
      • FinOps-focused queries
  • Production Deployment
    • Enabling Single Sign-on (SSO)
      • Single Sign-On with Google
      • Single Sign-On with Microsoft
      • Single Sign-On with Okta
  • User Management
    • Platform Roles Overview
    • Workspace Roles Overview
  • Advanced Topics
    • Custom Columns
    • Understanding Platform Views
    • Performance Tuning
  • Reference
    • Search & Filter Query Syntax
  • API Reference
  • CLI Docs
  • CloudQuery Hub
Powered by GitBook
On this page
  • Creating a Custom Column
  • Supported SQL Expressions
  • Example Use Cases
  • Query Examples

Was this helpful?

  1. Advanced Topics

Custom Columns

Custom Columns let you enrich your cloud asset inventory with metadata from any source, like ownership, cost, security scores, lifecycle tags, and more, alongside your native cloud resource data.

CloudQuery’s Custom Columns feature allows you to define new columns on any asset table and populate them via SQL expressions (e.g., extracting tags or fields).

Once added, these columns become:

  • Filterable in the UI

  • Searchable via SQL

  • Queryable in reports and dashboards


Creating a Custom Column

You can create a Custom Column via the UI:

  1. Navigate to: Settings → Custom Columns

  2. Click: Add Column

  3. Fill in:

    • Label: UI display name (e.g., “Team”)

    • Name: Backend ID (snake_case)

    • Description (optional): Purpose of the column

    • Enrichment Type:

      • From existing field → Use a SQL expression

      • From external source → Populate via API

    • Value Expression: SQL to extract or transform the value (e.g., tags['team'])

Once saved, the column appears in the asset inventory and can be filtered/searched just like native fields.


Supported SQL Expressions

Tag Extraction

tags['team']
tags['cost_center']

JSON Parsing

JSONExtractString(tags['metadata'], 'department')
JSONExtract(tags['finance'], 'budget', 'Float64')

Normalization / Cleanup

lower(tags['env'])  -- normalize prod, Prod, PROD
multiIf(
  tags['env'] = 'production', 'prod',
  tags['env'] = 'staging', 'stage',
  tags['env']
)

Conditional Defaults

COALESCE(NULLIF(tags['team'],''),'unknown')

Lifecycle Metadata

parseDateTimeBestEffort(tags['deletion_date'])
toDate(now() + INTERVAL 30 DAY)

Example Use Cases

Column

Type

Expression / Source

Description

team

String

tags['team']

Surface team ownership

normalized_env

String

lower(tags['env'])

Normalize inconsistent tag values

scheduled_delete

Date

parseDateTimeBestEffort(tags['deletion'])

Track lifecycle cleanup dates

Query Examples

SELECT account, region, name, tags, team FROM cloud_assets
WHERE team == ''
PreviousWorkspace Roles OverviewNextUnderstanding Platform Views

Last updated 14 days ago

Was this helpful?

You can use any valid when the value type is expression. Here are some common examples:

ClickHouse SQL expression