GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Product
  • View Product Pricing
  • Infrastructure Monitoring
  • Custom Metrics
  • Network Monitoring
  • End User Device Monitoring
  • Container Monitoring
  • Kubernetes Autoscaling
  • Serverless Monitoring
  • Cloud Cost Management
  • Storage Management
  • GPU Monitoring
  • Application Performance Monitoring
  • Universal Service Monitoring

This view

  • Original page
  • New address

GeezerVison is showing docs.datadoghq.com (truncated) — DDSQL Reference

For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/ddsql_reference.md. A documentation index is available at /llms.txt.
    Home Docs API
  • Agents
  • Essentials
    • Getting Started
      • Agent
      • API
      • APM Tracing
      • Containers
        • Autodiscovery
        • Datadog Operator
      • Dashboards
      • Database Monitoring
      • Datadog
      • Datadog Site
      • DevSecOps
      • Incident Management
      • Integrations
        • AWS
        • Azure
        • Google Cloud
        • OCI
        • Terraform
        • Stripe
      • Internal Developer Portal
      • Logs
      • Monitors
      • Notebooks
      • OpenTelemetry
      • Profiler
      • Search
        • Product-Specific Search
      • Session Replay
      • Security
        • App and API Protection
        • Cloud Security
        • Cloud SIEM
        • Code Security
      • Serverless for AWS Lambda
      • Software Delivery
        • CI Visibility
        • Feature Flags
        • Test Optimization
        • Test Impact Analysis
        • MCP Tools
      • Synthetic Monitoring and Testing
        • API Tests
        • Browser Tests
        • Mobile App Tests
        • Continuous Testing
        • Private Locations
      • Tags
        • Assigning Tags
        • Unified Service Tagging
        • Using Tags
      • Teams
      • Workflow Automation
      • Access for Enterprises
        • Choosing Your Datadog Topology
        • Permissions and Feature Access
        • Assigning Users to Roles and Teams
        • Protecting Assets
        • Protecting Sensitive Data
        • Credential Management
        • Creating Access Policies
        • Sharing Across Organizations
        • Example Implementations
      • Learning Center
      • Support
    • Glossary
    • Standard Attributes
    • Guides
    • Agent
      • Architecture
      • IoT
      • Supported Platforms
        • AIX
        • Linux
        • Ansible
        • Chef
        • Heroku
        • MacOS
        • Puppet
        • SaltStack
        • SCCM
        • Windows
        • From Source
      • Log Collection
        • Log Agent tags
        • Advanced Configurations
        • Proxy
        • Transport
        • Multi-Line Detection
      • Configuration
        • Commands
        • Configuration Files
        • Log Files
        • Status Page
        • Network Traffic
        • Proxy Configuration
        • FIPS Compliance
        • Dual Shipping
        • Secrets Management
        • Infrastructure Modes
        • Agent Data Plane
      • Fleet Automation
        • Fleet View
        • Access Control
        • Configure Agents
        • Supported datadog.yaml Fields
        • Configure Agent Integrations
        • Configure Custom Logs
        • Modify Tags
        • Configuration Policies
        • Upgrade Agents
        • Upgrade SDKs
        • OpenTelemetry Collectors
      • Troubleshooting
        • Container Hostname Detection
        • Debug Mode
        • Agent Flare
        • Agent Check Status
        • NTP Issues
        • Permission Issues
        • Integrations Issues
        • Site Issues
        • Autodiscovery Issues
        • Windows Container Issues
        • Agent Runtime Configuration
        • High CPU or Memory Consumption
        • Missing Log Bytes
      • Guides
      • Data Security
    • Integrations
      • Guides
    • Client SDKs
      • Setup
      • Advanced Configuration
      • Data Collected
      • Integrated Libraries
      • Troubleshooting
    • Extend Datadog
      • Authorization
        • OAuth2 in Datadog
        • Authorization Endpoints
      • DogStatsD
        • Datagram Format
        • Unix Domain Socket
        • High Throughput Data
        • Data Aggregation
        • DogStatsD Mapper
      • Custom Checks
        • Writing a Custom Agent Check
        • Writing a Custom OpenMetrics Check
      • Integrations
        • Build an Integration with Datadog
        • Create an Agent-based Integration
        • Create an API-based Integration
        • Create a Log Pipeline
        • Integration Assets Reference
        • Build a Marketplace Offering
        • Create an Integration Dashboard
        • Create a Monitor Template
        • Create a Cloud SIEM Detection Rule
        • Install Agent Integration Developer Tool
      • Service Checks
        • Submission - Agent Check
        • Submission - DogStatsD
        • Submission - API
      • Community
        • Libraries
      • Guides
    • OpenTelemetry
      • Getting Started
      • Feature Compatibility
      • Instrument Your Applications
        • DDOT SDKs
        • Upstream OpenTelemetry SDKs
      • Send Data to Datadog
        • DDOT Collector
        • Upstream OpenTelemetry Collector
        • Direct OTLP Ingest
        • Datadog Agent
      • Semantic Mapping
        • Resource Attribute Mapping
        • Metrics Mapping
        • Infrastructure Host Mapping
        • Hostname Mapping
        • Service-entry Spans Mapping
      • Ingestion Sampling
      • Correlate Data
        • Logs and Traces
        • Metrics and Traces
        • RUM and Traces
        • DBM and Traces
      • Integrations
        • Apache Metrics
        • Apache Spark Metrics
        • Collector Health Metrics
        • Datadog Extension
        • OpAMP Extension
        • Docker Metrics
        • HAProxy Metrics
        • Host Metrics
        • IIS Metrics
        • Kafka Metrics
        • Kubernetes Metrics
        • MongoDB Metrics
        • MySQL Metrics
        • PostgreSQL Metrics
        • NGINX Metrics
        • Podman Metrics
        • RabbitMQ Metrics
        • Redis Metrics
        • Runtime Metrics
        • SQL Server Metrics
        • Trace Metrics
      • Fleet Automation
      • Troubleshooting
      • Guides and Resources
        • OpenTelemetry Demo Application
        • Produce Delta Temporality Metrics
        • Instrument Unsupported Runtimes
        • Migration Guides
      • Reference
        • Terms and Concepts
        • Trace Context Propagation
        • Trace IDs
        • OTLP Metric Types
    • Administrator's Guide
      • Getting Started
      • Plan
      • Build
      • Run
    • API
    • Command Line
    • MCP Server
      • Setup
      • MCP Tools
      • Code Execution
    • Partners
    • Datadog Mobile App
      • Enterprise Configuration
      • Datadog for Intune
      • Shortcut Configurations
      • Push Notifications
      • Widgets
      • Guides
    • DDSQL Reference
      • Data Directory
    • Remote Configuration
    • Cloudcraft (Standalone)
      • Getting Started
      • Account Management
      • Components: Common
      • Components: Azure
      • Components: AWS
      • Advanced
      • FAQ
      • API
        • AWS Accounts
        • Azure Accounts
        • Blueprints
        • Budgets
        • Teams
        • Users
  • In The App
    • Dashboards
      • Configure
      • Dashboard List
      • Widgets
        • Configuration
        • Widget Types
      • Querying
      • Functions
        • Algorithms
        • Arithmetic
        • Count
        • Exclusion
        • Interpolation
        • Rank
        • Rate
        • Regression
        • Rollup
        • Smoothing
        • Telemetry Source
        • Timeshift
        • Beta
      • Graph Insights
        • Metric Correlations
        • Investigate Anomalies
        • Watchdog Explains
      • Template Variables
      • Overlays
      • Annotations
      • Guides
      • Sharing
        • Shared Dashboards
        • Widget Share URLs
        • Secure Embedded Dashboards
        • Share Graphs
        • Scheduled Reports
    • Notebooks
      • Analysis Features
        • Getting Started
      • Markdown Format
      • API Guide
      • Guides
    • DDSQL Editor
    • Reference Tables
    • Sheets
      • Functions and Operators
      • Guides
    • Monitors and Alerting
      • Draft Monitors
      • Configure Monitors
      • Monitor Templates
      • Monitor Types
      • Notifications
        • Notification Rules
        • Variables
      • Downtimes
        • Examples
      • Manage Monitors
        • Search Monitors
        • Check Summary
      • Monitor Status
        • Status Graphs
        • Status Events
      • Monitor Settings
      • Monitor Quality
      • Guides
    • Service Level Objectives
      • Monitor-based SLOs
      • Metric-based SLOs
      • Time Slice SLOs
      • Error Budget Alerts
      • Burn Rate Alerts
      • Guides
    • Metrics
      • Custom Metrics
        • Metric Type Modifiers
        • Historical Metrics Ingestion
        • Submission - Agent Check
        • Submission - DogStatsD
        • Submission - Powershell
        • Submission - API
      • OpenTelemetry Metrics
        • OTLP Metric Types
        • Query OpenTelemetry Metrics
      • Metrics Types
      • Distributions
      • Overview
      • Explorer
        • Metrics Units
      • Catalog
      • Advanced Filtering
      • Nested Queries
      • Reference Table Joins with Metrics
      • Derived Metrics
      • Metrics Without Limits™
      • Guides
    • Watchdog
      • Alerts
      • Impact Analysis
      • RCA
      • Insights
      • Faulty Deployment Detection
      • Faulty Cloud & SaaS API Detection
    • Bits AI
      • Bits Agent Builder
        • Improve agents using traces
      • Bits Autonomous Operations
        • Bits Detection
        • Bits Investigation
        • Bits Remediation
      • Bits Chat
        • Use Bits Chat
        • Bits CLI
      • Bits Code
        • Setup
        • Automations
        • Code Channels in Slack
      • Bits Data Analysis
      • Bits Database Optimization
      • Bits Live Debugger
      • Bits Maintenance
        • Setup
        • Campaigns and Plans
        • Upgrade Instructions and Memories
      • Bits Release
      • Bits Security Analyst
      • Bits AI Settings
        • Skills Library
        • AI Credit Limits
    • Internal Developer Portal
      • Catalog
        • Set Up
        • Entity Model
        • Troubleshooting
      • Scorecards
        • Scorecard Configuration
        • Custom Rules
        • Using Scorecards
      • Self-Service Actions
        • Software Templates
      • Engineering Reports
        • Teams Performance
        • Reliability Overview
        • Catalog Health
        • Scorecards Performance
        • DORA Metrics
        • Custom Reports
      • Homepage
      • Campaigns
      • External Provider Status
      • Integrations
      • Use Cases
        • API Management
        • Cloud Cost Management
        • App and API Protection
        • Developer Onboarding
        • Dependency Management
        • Production Readiness
        • Incident Response
        • CI Pipeline Visibility
      • Onboarding Guide
    • Error Tracking
      • Explorer
      • Issue States
      • Regression Detection
      • Suspected Causes
      • Error Grouping
      • Bits Investigation
      • Monitors
      • Identify Suspect Commits
      • Auto Assign
      • Issue Team Ownership
      • Track Browser and Mobile Errors
        • Browser Error Tracking
        • Collecting Browser Errors
        • Mobile Crash Tracking
        • Replay Errors
        • Real User Monitoring
        • Logs
      • Track Backend Errors
        • Getting Started
        • Exception Replay
        • Capturing Handled Errors
        • APM
        • Logs
      • Manage Data Collection
      • Ticketing Systems
        • Jira
        • Linear
        • Work Management
      • Link Pull Requests
      • Troubleshooting
      • Guides
    • Change Tracking
      • Change Types
        • Feature Flags
    • Event Management
      • Ingest Events
      • Pipelines and Processors
        • Aggregation Key Processor
        • Arithmetic Processor
        • Date Remapper
        • Category Processor
        • Grok Parser
        • Lookup Processor
        • Remapper
        • Service Remapper
        • Status Remapper
        • String Builder Processor
        • VRL Processor
      • Explorer
        • Searching
        • Navigate the Explorer
        • Customization
        • Facets
        • Attributes
        • Notifications
        • Analytics
        • Saved Views
      • Triage Inbox
      • Correlation
        • Configuration
        • Triaging & Notifying
        • Analytics
        • Maintenance Windows
      • Guides
  • Incident Response
    • Incident Management
      • Incident Investigation
        • Declare an Incident
        • Describe an Incident
        • Response Team
        • Notification
        • Timeline
        • Incident AI
        • Meeting Summaries and Transcripts
      • Setup and Configuration
        • Information
        • Property Fields
        • Transition Forms
        • Responder Roles
        • Automations
        • Notification Rules
        • Templates
        • Variables
      • Post Incident
        • Follow-ups
        • Postmortems
      • Analytics and Reporting
      • Integrations
        • Slack
        • Microsoft Teams
        • Google Chat
        • Jira
        • ServiceNow
        • Status Pages
        • Atlassian Statuspage
        • Google Meet
        • Zoom
      • Guides
    • On-Call
      • Onboard a Team
      • Pages
        • Live Call Routing
        • Cross-org Paging
      • Routing Rules
      • Escalation Policies
      • Schedules
      • Handover automation
      • Notification Preferences
        • Supported Countries
      • Analytics
      • Integrations
        • ServiceNow
        • Jira
      • Guides
    • Status Pages
      • Components
      • Notices
      • Notice Templates
      • Subscriptions
    • Work Management
      • Projects
        • Settings
      • Create a Work Item
      • Customization
      • View and Manage Work Items
      • Notifications and Integrations
      • Work Item Automation Rules
      • Work Item Approvals
      • AI Tools
        • Custom Agents
      • Troubleshooting
  • Actions & Remediations
    • Bits Agent Builder
      • Improve agents using traces
    • Workflow Automation
      • Build Workflows
      • Access and Authentication
      • Trigger Workflows
      • Variables and parameters
      • Actions
        • Workflow Logic
      • Save and Reuse Actions
      • Test and Debug
      • Expressions
      • Track Workflows
      • Limits
      • MCP Tools
    • Apps
      • Embed Apps
    • App Builder
      • Build Apps
      • Access and Authentication
      • Queries
      • Variables
      • Events
      • Components
        • Custom Charts
        • React Renderer
        • Tables
        • Reusable Modules
      • JavaScript Expressions
      • Embed App Builder Apps
        • Input Parameters
      • Save and Reuse Actions
    • Datastores
      • Create and Manage Datastores
      • Use Datastores with Apps and Workflows
      • Automation Rules
      • Access and Authentication
    • Forms
      • Components
      • Responses
      • Guides
    • Action Catalog
      • Connections
        • HTTP Request
        • Integration Connections
        • Google Workspace
        • GitHub App Connection
        • Private Action Credentials
      • Execution Policies
      • Private Actions
        • Getting Started
        • Set Up in the Datadog Agent
        • Set Up a Standalone Runner
        • Enrollment and Ownership
        • Authorize Private Actions
        • Run a Script
        • Reference
  • Infrastructure
    • Cloudcraft
      • Overlays
        • Infrastructure
        • Observability
        • Security
        • Cloud Cost Management
        • Monitors
        • APM
    • Resource Catalog
      • Cloud Resources Schema
      • Policies
      • Resource Changes
    • Universal Service Monitoring
      • Setup
      • Guides
    • End User Device Monitoring
      • Setup
        • macOS
        • Windows
    • Hosts
      • Host List
    • Containers
      • Container Monitoring
        • Containers Explorer
        • Container Images Explorer
        • Kubernetes Explorer
        • Amazon ECS Explorer
      • Autoscaling
        • Manifest Reference
        • Cluster
      • Docker-based
        • APM
        • Log collection
        • Tag extraction
        • Integrations
        • Prometheus
        • Data Collected
      • Kubernetes
        • Installation
        • OpenTelemetry
        • Migrate to the Datadog Operator
        • Further Configuration
        • Distributions
        • APM
        • App and API Protection
        • Log collection
        • Tag extraction
        • Integrations
        • Prometheus & OpenMetrics
        • Control plane monitoring
        • Data collected
        • kubectl Plugin
        • Datadog CSI Driver
        • Data security
      • Cluster Agent
        • Setup
        • Commands & Options
        • Cluster Checks
        • Endpoint Checks
        • Admission Controller
      • Amazon ECS
        • APM
        • Log collection
        • Tag extraction
        • Data collected
        • Managed Instances
        • AWS Fargate with ECS
      • Datadog Operator
        • Migrate to the Datadog Operator
        • Advanced Install
        • Configuration
        • Datadog Agent Profiles
        • Providers
        • Custom Checks
        • Data Collected
        • Secret Management
        • DatadogDashboard CRD
        • DatadogGenericResource CRD
        • DatadogMonitor CRD
        • DatadogSLO CRD
        • DatadogBYOCCluster CRD
      • Troubleshooting
        • Duplicate hosts
        • Cluster Agent
        • Cluster Checks
        • HPA and Metrics Provider
        • Admission Controller
        • Log Collection
      • Guides
    • Processes
      • Increase Process Retention
    • Serverless
      • AWS
        • AWS Lambda
        • AWS Step Functions
        • AWS Fargate
      • Azure
        • Azure App Service
        • Azure Container Apps
        • Azure Database & Messaging Services
        • Azure Functions
        • Azure Logic Apps
      • Google
        • Cloud Run Containers
        • Cloud Run Jobs (Preview)
        • Cloud Run Functions
        • Cloud Run Functions (1st generation)
      • Libraries & Integrations
      • Glossary
      • Guides
    • Network Monitoring
      • Cloud Network Monitoring
        • Setup
        • Network Health
        • Network Analytics
        • Network Map
        • Guides
        • Supported Cloud Services
        • Terms and Concepts
      • DNS Monitoring
      • Network Device Monitoring
        • Setup
        • Summary Page
        • Integrations
        • Profiles
        • Configuration Management
        • Maps
        • SNMP Metrics Reference
        • Troubleshooting
        • Guides
        • Terms and Concepts
      • NetFlow Monitoring
        • Monitors
      • Network Path
        • Setup
        • List View
        • Path View
        • Autonomous Systems View
        • On-Demand Tests
        • Monitors
        • Guides
        • Terms and Concepts
      • L1 to L7 Map
    • Storage Management
      • Amazon S3
      • Google Cloud Storage
      • Azure Blob Storage
  • Cloud Cost
    • Cloud Cost
      • Datadog Costs
      • Setup
        • Permissions
        • AWS
        • Azure
        • Google Cloud
        • Oracle
        • SaaS and AI Costs
        • Custom
      • Tags
        • Tag Explorer
        • Multisource Querying
      • Allocation
        • Tag Pipelines
        • Container Cost Allocation
        • BigQuery Costs
        • Custom Allocation Rules
      • AI Costs
        • AI Gateway Allocation
      • Reporting
        • Scheduled Reports
        • Explorer
        • Dashboard
      • Recommendations
        • Cost Optimization Automations
        • Notifications
        • Custom Recommendations
      • Planning
        • Budgets
        • Forecasting
        • Commitment Programs
        • Outcomes
      • Cost Changes
        • Monitors
        • Anomalies
        • Real-Time Costs
      • Cloud Cost Skill
  • Application Performance
    • APM
      • APM Terms and Concepts
      • Application Instrumentation
        • Single Step Instrumentation
        • Manually managed SDKs
        • Code-based Custom Instrumentation
        • Dynamic Instrumentation
        • Library Compatibility
        • Library Configuration
        • Configuration at Runtime
        • Trace Context Propagation
        • Serverless Application Tracing
        • Proxy Tracing
        • Span Tag Semantics
        • Span Links
      • APM Metrics Collection
        • Trace Metrics
        • Runtime Metrics
      • Trace Pipeline Configuration
        • Ingestion Mechanisms
        • Ingestion Controls
        • Adaptive Sampling
        • Processing Pipelines
        • Generate Metrics
        • Trace Retention
        • Usage Metrics
      • Correlate Traces with Other Telemetry
        • Correlate DBM and Traces
        • Correlate Logs and Traces
        • Correlate RUM and Traces
        • Correlate Synthetics and Traces
        • Correlate Profiles and Traces
      • Trace Explorer
        • Search Spans
        • Query Syntax
        • Trace Queries
        • Span Tags and Attributes
        • Span Visualizations
        • Trace View
        • Tag Analysis
      • Recommendations
      • Code Origin for Spans
      • Service Observability
        • Catalog
        • Service Page
        • Resource Page
        • Deployment Tracking
        • Service Map
        • Inferred Services
        • Service Remapping Rules
        • Env Remapping Rules
        • Resource Renaming Rules
        • Tag Enrichment
        • Integration Override Removal
        • APM Monitors
      • Endpoint Observability
        • Explore Endpoints
        • Monitor Endpoints
      • Live Debugger
        • Bits Live Debugger
        • Sensitive Data Scrubbing
      • Error Tracking
        • Issue States
        • Error Tracking Explorer
        • Error Grouping
        • Stack Traces
        • Monitors
        • Identify Suspect Commits
        • Exception Replay
        • Troubleshooting
      • Data Security
      • Guides
      • Troubleshooting
        • Agent Rate Limits
        • Agent APM metrics
        • Agent Resource Usage
        • Correlated Logs
        • PHP 5 Deep Call Stacks
        • .NET diagnostic tool
        • APM Quantization
        • Go Compile-Time Instrumentation
        • Tracer Startup Logs
        • Tracer Debug Logs
        • Connection Errors
        • SDK Configurations
    • Continuous Profiler
      • Enabling the Profiler
        • Supported Language and SDK Versions
      • Profile Types
      • Profile Visualizations
      • Investigate Slow Traces or Endpoints
      • Compare Profiles
      • Automated Analysis
      • Profiler Troubleshooting
        • Java
        • Python
        • Go
        • Ruby
        • Node.js
        • .NET
        • PHP
        • C/C++/Rust
        • Full-Host Profiler
      • Guides
    • Database Monitoring
      • Set Up DBM
        • Setup Architectures
        • Agent Integration Overhead
        • Postgres
        • MySQL
        • MariaDB
        • SQL Server
        • Oracle
        • MongoDB
        • ClickHouse
        • IBM Db2
        • Amazon DocumentDB
        • Provision the Agent with Terraform
      • Data Collected
      • Explore DBM
        • Database Hosts
        • Query Metrics
        • Custom Metrics
        • Query Samples
        • Database Schemas
        • Recommendations
      • Connecting DBM and Traces
      • Database Investigations in Bits Chat
      • Bits Database Optimization
      • Database Monitoring Workbench
      • Database Monitoring PR Reviews
      • Role Observability
      • Troubleshooting
      • Guides
    • Data Streams Monitoring
      • Setup
      • Kafka Console
        • Setup
        • Monitors and Automation
      • Schema Tracking
      • Dead Letter Queues
      • Metrics and Tags
  • Data Observability
    • Data Observability Overview
    • Data Catalog
    • Lineage
    • Quality Monitoring
      • Data Warehouses
        • Snowflake
        • Databricks
        • BigQuery
        • Redshift
        • ClickHouse Cloud
        • Microsoft Fabric Warehouse
      • Data Lakes
        • AWS Glue
        • Amazon Athena Query History
      • Transactional Databases
        • PostgreSQL
      • ELT Integrations
        • Airbyte
        • Fivetran
        • Hightouch
      • Business Intelligence Integrations
        • Hex
        • Looker
        • Tableau
        • Sigma
        • Metabase
        • Power BI
      • Monitors
      • Guides
    • Jobs Monitoring
      • Databricks
        • Private Link Connectivity
      • Airflow
        • Logs Correlation
        • Troubleshooting DAG
        • Upgrade OpenLineage Provider on Amazon MWAA
      • dbt
      • Spark on Kubernetes
      • Spark on Amazon EMR
      • Spark on Google Dataproc
      • AWS Glue
      • Azure Data Factory
      • Custom Jobs (OpenLineage)
        • Datadog Agent for OpenLineage Proxy
      • Monitors
    • CI/CD
    • Integration Overhead
  • Digital Experience
    • Journey Monitoring
      • Configure Journeys
      • Suggested Journeys
      • Variants
      • Journey Overview Page
      • Map
      • Status
      • Details Report
      • Roles and Permissions
    • Real User Monitoring
      • Application Monitoring
        • Browser
        • Android and Android TV
        • Apple Platforms
        • Flutter
        • Kotlin Multiplatform
        • C / C++
        • React Native
        • Electron
        • Roku
        • Unity
        • .NET MAUI
      • Platform
        • Dashboards
        • Monitors
        • Generate Custom Metrics
      • Exploring RUM Data
        • Search RUM Events
        • Search Syntax
        • Group
        • Visualize
        • Events
        • Export
        • Saved Views
        • Watchdog Insights for RUM
      • Correlate RUM with Other Telemetry
        • Correlate LLM with RUM
        • Correlate Logs with RUM
        • Correlate Profiling with RUM
        • Correlate Synthetics with RUM
        • Correlate Traces with RUM
      • Feature Flag Tracking
        • Setup
        • Using Feature Flags
      • Error Tracking
        • Explorer
        • Issue States
        • Track Browser Errors
        • Track Mobile Errors
        • Error Grouping
        • Monitors
        • Identify Suspect Commits
        • Troubleshooting
      • Bits in RUM
        • Optimize Performance
        • Investigate Regressions
        • Bits Chat in RUM
      • RUM Without Limits
        • Metrics
        • Retention Filters
        • Retention Quotas
      • Operations Monitoring
      • Managed Archive
      • Export Pipelines
      • Ownership of Views
      • Remote Configuration
      • Guides
      • Data Security
    • Synthetic Testing and Monitoring
      • API Testing
        • HTTP
        • SSL
        • DNS
        • WebSocket
        • TCP
        • UDP
        • ICMP
        • GRPC
        • Error codes
      • Multistep API Testing
      • Browser Testing
        • Recording Steps
        • Browser Testing Results
        • Advanced Options for Steps
        • Authentication in Browser Testing
      • Network Path Testing
        • Terms and Concepts
      • Mobile Application Testing
        • Testing Steps
        • Testing Results
        • Advanced Options for Steps
        • Supported Devices
        • Restricted Networks
        • Settings
      • Test Suites
      • Bits Testing
      • Goal-Based Testing
      • Platform
        • Dashboards
        • Metrics
        • Test Coverage
        • Private Locations
        • Connect APM
        • Connect RUM
        • Settings
        • Scheduled Downtime
      • Exploring Synthetics Data
        • Overview Page
        • Saved Views
        • Results Explorer
      • Guides
      • Notifications
        • Template Variables
        • Conditional Alerting
        • Advanced Notifications
        • Integrate with Statuspage
      • Troubleshooting
      • Data Security
    • Continuous Testing
      • Local and Staging Environments
        • Testing Multiple Environments
        • Testing With Proxy, Firewall, or VPN
      • CI/CD Integrations
        • Configuration
        • Azure DevOps Extension
        • CircleCI Orb
        • GitHub Actions
        • GitLab
        • Jenkins
        • Bitrise (Upload Application)
        • Bitrise (Run Tests)
      • Settings
      • Results Explorer
      • Metrics
      • Guides
      • Troubleshooting
    • Experiments
      • Create Experiment Metrics
        • Sync Metrics from YAML
      • Standardize Experiments with Protocols
      • Plan and Launch Experiments
      • Experiment Approvals
      • Read Experiment Results
      • Experiment Diagnostics
      • Concepts
        • Subject Types
        • Exposure SQL Models
        • Identity Resolution
        • SQL Template Variables
        • Cumulative Impact
        • Holdouts
      • Statistics
        • Analysis Methods
        • CUPED: Variance Reduction Technique
        • Minimum Detectable Effects
        • Multiple Testing Correction
        • Global Lift
        • Lift and Interval Calculations
        • Expected Regret and EVSI
      • Break Out Metrics by Property
      • Troubleshooting
      • Experiments MCP Tools
      • Guides
    • Product Analytics
      • Charts
        • Chart Basics
        • Funnel
        • Journey Paths
        • Pathways
        • Retention
        • Analytics
      • Dashboards
        • Dashboard Reporter Agent
      • Segments
      • Action Management
      • Managing Profiles
        • Identity Resolution
      • Tracking Plans
      • Data Collected
        • Server-Side Events
      • Export Pipelines
      • Usability
      • Guides
      • Troubleshooting
    • Session Replay
      • Setup
      • Privacy Options
      • Developer Tools
      • Playlists
      • Heatmaps
      • Impact on App Performance
      • Troubleshooting
      • Guides
  • Software Delivery
    • CI/CD Optimization
      • CI Visibility
        • AWS CodePipeline
        • Azure Pipelines
        • Buildkite
        • CircleCI
        • Codefresh
        • GitHub Actions
        • GitLab
        • Jenkins
        • TeamCity
        • Other CI Providers
        • Custom Commands
        • Custom Tags and Measures
      • Test Optimization
        • Language Setup
        • Network Settings
        • Tests in Containers
        • Correlate Logs and Tests
        • Browser Tests with RUM
        • Swift Tests with RUM
      • Explorer
        • Search Syntax
        • Search Pipeline Executions
        • Export
        • Saved Views
        • Search and Manage
      • Features
        • Auto Test Retries
        • Automatic Job Retries
        • Developer Workflows
        • Early Flake Detection
        • Flaky Management
        • Test Impact Analysis
        • Test Parallelization
        • Legacy Features
      • Monitors
      • Guides
      • Troubleshooting
        • CI Pipelines
        • Tests
    • CD Visibility
      • Deployment Visibility
        • Argo CD
        • CI Providers
      • Explore Deployments
        • Search Syntax
        • Facets
        • Saved Views
      • Features
        • Code Changes Detection
        • Rollback Detection
      • Monitors
    • Deployment Gates
      • Setup
        • Inline Gates
        • Preconfigured Gates
    • Code Coverage
      • Setup
      • Configuration
      • Coverage Calculation
      • Monorepo Support
      • Flags
      • Carryforward
      • Data Collected
      • Dashboards
    • PR Gates
      • Setup
    • Delivery Performance
      • DORA Metrics
        • Setup
        • Change Failure Detection
        • DORA Metrics Calculation
        • Data Collected
      • AI Impact
        • Setup
    • Feature Flags
      • Client SDKs
        • Android and Android TV
        • Angular
        • Dart and Flutter
        • iOS and tvOS
        • JavaScript
        • React
        • React Native
        • Unity
      • Server SDKs
        • .NET
        • Go
        • Java
        • Node.js
        • PHP
        • Python
        • Ruby
      • Concepts
        • Approvals
        • Cloning Feature Flags
        • Configuration Sources
        • Distribution Channels
        • Environments
        • Evaluation Context
        • Evaluation Results
        • Evaluation Tester
        • Experiments
        • Feature Flag Graphs
        • Flag Evaluation and Experimentation Opt-Out
        • Flag History
        • Flag Key Obfuscation
        • Monthly Flag Configuration Requests
        • Permissions and Access Control
        • Saved Filters
        • Scheduled Rollouts
        • Stale Flags
        • Targeting Attributes
        • Targeting Rules and Filters
        • Traffic Splitting and Randomization
        • Variants and Flag Types
        • Workflow Automation
      • Use Cases
        • Progressive Rollouts and Canaries
        • Kill Switches
        • Dynamic Configuration
      • Implementation Patterns
        • Local Flag Overrides
        • OpenTelemetry
        • Serverless
        • Browser Rules-Based Evaluation
      • Browser Developer Extension
      • MCP Server
      • Guides
  • Developer Integrations
    • Source Code Integration
      • Source Code Management Providers
      • Service Mapping
        • .NET
        • Go
        • Java
        • Node.js
        • PHP
        • Python
        • Ruby
        • OpenTelemetry
        • Other Languages
      • Resource Mapping
      • Code Snippets and Context Links
      • PR Comments
    • IDE Plugins
      • JetBrains IDEs
        • Code Security
      • VS Code & Cursor
        • Code Security
        • Code Insights
  • Security
    • Security Overview
      • Detection Rules
        • OOTB Rules
      • Notifications
        • Rules
        • Variables
      • Suppressions
      • Automation Pipelines
        • Modify Severity Level
        • Mute
        • Set Due Date Rules
        • Add to Security Inbox
        • Create Tickets
      • Security Inbox
      • Remediation Inbox
      • Threat Intelligence
      • Events Forwarding
      • Audit Trail
      • Access Control
      • Ticketing Integrations
      • Assignee Management
      • Research Feed
      • Severity Adjustment
      • Security MCP Tools
      • Guides
    • Cloud SIEM
      • Ingest and Enrich
        • Content Packs
        • Bring Your Own Threat Intelligence
        • Muted Indicators
        • Open Cybersecurity Schema Framework
      • Detect and Monitor
        • OOTB Rules
        • Custom Detection Rules
        • Migrate Detection Rules
        • Version History
        • Suppressions
        • Dynamic Severity
        • Historical Jobs
        • MITRE ATT&CK Map
      • Triage and Investigate
        • Investigate Security Signals
        • Entity Risks
        • User Inventory
        • IOC Explorer
        • Investigator
        • Group Signals into Cases
      • Respond and Report
        • Security Operational Metrics
      • Guides
      • Data Security
    • Code Security
      • Static Code Analysis (SAST)
        • Setup
        • Configuration
        • GitHub Actions
        • Generic CI Providers
        • AI-Enhanced Static Code Analysis
        • SAST Custom Rule Creation Tutorial
        • SAST Custom Rules
        • SAST Custom Rules Guide
        • Static Code Analysis (SAST) rules
      • Software Composition Analysis (SCA)
        • Static Setup
        • Runtime Setup
        • Configuration
        • Supply Chain Firewall (SCFW)
        • Library Inventory
        • CVE Explorer
      • Secret Scanning
        • GitHub Actions
        • Generic CI Providers
        • Configuration
        • Secret Validation
      • Runtime Code Analysis (IAST)
        • Setup
        • Security Controls
      • Infrastructure as Code (IaC) Security
        • Setup
        • Configuration
        • GitHub Actions
        • Rules
        • IaC Custom Rules
        • IaC Custom Rule Reference
      • Prioritize Findings with Runtime Context
      • Developer Tool Integrations
        • Pull Request Comments
        • PR Gates
        • IDE Plugins
        • Git Hooks
        • MCP Server
        • SCFW GitHub Action
      • Troubleshooting
      • Guides
    • Cloud Security
      • Setup
        • Supported Deployment Types
        • Agentless Scanning
        • Deploy the Agent
        • Container Image Scanning in CI/CD
        • Set Up CloudTrail Logs
        • Link Images to Dockerfiles
        • Set Up without Infrastructure Monitoring
        • Deploy using Cloud Integrations
      • Security Graph
      • Misconfigurations
        • Manage Compliance Rules
        • Create Custom Rules
        • Manage Compliance Posture
        • Explore Misconfigurations
        • Kubernetes Security Posture Management
      • Identity Risks
      • Vulnerabilities
        • Hosts and Containers Compatibility
      • Crown Jewels
      • OOTB Rules
      • Triage and Prioritize
        • Runtime Prioritization Engine
        • Severity Scoring
      • Review and Remediate
        • Mute Issues
        • Automate Security Workflows
        • Remediate with AI
        • Ownership Agent
        • Set Up Ownership Preferences
      • Code Locations
      • Guides
      • Troubleshooting
        • Vulnerabilities
        • Agentless Scanning
    • App and API Protection
      • Terms and Concepts
      • How It Works
        • Threat Intelligence
        • Trace Qualification
        • User Monitoring and Protection
      • Setup
      • API Posture
        • Overview
        • API Findings
        • Compliance
        • API Inventory
        • Endpoint Scanning
        • Sensitive Data
      • Threat Protection
        • Overview
        • Security Signals
        • Policies
        • Exploit Prevention
        • WAF Integrations
        • Account Takeover Protection
      • Attack Summary
      • Guides
      • Troubleshooting
    • AI Guard
      • Set Up AI Guard
        • Automatic Integrations
        • Manual Integrations
        • SDK
        • HTTP API
      • Manage Policies
      • Redact Sensitive Data
      • Control Evaluations in Code
      • Triage and Investigate Signals
    • Workload Protection
      • Setup
        • Docker
        • Kubernetes
        • ECS (EC2 compute)
        • Linux
        • Fargate
        • Windows
        • Advanced Configuration
      • Detect and Monitor
        • Agent Rules
        • Detection and Finding Rules
        • Threat Intelligence
        • Content Packs
      • Investigate and Triage
        • Agent Events
        • Signals
        • Findings
      • Respond to Threats
      • Coverage
        • Review and Improve Coverage
      • Guides
      • Troubleshooting
    • Sensitive Data Scanner
      • Setup
        • Telemetry Data
        • Cloud Storage
      • Scanning Rules
        • Library Rules
        • Custom Rules
      • Guides
      • Troubleshooting
    • Data Security
      • Setup
        • Snowflake
        • PostgreSQL
        • Amazon S3
      • Findings
  • AI Observability
    • Agent Observability
      • Quickstart
        • Terms and Concepts
      • Build with AI
      • Instrument
        • Automatic
        • SDK Reference
        • HTTP API
        • OpenTelemetry
        • Correlate with APM
        • Prompt Tracking
        • Agent Tracking
        • Multimodal
      • Investigate
        • Querying spans and traces
        • Insights
        • Cost
        • Metrics
        • Patterns
        • Evaluations
        • Annotation Queues
        • Export API
      • Improve
        • Playground
        • Datasets
        • Offline Experiments
        • Online Experiments
        • Prompt Experimentation
      • Configure
        • Prompt Management
        • Automation Rules
      • Data Governance
        • Data Access Control
      • Lapdog
      • Guides
    • GPU Monitoring
      • Setup
        • Dynamic Resource Allocation
      • Summary
      • Explorer
      • Capacity Planning
      • Training
      • Inference
      • Continuous Tracing
      • MCP Tools
    • Agent Console
      • Setup
    • AI Gateway
      • Get Started
      • Connect Providers
      • Send Requests
      • Connect Applications
      • Route Requests
      • Control Model Access
      • Control Spend and Usage
      • Security and Data Capture
      • Observe AI Gateway Activity
      • Best practices
      • Troubleshooting
  • Log Management
    • Observability Pipelines
      • Configuration
        • Explore Templates
        • Set Up Pipelines
        • Pipeline Simulation
        • Install the Worker
        • Secrets Management
        • Live Capture
        • Update Existing Pipelines
        • Export Pipeline
        • Network Traffic
        • Version History
        • Access Control
        • Manage Pipelines with AI Agents
      • Sources
        • Akamai DataStream
        • Amazon Data Firehose
        • Amazon S3
        • Azure Event Hubs
        • Cloudflare Logpush
        • Datadog Agent
        • Datadog Lambda Extension
        • Datadog Lambda Forwarder
        • Filebeat
        • Fluent
        • Google Pub/Sub
        • HTTP Client
        • HTTP Server
        • OpenTelemetry
        • Prometheus
        • Kafka
        • Logstash
        • MySQL
        • Okta
        • Socket
        • Splunk HEC
        • Splunk TCP
        • Sumo Logic Hosted Collector
        • Syslog
        • WebSocket
      • Processors
        • Add Environment Variables
        • Add hostname
        • Aggregate
        • Custom Processor
        • Deduplicate
        • Edit fields
        • Edit tags
        • Enrichment Table
        • Filter
        • Generate Metrics
        • Grok Parser
        • Parse JSON
        • Parse XML
        • Quota
        • Reduce
        • Remap to OCSF
        • Sample
        • Sawmill
        • Sensitive Data Scanner
        • Spike Protection
        • Split Array
        • Tag Allow/Block List
        • Tags
        • Tag Cardinality Control
        • Throttle
      • Destinations
        • Amazon OpenSearch
        • Amazon S3
        • Amazon Security Lake
        • Azure Data Explorer
        • Azure Storage
        • ClickHouse
        • CrowdStrike NG-SIEM
        • Databricks (Zerobus)
        • Datadog Archives
        • Datadog BYOC Logs
        • Datadog Logs
        • Datadog Metrics
        • Elasticsearch
        • Google Cloud Storage
        • Google Pub/Sub
        • Google SecOps
        • HTTP Client
        • Kafka
        • Microsoft Sentinel
        • New Relic
        • OpenSearch
        • OpenTelemetry
        • Prometheus
        • SentinelOne
        • Socket
        • Splunk HEC
        • Sumo Logic Hosted Collector
        • Syslog
      • Packs
      • Replay
      • Log Anomaly Detection
      • Search Syntax
      • Scaling and Performance
        • Buffering and Backpressure
        • Scaling Best Practices
      • Monitoring and Troubleshooting
        • Worker CLI Commands
        • Monitoring Pipelines
        • Pipeline Usage Metrics
        • Troubleshooting
      • Guides and Resources
        • Upgrade Worker Guide
    • Log Management
      • Log Collection & Integrations
        • Browser
        • Android
        • iOS
        • Flutter
        • React Native
        • Roku
        • Kotlin Multiplatform
        • C / C++
        • .NET MAUI
        • Electron
        • C#
        • Go
        • Java
        • Node.js
        • PHP
        • OpenTelemetry
        • Python
        • Agent Integrations
        • Ruby
        • Other Integrations
      • Log Configuration
        • Pipelines
        • Processors
        • Parsing
        • Pipeline Scanner
        • Attributes and Aliasing
        • Generate Metrics
        • Indexes
        • Flex Logs
        • Archives
        • Rehydrate from Archives
        • Forwarding
        • Log Optimizer
        • External Sources
      • Log Explorer
        • Live Tail
        • Search Logs
        • Search Syntax
        • Advanced Search
        • Facets
        • Calculated Fields
        • Analytics
        • Patterns
        • Transactions
        • Visualize
        • Log Side Panel
        • Export
        • Watchdog Insights for Logs
        • Saved Views
        • Archive Search
        • Findings
        • Federated Logs
      • Error Tracking
        • Error Tracking Explorer
        • Issue States
        • Track Browser and Mobile Errors
        • Track Backend Errors
        • Error Grouping
        • Manage Data Collection
        • Dynamic Sampling
        • Monitors
        • Identify Suspect Commits
        • Troubleshooting
      • Reports
      • Migration
        • Migration Tools
      • Guides
      • Data Security
      • Troubleshooting
        • Live Tail
    • BYOC Logs
      • Introduction
        • Architecture
        • Network
        • Supported Features
      • Quickstart
      • Install
        • AWS EKS
        • Azure AKS
        • GCP GKE
        • Docker (Local)
        • Datadog Operator
      • Ingest
        • Datadog Agent
        • Observability Pipelines
        • REST API
      • Configure
        • Indexes
        • Ingress
        • Lambda Search Offloading
      • Operate
        • Sizing
        • Object Storage Request Estimation
        • Autoscaling
        • Monitoring
        • Search Logs
        • Production Best Practices
        • Disk Buffer Durability
        • Releases and Updates
        • Troubleshooting
        • Rename a Cluster
      • Guides
      • Release Notes
  • Administration
    • Account Management
      • Organization Topology
      • Switching Between Orgs
      • Organization Settings
        • User Management
        • Login Methods
        • Mobile and Third-Party Access
        • Custom Organization Landing Page
        • Service Accounts
        • IP Allowlist
        • Domain Allowlist
        • Cross-Organization Visibility
        • SMTP Configuration
        • Cross-App Access
      • Access Control
        • Granular Access
        • Permissions
        • Data Access
        • Request Access
        • MCP Access
      • SSO with SAML
        • Configuring SAML
        • Renewing SAML Certificates
        • User Group Mapping
        • Active Directory
        • Auth0
        • Entra ID
        • Google
        • LastPass
        • Okta
        • SafeNet
        • Troubleshooting
      • Delete Data
      • SCIM
        • Okta
        • Microsoft Entra ID
      • API and Application Keys
      • Personal Access Tokens
      • Service Access Tokens
      • Teams
        • Team Management
        • Provision with GitHub
        • Provision with ServiceNow
      • Governance Console
        • Controls
      • Multi-Factor Authentication
      • Audit Trail
        • Events
        • Forwarding
        • Guides
      • Safety Center
      • Plan & Usage
        • Bill Overview
        • Cost Details
        • Usage Details
        • Partner Experience
      • Billing
        • Pricing
        • Credit Card
        • Product Allotments
        • Usage Metrics
        • Usage Attribution
        • Custom Metrics
        • Containers
        • Log Management
        • APM
        • Serverless
        • Real User Monitoring
        • CI/CD Optimization
        • Incident Response
        • AWS Integration
        • Azure Integration
        • Google Cloud Integration
        • OCI Integration
        • Alibaba Integration
        • vSphere Integration
        • Workflow Automation
        • AI Credits
        • AI Credit Limits
      • Multi-org Accounts
        • Organization Groups
      • Guides
      • Workload Identity Federation
    • Disaster Recovery
      • Recommended Settings for DNS Failover
    • Data Security
      • Agent
      • Cloud SIEM
      • Kubernetes
      • Log Management
      • Real User Monitoring
      • Synthetic Monitoring
      • Tracing
      • PCI Compliance
      • HIPAA Compliance
      • Data Retention Periods
      • Guides
    • Help

Datadog Docs

Essentials

  • Getting Started
    • Agent
    • API
    • APM Tracing
    • Containers
    • Dashboards
    • Database Monitoring
    • Datadog
    • Datadog Site
    • DevSecOps
    • Incident Management
    • Integrations
    • Internal Developer Portal
    • Logs
    • Monitors
    • Notebooks
    • OpenTelemetry
    • Profiler
    • Search
    • Session Replay
    • Security
    • Serverless for AWS Lambda
    • Software Delivery
    • Synthetic Monitoring and Testing
    • Tags
    • Teams
    • Workflow Automation
    • Access for Enterprises
    • Learning Center
    • Support
  • Glossary
    • Standard Attributes
      • Guides
        • Agent
          • Architecture
          • IoT
          • Supported Platforms
          • Log Collection
          • Configuration
          • Fleet Automation
          • Troubleshooting
          • Guides
          • Data Security
        • Integrations
          • Guides
        • Client SDKs
          • Setup
          • Advanced Configuration
          • Data Collected
          • Integrated Libraries
          • Troubleshooting
        • Extend Datadog
          • Authorization
          • DogStatsD
          • Custom Checks
          • Integrations
          • Service Checks
          • Community
          • Guides
        • OpenTelemetry
          • Getting Started
          • Feature Compatibility
          • Instrument Your Applications
          • Send Data to Datadog
          • Semantic Mapping
          • Ingestion Sampling
          • Correlate Data
          • Integrations
          • Fleet Automation
          • Troubleshooting
          • Guides and Resources
          • Reference
        • Administrator's Guide
          • Getting Started
          • Plan
          • Build
          • Run
        • API
          • Command Line
            • MCP Server
              • Setup
              • MCP Tools
              • Code Execution
            • Partners
              • Datadog Mobile App
                • Enterprise Configuration
                • Datadog for Intune
                • Shortcut Configurations
                • Push Notifications
                • Widgets
                • Guides
              • DDSQL Reference
                • Data Directory
              • Remote Configuration
                • Cloudcraft (Standalone)
                  • Getting Started
                  • Account Management
                  • Components: Common
                  • Components: Azure
                  • Components: AWS
                  • Advanced
                  • FAQ
                  • API

                In The App

                • Dashboards
                  • Configure
                  • Dashboard List
                  • Widgets
                  • Querying
                  • Functions
                  • Graph Insights
                  • Template Variables
                  • Overlays
                  • Annotations
                  • Guides
                  • Sharing
                • Notebooks
                  • Analysis Features
                  • Markdown Format
                  • API Guide
                  • Guides
                • DDSQL Editor
                  • Reference Tables
                    • Sheets
                      • Functions and Operators
                      • Guides
                    • Monitors and Alerting
                      • Draft Monitors
                      • Configure Monitors
                      • Monitor Templates
                      • Monitor Types
                      • Notifications
                      • Downtimes
                      • Manage Monitors
                      • Monitor Status
                      • Monitor Settings
                      • Monitor Quality
                      • Guides
                    • Service Level Objectives
                      • Monitor-based SLOs
                      • Metric-based SLOs
                      • Time Slice SLOs
                      • Error Budget Alerts
                      • Burn Rate Alerts
                      • Guides
                    • Metrics
                      • Custom Metrics
                      • OpenTelemetry Metrics
                      • Metrics Types
                      • Distributions
                      • Overview
                      • Explorer
                      • Catalog
                      • Advanced Filtering
                      • Nested Queries
                      • Reference Table Joins with Metrics
                      • Derived Metrics
                      • Metrics Without Limits™
                      • Guides
                    • Watchdog
                      • Alerts
                      • Impact Analysis
                      • RCA
                      • Insights
                      • Faulty Deployment Detection
                      • Faulty Cloud & SaaS API Detection
                    • Bits AI
                      • Bits Agent Builder
                      • Bits Autonomous Operations
                      • Bits Chat
                      • Bits Code
                      • Bits Data Analysis
                      • Bits Database Optimization
                      • Bits Live Debugger
                      • Bits Maintenance
                      • Bits Release
                      • Bits Security Analyst
                      • Bits AI Settings
                    • Internal Developer Portal
                      • Catalog
                      • Scorecards
                      • Self-Service Actions
                      • Engineering Reports
                      • Homepage
                      • Campaigns
                      • External Provider Status
                      • Integrations
                      • Use Cases
                      • Onboarding Guide
                    • Error Tracking
                      • Explorer
                      • Issue States
                      • Regression Detection
                      • Suspected Causes
                      • Error Grouping
                      • Bits Investigation
                      • Monitors
                      • Identify Suspect Commits
                      • Auto Assign
                      • Issue Team Ownership
                      • Track Browser and Mobile Errors
                      • Track Backend Errors
                      • Manage Data Collection
                      • Ticketing Systems
                      • Link Pull Requests
                      • Troubleshooting
                      • Guides
                    • Change Tracking
                      • Change Types
                    • Event Management
                      • Ingest Events
                      • Pipelines and Processors
                      • Explorer
                      • Triage Inbox
                      • Correlation
                      • Guides

                    Incident Response

                    • Incident Management
                      • Incident Investigation
                      • Setup and Configuration
                      • Post Incident
                      • Analytics and Reporting
                      • Integrations
                      • Guides
                    • On-Call
                      • Onboard a Team
                      • Pages
                      • Routing Rules
                      • Escalation Policies
                      • Schedules
                      • Handover automation
                      • Notification Preferences
                      • Analytics
                      • Integrations
                      • Guides
                    • Status Pages
                      • Components
                      • Notices
                      • Notice Templates
                      • Subscriptions
                    • Work Management
                      • Projects
                      • Create a Work Item
                      • Customization
                      • View and Manage Work Items
                      • Notifications and Integrations
                      • Work Item Automation Rules
                      • Work Item Approvals
                      • AI Tools
                      • Troubleshooting

                    Actions & Remediations

                    • Bits Agent Builder
                      • Improve agents using traces
                    • Workflow Automation
                      • Build Workflows
                      • Access and Authentication
                      • Trigger Workflows
                      • Variables and parameters
                      • Actions
                      • Save and Reuse Actions
                      • Test and Debug
                      • Expressions
                      • Track Workflows
                      • Limits
                      • MCP Tools
                    • Apps
                      • Embed Apps
                    • App Builder
                      • Build Apps
                      • Access and Authentication
                      • Queries
                      • Variables
                      • Events
                      • Components
                      • JavaScript Expressions
                      • Embed App Builder Apps
                      • Save and Reuse Actions
                    • Datastores
                      • Create and Manage Datastores
                      • Use Datastores with Apps and Workflows
                      • Automation Rules
                      • Access and Authentication
                    • Forms
                      • Components
                      • Responses
                      • Guides
                    • Action Catalog
                      • Connections
                      • Execution Policies
                      • Private Actions

                    Infrastructure

                    • Cloudcraft
                      • Overlays
                    • Resource Catalog
                      • Cloud Resources Schema
                      • Policies
                      • Resource Changes
                    • Universal Service Monitoring
                      • Setup
                      • Guides
                    • End User Device Monitoring
                      • Setup
                    • Hosts
                      • Host List
                    • Containers
                      • Container Monitoring
                      • Autoscaling
                      • Docker-based
                      • Kubernetes
                      • Cluster Agent
                      • Amazon ECS
                      • Datadog Operator
                      • Troubleshooting
                      • Guides
                    • Processes
                      • Increase Process Retention
                    • Serverless
                      • AWS
                      • Azure
                      • Google
                      • Libraries & Integrations
                      • Glossary
                      • Guides
                    • Network Monitoring
                      • Cloud Network Monitoring
                      • DNS Monitoring
                      • Network Device Monitoring
                      • NetFlow Monitoring
                      • Network Path
                      • L1 to L7 Map
                    • Storage Management
                      • Amazon S3
                      • Google Cloud Storage
                      • Azure Blob Storage

                    Cloud Cost

                    • Cloud Cost
                      • Datadog Costs
                      • Setup
                      • Tags
                      • Allocation
                      • AI Costs
                      • Reporting
                      • Recommendations
                      • Planning
                      • Cost Changes
                      • Cloud Cost Skill

                    Application Performance

                    • APM
                      • APM Terms and Concepts
                      • Application Instrumentation
                      • APM Metrics Collection
                      • Trace Pipeline Configuration
                      • Correlate Traces with Other Telemetry
                      • Trace Explorer
                      • Recommendations
                      • Code Origin for Spans
                      • Service Observability
                      • Endpoint Observability
                      • Live Debugger
                      • Error Tracking
                      • Data Security
                      • Guides
                      • Troubleshooting
                    • Continuous Profiler
                      • Enabling the Profiler
                      • Profile Types
                      • Profile Visualizations
                      • Investigate Slow Traces or Endpoints
                      • Compare Profiles
                      • Automated Analysis
                      • Profiler Troubleshooting
                      • Guides
                    • Database Monitoring
                      • Set Up DBM
                      • Data Collected
                      • Explore DBM
                      • Connecting DBM and Traces
                      • Database Investigations in Bits Chat
                      • Bits Database Optimization
                      • Database Monitoring Workbench
                      • Database Monitoring PR Reviews
                      • Role Observability
                      • Troubleshooting
                      • Guides
                    • Data Streams Monitoring
                      • Setup
                      • Kafka Console
                      • Schema Tracking
                      • Dead Letter Queues
                      • Metrics and Tags

                    Data Observability

                    • Data Observability Overview
                      • Data Catalog
                        • Lineage
                          • Quality Monitoring
                            • Data Warehouses
                            • Data Lakes
                            • Transactional Databases
                            • ELT Integrations
                            • Business Intelligence Integrations
                            • Monitors
                            • Guides
                          • Jobs Monitoring
                            • Databricks
                            • Airflow
                            • dbt
                            • Spark on Kubernetes
                            • Spark on Amazon EMR
                            • Spark on Google Dataproc
                            • AWS Glue
                            • Azure Data Factory
                            • Custom Jobs (OpenLineage)
                            • Monitors
                          • CI/CD
                            • Integration Overhead

                              Digital Experience

                              • Journey Monitoring
                                • Configure Journeys
                                • Suggested Journeys
                                • Variants
                                • Journey Overview Page
                                • Map
                                • Status
                                • Details Report
                                • Roles and Permissions
                              • Real User Monitoring
                                • Application Monitoring
                                • Platform
                                • Exploring RUM Data
                                • Correlate RUM with Other Telemetry
                                • Feature Flag Tracking
                                • Error Tracking
                                • Bits in RUM
                                • RUM Without Limits
                                • Operations Monitoring
                                • Managed Archive
                                • Export Pipelines
                                • Ownership of Views
                                • Remote Configuration
                                • Guides
                                • Data Security
                              • Synthetic Testing and Monitoring
                                • API Testing
                                • Multistep API Testing
                                • Browser Testing
                                • Network Path Testing
                                • Mobile Application Testing
                                • Test Suites
                                • Bits Testing
                                • Goal-Based Testing
                                • Platform
                                • Exploring Synthetics Data
                                • Guides
                                • Notifications
                                • Troubleshooting
                                • Data Security
                              • Continuous Testing
                                • Local and Staging Environments
                                • CI/CD Integrations
                                • Settings
                                • Results Explorer
                                • Metrics
                                • Guides
                                • Troubleshooting
                              • Experiments
                                • Create Experiment Metrics
                                • Standardize Experiments with Protocols
                                • Plan and Launch Experiments
                                • Experiment Approvals
                                • Read Experiment Results
                                • Experiment Diagnostics
                                • Concepts
                                • Statistics
                                • Break Out Metrics by Property
                                • Troubleshooting
                                • Experiments MCP Tools
                                • Guides
                              • Product Analytics
                                • Charts
                                • Dashboards
                                • Segments
                                • Action Management
                                • Managing Profiles
                                • Tracking Plans
                                • Data Collected
                                • Export Pipelines
                                • Usability
                                • Guides
                                • Troubleshooting
                              • Session Replay
                                • Setup
                                • Privacy Options
                                • Developer Tools
                                • Playlists
                                • Heatmaps
                                • Impact on App Performance
                                • Troubleshooting
                                • Guides

                              Software Delivery

                              • CI/CD Optimization
                                • CI Visibility
                                • Test Optimization
                                • Explorer
                                • Features
                                • Monitors
                                • Guides
                                • Troubleshooting
                              • CD Visibility
                                • Deployment Visibility
                                • Explore Deployments
                                • Features
                                • Monitors
                              • Deployment Gates
                                • Setup
                              • Code Coverage
                                • Setup
                                • Configuration
                                • Coverage Calculation
                                • Monorepo Support
                                • Flags
                                • Carryforward
                                • Data Collected
                                • Dashboards
                              • PR Gates
                                • Setup
                              • Delivery Performance
                                • DORA Metrics
                                • AI Impact
                              • Feature Flags
                                • Client SDKs
                                • Server SDKs
                                • Concepts
                                • Use Cases
                                • Implementation Patterns
                                • Browser Developer Extension
                                • MCP Server
                                • Guides

                              Developer Integrations

                              • Source Code Integration
                                • Source Code Management Providers
                                • Service Mapping
                                • Resource Mapping
                                • Code Snippets and Context Links
                                • PR Comments
                              • IDE Plugins
                                • JetBrains IDEs
                                • VS Code & Cursor

                              Security

                              • Security Overview
                                • Detection Rules
                                • Notifications
                                • Suppressions
                                • Automation Pipelines
                                • Security Inbox
                                • Remediation Inbox
                                • Threat Intelligence
                                • Events Forwarding
                                • Audit Trail
                                • Access Control
                                • Ticketing Integrations
                                • Assignee Management
                                • Research Feed
                                • Severity Adjustment
                                • Security MCP Tools
                                • Guides
                              • Cloud SIEM
                                • Ingest and Enrich
                                • Detect and Monitor
                                • Triage and Investigate
                                • Respond and Report
                                • Guides
                                • Data Security
                              • Code Security
                                • Static Code Analysis (SAST)
                                • Software Composition Analysis (SCA)
                                • Secret Scanning
                                • Runtime Code Analysis (IAST)
                                • Infrastructure as Code (IaC) Security
                                • Prioritize Findings with Runtime Context
                                • Developer Tool Integrations
                                • Troubleshooting
                                • Guides
                              • Cloud Security
                                • Setup
                                • Security Graph
                                • Misconfigurations
                                • Identity Risks
                                • Vulnerabilities
                                • Crown Jewels
                                • OOTB Rules
                                • Triage and Prioritize
                                • Review and Remediate
                                • Code Locations
                                • Guides
                                • Troubleshooting
                              • App and API Protection
                                • Terms and Concepts
                                • How It Works
                                • Setup
                                • API Posture
                                • Threat Protection
                                • Attack Summary
                                • Guides
                                • Troubleshooting
                              • AI Guard
                                • Set Up AI Guard
                                • Manage Policies
                                • Redact Sensitive Data
                                • Control Evaluations in Code
                                • Triage and Investigate Signals
                              • Workload Protection
                                • Setup
                                • Detect and Monitor
                                • Investigate and Triage
                                • Respond to Threats
                                • Coverage
                                • Guides
                                • Troubleshooting
                              • Sensitive Data Scanner
                                • Setup
                                • Scanning Rules
                                • Guides
                                • Troubleshooting
                              • Data Security
                                • Setup
                                • Findings

                              AI Observability

                              • Agent Observability
                                • Quickstart
                                • Build with AI
                                • Instrument
                                • Investigate
                                • Improve
                                • Configure
                                • Data Governance
                                • Lapdog
                                • Guides
                              • GPU Monitoring
                                • Setup
                                • Summary
                                • Explorer
                                • Capacity Planning
                                • Training
                                • Inference
                                • Continuous Tracing
                                • MCP Tools
                              • Agent Console
                                • Setup
                              • AI Gateway
                                • Get Started
                                • Connect Providers
                                • Send Requests
                                • Connect Applications
                                • Route Requests
                                • Control Model Access
                                • Control Spend and Usage
                                • Security and Data Capture
                                • Observe AI Gateway Activity
                                • Best practices
                                • Troubleshooting

                              Log Management

                              • Observability Pipelines
                                • Configuration
                                • Sources
                                • Processors
                                • Destinations
                                • Packs
                                • Replay
                                • Log Anomaly Detection
                                • Search Syntax
                                • Scaling and Performance
                                • Monitoring and Troubleshooting
                                • Guides and Resources
                              • Log Management
                                • Log Collection & Integrations
                                • Log Configuration
                                • Log Explorer
                                • Error Tracking
                                • Reports
                                • Migration
                                • Guides
                                • Data Security
                                • Troubleshooting
                              • BYOC Logs
                                • Introduction
                                • Quickstart
                                • Install
                                • Ingest
                                • Configure
                                • Operate
                                • Guides
                                • Release Notes

                              Administration

                              • Account Management
                                • Organization Topology
                                • Switching Between Orgs
                                • Organization Settings
                                • Access Control
                                • SSO with SAML
                                • Delete Data
                                • SCIM
                                • API and Application Keys
                                • Personal Access Tokens
                                • Service Access Tokens
                                • Teams
                                • Governance Console
                                • Multi-Factor Authentication
                                • Audit Trail
                                • Safety Center
                                • Plan & Usage
                                • Billing
                                • Multi-org Accounts
                                • Guides
                                • Workload Identity Federation
                              • Disaster Recovery
                                • Recommended Settings for DNS Failover
                              • Data Security
                                • Agent
                                • Cloud SIEM
                                • Kubernetes
                                • Log Management
                                • Real User Monitoring
                                • Synthetic Monitoring
                                • Tracing
                                • PCI Compliance
                                • HIPAA Compliance
                                • Data Retention Periods
                                • Guides
                              • Help

                                DDSQL Reference

                                Docs  >  DDSQL Reference
                                Available for:

                                DDSQL Editor | Notebooks

                                Overview

                                DDSQL is SQL for Datadog data. It implements several standard SQL operations, such as SELECT, and allows queries against unstructured data. You can perform actions like getting exactly the data you want by writing your own SELECT statement, or querying tags as if they are standard table columns.

                                You can run DDSQL queries from AI agents using the Datadog MCP Server ddsql toolset (Preview).

                                This documentation covers the SQL support available and includes:

                                • Syntax compatible with PostgreSQL
                                • Data types
                                • Type literals
                                • Arrays
                                • SQL functions
                                • Regular expressions
                                • Window functions
                                • JSON functions
                                • Network address functions
                                • Table functions
                                • Tags
                                • Template variables

                                Syntax

                                The following SQL syntax is supported:

                                SELECT (DISTINCT) (DISTINCT: Optional)
                                Retrieves rows from a database, with DISTINCT filtering out duplicate records.
                                SELECT DISTINCT customer_id
                                FROM orders 
                                JOIN
                                Combines rows from two or more tables based on a related column between them. Supports FULL JOIN, INNER JOIN, LEFT JOIN, RIGHT JOIN.
                                SELECT orders.order_id, customers.customer_name
                                FROM orders
                                JOIN customers
                                ON orders.customer_id = customers.customer_id 
                                GROUP BY
                                Groups rows that have the same values in specified columns into summary rows.
                                SELECT product_id, SUM(quantity)
                                FROM sales
                                GROUP BY product_id 
                                || (concat)
                                Concatenates two or more strings together.
                                SELECT first_name || ' ' || last_name AS full_name
                                FROM employees 
                                WHERE (Includes support for LIKE, IN, ON, OR filters)
                                Filters records that meet a specified condition.
                                SELECT *
                                FROM employees
                                WHERE department = 'Sales' AND name LIKE 'J%' 
                                CASE
                                Provides conditional logic to return different values based on specified conditions.
                                SELECT order_id,
                                  CASE
                                    WHEN quantity > 10 THEN 'Bulk Order'
                                    ELSE 'Standard Order'
                                  END AS order_type
                                FROM orders 
                                WINDOW
                                Performs a calculation across a set of table rows that are related to the current row.
                                SELECT
                                  timestamp,
                                  service_name,
                                  cpu_usage_percent,
                                  AVG(cpu_usage_percent) OVER (PARTITION BY service_name ORDER BY timestamp ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS moving_avg_cpu
                                FROM
                                  cpu_usage_data 
                                IS NULL / IS NOT NULL
                                Checks if a value is null or not null.
                                SELECT *
                                FROM orders
                                WHERE delivery_date IS NULL 
                                LIMIT
                                Specifies the maximum number of records to return.
                                SELECT *
                                FROM customers
                                LIMIT 10 
                                OFFSET
                                Skips a specified number of records before starting to return records from the query.
                                SELECT *
                                FROM employees
                                OFFSET 20 
                                ORDER BY
                                Sorts the result set of a query by one or more columns. Includes ASC, DESC for sorting order.
                                SELECT *
                                FROM sales
                                ORDER BY sale_date DESC 
                                HAVING
                                Filters records that meet a specified condition after grouping.
                                SELECT product_id, SUM(quantity)
                                FROM sales
                                GROUP BY product_id
                                HAVING SUM(quantity) > 10 
                                IN, ON, OR
                                Used for specified conditions in queries. Available in WHERE, JOIN clauses.
                                SELECT *
                                FROM orders
                                WHERE order_status IN ('Shipped', 'Pending') 
                                USING
                                This clause is a shorthand for joins where the join columns have the same name in both tables. It takes a comma-separated list of those columns and creates a separate equality condition for each matching pair. For example, joining T1 and T2 with USING (a, b) is equivalent to ON T1.a = T2.a AND T1.b = T2.b.
                                SELECT orders.order_id, customers.customer_name
                                FROM orders
                                JOIN customers
                                USING (customer_id) 
                                AS
                                Renames a column or table with an alias.
                                SELECT first_name AS name
                                FROM employees 
                                Arithmetic Operations
                                Performs basic calculations using operators like +, -, *, /.
                                SELECT price, tax, (price * tax) AS total_cost
                                FROM products 
                                INTERVAL value unit
                                Interval representing a time duration specified in a given unit. Supported units:
                                - milliseconds / millisecond
                                - seconds / second
                                - minutes / minute
                                - hours / hour
                                - days / day

                                Data types

                                DDSQL supports the following data types:

                                Data TypeDescription
                                BIGINT64-bit signed integers.
                                BOOLEANtrue or false values.
                                DECIMALFloating-point numbers.
                                INETNetwork address values (IPv4 and IPv6, with optional CIDR prefix length).
                                INTERVALTime duration values.
                                JSONJSON data.
                                TIMESTAMPDate and time values.
                                VARCHARVariable-length character strings.

                                Array types

                                All data types support array types. See Arrays for array literals, element access, and array functions.

                                Type literals

                                DDSQL supports explicit type literals using the syntax [TYPE] [value].

                                TypeSyntaxExample
                                BIGINTBIGINT 'value'BIGINT '1234567'
                                BOOLEANBOOLEAN 'value'BOOLEAN 'true'
                                DECIMALDECIMAL 'value'DECIMAL '3.14159'
                                INETINET 'value'INET '192.168.1.5/24'
                                INTERVALINTERVAL 'value unit'INTERVAL '30 minutes'
                                JSONJSON 'value'JSON '{"key": "value", "count": 42}'
                                TIMESTAMPTIMESTAMP 'value'TIMESTAMP '2023-12-25 10:30:00'
                                VARCHARVARCHAR 'value'VARCHAR 'hello world'

                                The type prefix can be omitted and the type is automatically inferred from the value. For example, 'hello world' is inferred as VARCHAR, 123 as BIGINT, and true as BOOLEAN. Use explicit type prefixes when values could be ambiguous; for example,TIMESTAMP '2025-01-01' would be inferred as VARCHAR without the prefix.

                                Example

                                -- Using type literals in queries
                                SELECT
                                    VARCHAR 'Product Name: ' || name AS labeled_name,
                                    price * DECIMAL '1.08' AS price_with_tax,
                                    created_at + INTERVAL '7 days' AS expiry_date
                                FROM products
                                WHERE created_at > TIMESTAMP '2025-01-01';

                                Arrays

                                Arrays are ordered collections of values that all share the same data type. Every DDSQL base type has a corresponding array type.

                                Array literals

                                Use the ARRAY[value1, value2, ...] syntax to construct an array literal. The array’s type is automatically inferred from the values.

                                SELECT ARRAY['apple', 'banana', 'cherry'] AS fruits;  -- VARCHAR array
                                SELECT ARRAY[1, 2, 3] AS numbers;                     -- BIGINT array
                                SELECT ARRAY[true, false, true] AS flags;             -- BOOLEAN array
                                SELECT ARRAY[1.1, 2.2, 3.3] AS decimals;              -- DECIMAL array

                                Element access

                                Access individual array elements with a 1-based subscript. Accessing an index that is out of bounds returns NULL.

                                SELECT ARRAY['a', 'b', 'c'][1];   -- Returns 'a'
                                SELECT ARRAY['a', 'b', 'c'][2];   -- Returns 'b'
                                SELECT ARRAY['a', 'b', 'c'][10];  -- Returns NULL (out of bounds)

                                To access elements of an array column, use the same subscript syntax:

                                SELECT recipients[1] AS first_recipient
                                FROM emails

                                Array functions

                                The following functions operate on arrays:

                                FunctionReturn TypeDescription
                                CARDINALITY(array a)BIGINTReturns the number of elements in the array.
                                ARRAY_POSITION(array a, typeof_array value)BIGINTReturns the 1-based index of the first occurrence of value in the array, or NULL if not found.
                                STRING_TO_ARRAY(string s, string delimiter)VARCHAR[]Splits a string into an array of strings on the given delimiter.
                                ARRAY_TO_STRING(array a, string delimiter)VARCHARJoins array elements into a string with the given delimiter.
                                ARRAY_AGG(expression e)array of input typeAggregates values from multiple rows into an array.
                                UNNEST(array a [, array b...])rows of a [, b…]Expands one or more arrays into a set of rows. Only valid in a FROM clause.

                                Examples

                                CARDINALITY

                                SELECT
                                  CARDINALITY(recipients) AS recipient_count
                                FROM
                                  emails

                                ARRAY_POSITION

                                SELECT
                                  ARRAY_POSITION(recipients, '[email protected]') AS position
                                FROM
                                  emails

                                STRING_TO_ARRAY

                                SELECT
                                  STRING_TO_ARRAY('a,b,c,d,e,f', ',') AS parts

                                ARRAY_TO_STRING

                                SELECT
                                  ARRAY_TO_STRING(ARRAY['a', 'b', 'c'], ',') AS joined_string

                                ARRAY_AGG

                                SELECT
                                  sender,
                                  ARRAY_AGG(subject) AS subjects,
                                  ARRAY_AGG(DISTINCT subject) AS distinct_subjects
                                FROM
                                  emails
                                GROUP BY
                                  sender

                                UNNEST

                                SELECT
                                  sender,
                                  recipient
                                FROM
                                  emails,
                                  UNNEST(recipients) AS recipient

                                Functions

                                The following SQL functions are supported. For Window function, see the separate Window function section in this documentation.

                                FunctionReturn TypeDescription
                                MIN(variable v)typeof vReturns the smallest value in a set of data.
                                MAX(variable v)typeof vReturns the maximum value across all input values.
                                COUNT(any a)numericReturns the number of input values that are not null.
                                SUM(numeric n)numericReturns the summation across all input values.
                                AVG(numeric n)numericReturns the average value (arithmetic mean) across all input values.
                                BOOL_AND(boolean b)booleanReturns whether all non-null input values are true.
                                BOOL_OR(boolean b)booleanReturns whether any non-null input value is true.
                                CEIL(numeric n) / CEILING(numeric n)numericReturns the value rounded up to the nearest integer. Both CEIL and CEILING are supported as aliases.
                                FLOOR(numeric n)numericReturns the value rounded down to the nearest integer.
                                ROUND(numeric n)numericReturns the value rounded to the nearest integer.
                                POWER(numeric base, numeric exponent)numericReturns the value of base raised to the power of exponent.
                                LOWER(string s)stringReturns the string as lowercase.
                                UPPER(string s)stringReturns the string as uppercase.
                                ABS(numeric n)numericReturns the absolute value.
                                COALESCE(args a)typeof first non-null a OR nullReturns the first non-null value or null if all are null.
                                CAST(value AS type)typeConverts the given value to the specified data type.
                                LENGTH(string s)integerReturns the number of characters in the string.
                                TRIM(string s)stringRemoves leading and trailing whitespace from the string.
                                REPLACE(string s, string from, string to)stringReplaces occurrences of a substring within a string with another substring.
                                SUBSTRING(string s, int start, int length)stringExtracts a substring from a string, starting at a given position and for a specified length.
                                REVERSE(string s)stringReturns the string with characters in reverse order.
                                STRPOS(string s, string substring)integerReturns the first index position of the substring in a given string, or 0 if there is no match.
                                SPLIT_PART(string s, string delimiter, integer index)stringSplits the string on the given delimiter and returns the string at the given position counting from one.
                                EXTRACT(unit from timestamp/interval)numericExtracts a part of a date or time field (such as year or month) from a timestamp or interval.
                                TO_TIMESTAMP(string timestamp, string format)timestampConverts a string to a timestamp according to the given format.
                                TO_TIMESTAMP(numeric epoch)timestampConverts a UNIX epoch timestamp (in seconds) to a timestamp.
                                TO_CHAR(timestamp t, string format)stringConverts a timestamp to a string according to the given format.
                                DATE_BIN(interval stride, timestamp source, timestamp origin)timestampAligns a timestamp (source) to buckets of even length (stride). Returns the start of the bucket containing the source, calculated as the largest timestamp that is less than or equal to source and is a multiple of stride lengths from origin.
                                DATE_TRUNC(string unit, timestamp t)timestampTruncates a timestamp to a specified precision based on the provided unit.
                                CURRENT_SETTING(string setting_name)stringReturns the current value of the specified setting. Supports the parameters dd.time_frame_start and dd.time_frame_end, which return the start and end of the global time frame, respectively.
                                NOW()timestampReturns the current UTC timestamp at the start of the current query.
                                CARDINALITY(array a)integerReturns the number of elements in the array.
                                ARRAY_POSITION(array a, typeof_array value)integerReturns the index of the first occurrence of the value found in the array, or null if value is not found.
                                STRING_TO_ARRAY(string s, string delimiter)array of stringsSplits the given string into an array of strings using the given delimiter.
                                ARRAY_TO_STRING(array a, string delimiter)stringConverts an array to a string by concatenating elements with the given delimiter.
                                ARRAY_AGG(expression e)array of input typeCreates an array by collecting all the input values.
                                APPROX_PERCENTILE(double percentile) WITHIN GROUP (ORDER BY expression e)typeof expressionComputes an approximate percentile value. The percentile must be between 0.0 and 1.0 (inclusive). Requires the WITHIN GROUP (ORDER BY ...) syntax.
                                UNNEST(array a [, array b...])rows of a [, b…]Expands arrays into a set of rows. This form is only allowed in a FROM clause.

                                Examples

                                MIN

                                SELECT MIN(response_time) AS min_response_time
                                FROM logs
                                WHERE status_code = 200

                                MAX

                                SELECT MAX(response_time) AS max_response_time
                                FROM logs
                                WHERE status_code = 200

                                COUNT

                                SELECT COUNT(request_id) AS total_requests
                                FROM logs
                                WHERE status_code = 200 

                                SUM

                                SELECT SUM(bytes_transferred) AS total_bytes
                                FROM logs
                                GROUP BY service_name

                                AVG

                                SELECT AVG(response_time)
                                AS avg_response_time
                                FROM logs
                                WHERE status_code = 200
                                GROUP BY service_name

                                BOOL_AND

                                SELECT BOOL_AND(status_code = 200) AS all_success
                                FROM logs

                                BOOL_OR

                                SELECT BOOL_OR(status_code = 200) AS some_success
                                FROM logs

                                CEIL

                                SELECT CEIL(price) AS rounded_price
                                FROM products

                                FLOOR

                                SELECT FLOOR(price) AS floored_price
                                FROM products

                                ROUND

                                SELECT ROUND(price) AS rounded_price
                                FROM products

                                POWER

                                SELECT POWER(response_time, 2) AS squared_response_time
                                FROM logs

                                LOWER

                                SELECT LOWER(customer_name) AS lowercase_name
                                FROM customers

                                UPPER

                                SELECT UPPER(customer_name) AS uppercase_name
                                FROM customers

                                ABS

                                SELECT ABS(balance) AS absolute_balance
                                FROM accounts

                                COALESCE

                                SELECT COALESCE(phone_number, email) AS contact_info
                                FROM users

                                CAST

                                Supported cast target types:

                                • BIGINT
                                • DECIMAL
                                • INET
                                • TIMESTAMP
                                • VARCHAR
                                SELECT
                                  CAST(order_id AS VARCHAR) AS order_id_string,
                                  'Order-' || CAST(order_id AS VARCHAR) AS order_label
                                FROM
                                  orders

                                LENGTH

                                SELECT
                                  customer_name,
                                  LENGTH(customer_name) AS name_length
                                FROM
                                  customers

                                INTERVAL

                                SELECT
                                  TIMESTAMP '2023-10-01 10:00:00' + INTERVAL '30 days' AS future_date,
                                  INTERVAL '1 MILLISECOND 2 SECONDS 3 MINUTES 4 HOURS 5 DAYS'

                                TRIM

                                SELECT
                                  TRIM(name) AS trimmed_name
                                FROM
                                  users

                                REPLACE

                                SELECT
                                  REPLACE(description, 'old', 'new') AS updated_description
                                FROM
                                  products

                                SUBSTRING

                                SELECT
                                  SUBSTRING(title, 1, 10) AS short_title
                                FROM
                                  books

                                REVERSE

                                SELECT
                                  REVERSE(username) AS reversed_username
                                FROM
                                  users
                                LIMIT 5

                                STRPOS

                                SELECT
                                  STRPOS('foobar', 'bar')

                                SPLIT_PART

                                SELECT
                                  SPLIT_PART('aaa-bbb-ccc', '-', 2)

                                EXTRACT

                                Supported extraction units:

                                LiteralInput TypeDescription
                                daytimestamp / intervalday of the month
                                dowtimestampday of the week 1 (Monday) to 7 (Sunday)
                                doytimestampday of the year (1 - 366)
                                epochtimestamp / intervalseconds since 1970-01-01 00:00:00 UTC (for timestamps), or total number of seconds (for intervals)
                                hourtimestamp / intervalhour of the day (0 - 23)
                                minutetimestamp / intervalminute of the hour (0 - 59)
                                secondtimestamp / intervalsecond of the minute (0 - 59)
                                weektimestampweek of the year (1 - 53)
                                monthtimestampmonth of the year (1 - 12)
                                quartertimestampquarter of the year (1 - 4)
                                yeartimestampyear
                                timezone_hourtimestamphour of the time zone offset
                                timezone_minutetimestampminute of the time zone offset
                                SELECT
                                  EXTRACT(year FROM purchase_date) AS purchase_year
                                FROM
                                  sales
                                -- Get the Unix epoch of a timestamp
                                SELECT EXTRACT(epoch FROM TIMESTAMP '2021-01-01 00:00:00+00')
                                -- Returns: 1609459200
                                -- Get the total seconds in an interval
                                SELECT EXTRACT(epoch FROM INTERVAL '1 day 2 hours')
                                -- Returns: 93600
                                -- Calculate how many seconds ago each event occurred
                                SELECT
                                  event_time,
                                  EXTRACT(epoch FROM now()) - EXTRACT(epoch FROM event_time) AS seconds_ago
                                FROM
                                  events

                                TO_TIMESTAMP

                                TO_TIMESTAMP has two forms:

                                Form 1: Convert string to timestamp with format

                                Supported patterns for date/time formatting:

                                PatternDescription
                                YYYYyear (4 digits)
                                YYyear (2 digits)
                                MMmonth number (01 - 12)
                                DDday of month (01 - 31)
                                HH24hour of day (00 - 23)
                                HH12hour of day (01 - 12)
                                HHhour of day (01 - 12)
                                MIminute (00 - 59)
                                SSsecond (00 - 59)
                                MSmillisecond (000 - 999)
                                TZtime-zone abbreviation
                                OFtime-zone offset from UTC
                                AM / ammeridiem indicator (without periods)
                                PM / pmmeridiem indicator (without periods)
                                SELECT
                                  TO_TIMESTAMP('25/12/2025 04:23 pm', 'DD/MM/YYYY HH:MI am') AS ts

                                Form 2: Convert UNIX epoch timestamp to timestamp

                                SELECT
                                  TO_TIMESTAMP(1735142580) AS ts_from_epoch

                                TO_CHAR

                                Supported patterns for date/time formatting:

                                PatternDescription
                                YYYYyear (4 digits)
                                YYyear (2 digits)
                                MMmonth number (01 - 12)
                                DDday of month (01 - 31)
                                HH24hour of day (00 - 23)
                                HH12hour of day (01 - 12)
                                HHhour of day (01 - 12)
                                MIminute (00 - 59)
                                SSsecond (00 - 59)
                                MSmillisecond (000 - 999)
                                TZtime-zone abbreviation
                                OFtime-zone offset from UTC
                                AM / ammeridiem indicator (without periods)
                                PM / pmmeridiem indicator (without periods)
                                SELECT
                                  TO_CHAR(order_date, 'MM-DD-YYYY') AS formatted_date
                                FROM
                                  orders

                                DATE_BIN

                                SELECT DATE_BIN('15 minutes', TIMESTAMP '2025-09-15 12:34:56', TIMESTAMP '2025-01-01')
                                -- Returns 2025-09-15 12:30:00
                                
                                SELECT DATE_BIN('1 day', TIMESTAMP '2025-09-15 12:34:56', TIMESTAMP '2025-01-01')
                                -- Returns 2025-09-15 00:00:00

                                DATE_TRUNC

                                Supported truncations:

                                • milliseconds
                                • seconds / second
                                • minutes / minute
                                • hours / hour
                                • days / day
                                • weeks / week
                                • months / month
                                • quarters / quarter
                                • years / year
                                SELECT
                                  DATE_TRUNC('month', event_time) AS month_start
                                FROM
                                  events

                                CURRENT_SETTING

                                Supported setting parameters:

                                • dd.time_frame_start: Returns the start of the selected time frame in RFC 3339 format (YYYY-MM-DD HH:mm:ss.sss±HH:mm).
                                • dd.time_frame_end: Returns the end of the selected time frame in RFC 3339 format (YYYY-MM-DD HH:mm:ss.sss±HH:mm).
                                -- Define the current analysis window
                                WITH bounds AS (
                                  SELECT CAST(CURRENT_SETTING('dd.time_frame_start') AS TIMESTAMP) AS time_frame_start,
                                         CAST(CURRENT_SETTING('dd.time_frame_end')   AS TIMESTAMP) AS time_frame_end
                                ),
                                -- Define the immediately preceding window of equal length
                                     previous_bounds AS (
                                  SELECT time_frame_start - (time_frame_end - time_frame_start) AS prev_time_frame_start,
                                         time_frame_start                                       AS prev_time_frame_end
                                  FROM bounds
                                )
                                SELECT * FROM bounds, previous_bounds

                                NOW

                                SELECT
                                  *
                                FROM
                                  sales
                                WHERE
                                  purchase_date > NOW() - INTERVAL '1 hour'

                                APPROX_PERCENTILE

                                -- Calculate the median (50th percentile) response time
                                SELECT
                                  APPROX_PERCENTILE(0.5) WITHIN GROUP (ORDER BY response_time) AS median_response_time
                                FROM
                                  logs
                                
                                -- Calculate 95th and 99th response time percentiles by service
                                SELECT
                                  service_name,
                                  APPROX_PERCENTILE(0.95) WITHIN GROUP (ORDER BY response_time) AS p95_response_time,
                                  APPROX_PERCENTILE(0.99) WITHIN GROUP (ORDER BY response_time) AS p99_response_time
                                FROM
                                  logs
                                GROUP BY
                                  service_name

                                Regular expressions

                                Flavor

                                All regular expression (regex) functions use the International Components for Unicode (ICU) flavor:

                                • Metacharacters
                                • Operators
                                • Set Expressions (Character Classes)
                                • Flag Options for in-pattern flags. Refer to the flags section below for function-level flags.
                                • Find and Replace (using capture groups)

                                Functions

                                FunctionReturn TypeDescription
                                REGEXP_LIKE(string input, string pattern)BooleanEvaluates whether a string matches a regular expression pattern.
                                REGEXP_MATCH(string input, string pattern [, string flags ])array of stringsReturns substrings of the first pattern match in the string.

                                This function searches the input string using the given pattern and returns captured substrings (capture groups) from the first match. If no capture groups are present, returns the full match.
                                REGEXP_REPLACE(string input, string pattern, string replacement [, string flags ])stringReplaces the substring that is the first match to the pattern, or all such matches if you use the optional g flag.
                                REGEXP_REPLACE (string input, string pattern, string replacement, integer start, integer N [, string flags ] )stringReplaces the substring that is the Nth match to the pattern, or all such matches if N is zero, starting from start.

                                Examples

                                REGEXP_LIKE

                                SELECT
                                  *
                                FROM
                                  emails
                                WHERE
                                  REGEXP_LIKE(email_address, '@example\.com$')

                                REGEXP_MATCH

                                SELECT regexp_match('foobarbequebaz', '(bar)(beque)');
                                -- {bar,beque}
                                
                                SELECT regexp_match('foobarbequebaz', 'barbeque');
                                -- {barbeque}
                                
                                SELECT regexp_match('abc123xyz', '([a-z]+)(\d+)(x(.)z)');
                                -- {abc,123,xyz,y}

                                REGEXP_REPLACE

                                SELECT regexp_replace('Auth success token=abc123XYZ789', 'token=\w+', 'token=***');
                                -- Auth success token=***
                                
                                SELECT regexp_replace('status=200 method=GET', 'status=(\d+) method=(\w+)', '$2: $1');
                                -- GET: 200
                                
                                SELECT regexp_replace('INFO INFO INFO', 'INFO', 'DEBUG', 1, 2);
                                -- INFO DEBUG INFO

                                Function-level flags

                                You can use the following flags with regular expression functions:

                                i
                                Case-insensitive matching
                                n or m
                                Newline-sensitive matching
                                g
                                Global; replace all matching substrings rather than only the first one

                                Examples

                                i flag

                                SELECT regexp_match('INFO', 'info')
                                -- NULL
                                
                                SELECT regexp_match('INFO', 'info', 'i')
                                -- ['INFO']

                                n flag

                                SELECT regexp_match('a
                                b', '^b');
                                -- NULL
                                
                                SELECT regexp_match('a
                                b', '^b', 'n');
                                -- ['b']

                                g flag

                                SELECT icu_regexp_replace('Request id=12345 completed, id=67890 pending', 'id=\d+', 'id=XXX');
                                -- Request id=XXX completed, id=67890 pending
                                
                                SELECT regexp_replace('Request id=12345 completed, id=67890 pending', 'id=\d+', 'id=XXX', 'g');
                                -- Request id=XXX completed, id=XXX pending

                                Window functions

                                This table provides an overview of the supported window functions. For comprehensive details and examples, see the PostgreSQL documentation.

                                FunctionReturn TypeDescription
                                OVERN/ADefines a window for a set of rows for other window functions to operate on.
                                PARTITION BYN/ADivides the result set into partitions, specifically for applying window functions.
                                RANK()integerAssigns a rank to each row within a partition, with gaps for ties.
                                ROW_NUMBER()integerAssigns a unique sequential number to each row within a partition.
                                LEAD(column n)typeof columnReturns the value from the next row in the partition.
                                LAG(column n)typeof columnReturns the value from the previous row in the partition.
                                FIRST_VALUE(column n)typeof columnReturns the first value in an ordered set of values.
                                LAST_VALUE(column n)typeof columnReturns the last value in an ordered set of values.
                                NTH_VALUE(column n, offset)typeof columnReturns the value at the specified offset in an ordered set of values.

                                JSON functions and operators

                                NameReturn typeDescription
                                json_extract_path_text(text json, text path…)textExtracts a JSON sub-object as text, defined by the path. Its behavior is equivalent to the Postgres function with the same name. For example, json_extract_path_text(col, ‘forest') returns the value of the key forest for each JSON object in col. See the example below for a JSON array syntax.
                                json_extract_path(text json, text path…)JSONSame functionality as json_extract_path_text, but returns a column of JSON type instead of text type.
                                json_array_elements(text json)rows of JSONExpands a JSON array into a set of rows. This form is only allowed in a FROM clause.
                                json_array_elements_text(text json)rows of textExpands a JSON array into a set of rows. This form is only allowed in a FROM clause.

                                Network address functions and operators

                                The inet type represents IPv4 and IPv6 network addresses with an optional CIDR prefix length (for example, 192.168.1.5/24 or ::1). Create inet values with the type literal syntax INET 'value' or by casting a string with CAST(column AS inet).

                                Functions

                                FunctionReturn TypeDescription
                                host(inet addr)VARCHARReturns the IP address as text, without the prefix length.
                                network(inet addr)INETReturns the network part of the address, with host bits zeroed.
                                netmask(inet addr)INETReturns the network mask for the address.
                                masklen(inet addr)BIGINTReturns the prefix length of the network mask.
                                broadcast(inet addr)INETReturns the broadcast address of the network.
                                family(inet addr)BIGINTReturns the address family: 4 for IPv4, 6 for IPv6.

                                Operators

                                OperatorReturn TypeDescription
                                inet a << inet bBOOLEANReturns true if a is strictly contained within b.
                                inet a <<= inet bBOOLEANReturns true if a is contained within or equals b.
                                inet a >> inet bBOOLEANReturns true if a strictly contains b.
                                inet a >>= inet bBOOLEANReturns true if a contains or equals b.
                                inet a && inet bBOOLEANReturns true if the subnets of a and b overlap.

                                Examples

                                host

                                SELECT host(INET '192.168.1.5/24')
                                -- Returns: 192.168.1.5

                                network

                                SELECT network(INET '192.168.1.5/24')
                                -- Returns: 192.168.1.0/24

                                netmask

                                SELECT netmask(INET '192.168.1.5/24')
                                -- Returns: 255.255.255.0

                                masklen

                                SELECT masklen(INET '192.168.1.5/24')
                                -- Returns: 24

                                broadcast

                                SELECT broadcast(INET '192.168.1.5/24')
                                -- Returns: 192.168.1.255/24

                                family

                                SELECT family(INET '::1')
                                -- Returns: 6
                                
                                SELECT family(INET '192.168.1.5')
                                -- Returns: 4

                                Containment operators

                                -- Check if an IP is within a subnet
                                SELECT INET '192.168.1.5' << INET '192.168.1.0/24'
                                -- Returns: true
                                
                                -- Check containment or equality
                                SELECT INET '192.168.1.0/24' <<= INET '192.168.1.0/24'
                                -- Returns: true
                                
                                -- Check if a subnet contains an IP
                                SELECT INET '10.0.0.0/8' >> INET '10.1.2.3'
                                -- Returns: true
                                
                                -- Check if two subnets overlap
                                SELECT INET '192.168.1.0/24' && INET '192.168.1.128/25'
                                -- Returns: true

                                Combined usage

                                -- Find all IPs in a private subnet and extract network info
                                SELECT
                                  host(CAST(src_ip AS inet)) AS ip,
                                  masklen(CAST(src_ip AS inet)) AS prefix_len,
                                  network(CAST(src_ip AS inet)) AS network
                                FROM connections
                                WHERE CAST(src_ip AS inet) << INET '10.0.0.0/8'
                                  AND family(CAST(src_ip AS inet)) = 4

                                Table functions

                                Table functions are used to query logs, metrics, cloud costs, and other data sources.

                                FunctionDescriptionExample
                                dd.logs(
                                    columns => array < varchar >,
                                    filter ? => varchar,
                                    indexes ? => array < varchar >,
                                    storage ? => varchar,
                                    from_timestamp ? => timestamp,
                                    to_timestamp ? => timestamp
                                ) AS (column_name type [, ...])
                                Returns log data as a table. The columns parameter specifies which log fields to extract. Nested fields are accessed using dot notation, and non-core fields need to be prepended by @. The AS clause defines the schema of the returned table. Optional: filtering by index or time range. When time is not specified, DDSQL defaults to the global time setting, which in DDSQL Editor is set to the past 1 hour. Optional: specifying the storage to use (for example, hot, flex_tier). When not specified, the default is hot storage.
                                SELECT timestamp, host, service, message, asset_id
                                FROM dd.logs(
                                    filter  => 'source:java',
                                    columns => ARRAY['timestamp','host','service','message','@asset.id']
                                ) AS (
                                    timestamp TIMESTAMP,
                                    host      VARCHAR,
                                    service   VARCHAR,
                                    message   VARCHAR,
                                    asset_id  VARCHAR
                                )
                                dd.metrics_scalar(
                                    query varchar,
                                    reducer varchar [, from_timestamp timestamp, to_timestamp timestamp]
                                )
                                Returns metric data as a scalar value. The function accepts a metrics query (with optional grouping), a reducer to determine how values are aggregated (avg, max, etc.), and optional timestamp parameters (default 1 hour) to define the time range.
                                SELECT *
                                FROM dd.metrics_scalar(
                                    'avg:system.cpu.user{*} by {service}',
                                    'avg',
                                    TIMESTAMP '2025-07-10 00:00:00.000-04:00',
                                    TIMESTAMP '2025-07-17 00:00:00.000-04:00'
                                )
                                ORDER BY value DESC;
                                dd.metrics_timeseries(
                                    query varchar [, from_timestamp timestamp, to_timestamp timestamp]
                                )
                                Returns metric data as a timeseries. The function accepts a metrics query (with optional grouping) and optional timestamp parameters (default 1 hour) to define the time range. Returns datapoints over time rather than a single aggregated value.
                                SELECT *
                                FROM dd.metrics_timeseries(
                                    'avg:system.cpu.user{*} by {service}',
                                    TIMESTAMP '2025-07-10 00:00:00.000-04:00',
                                    TIMESTAMP '2025-07-17 00:00:00.000-04:00'
                                )
                                ORDER BY timestamp, service;
                                dd.cloud_cost_scalar(
                                    query varchar,
                                    reducer varchar
                                    [, from_timestamp timestamp,
                                    to_timestamp timestamp]
                                )
                                Returns Cloud Cost Management data as a scalar value. The function accepts a cloud cost query (with optional grouping), an aggregation reducer (use sum for cost data; other reducers such as avg, min, and max are accepted but rarely applicable to cost queries), and optional timestamp parameters (default 1 hour) to define the time range. Note: Cloud cost data is typically delayed by 24-48 hours, so recent timestamps may return no results.
                                SELECT *
                                FROM dd.cloud_cost_scalar(
                                    'sum:all.cost{*} by {service}',
                                    'sum',
                                    TIMESTAMP '2025-07-10 00:00:00.000-04:00',
                                    TIMESTAMP '2025-07-17 00:00:00.000-04:00'
                                )
                                ORDER BY value DESC;
                                dd.cloud_cost_timeseries(
                                    query varchar
                                    [, from_timestamp timestamp,
                                    to_timestamp timestamp]
                                )
                                Returns Cloud Cost Management data as a timeseries. The function accepts a cloud cost query (with optional grouping) and optional timestamp parameters (default 1 hour) to define the time range. Returns cost datapoints over time rather than a single aggregated value. Note: Cloud cost data is typically delayed by 24-48 hours, so recent timestamps may return no results.
                                SELECT *
                                FROM dd.cloud_cost_timeseries(
                                    'sum:all.cost{*} by {service}',
                                    TIMESTAMP '2025-07-10 00:00:00.000-04:00',
                                    TIMESTAMP '2025-07-17 00:00:00.000-04:00'
                                )
                                ORDER BY timestamp, service;

                                Examples

                                Absolute timestamps

                                SELECT *
                                FROM dd.logs(
                                    columns => ARRAY['timestamp','host','service','message'],
                                    from_timestamp => TIMESTAMP '2025-07-10 00:00:00.000-04:00',
                                    to_timestamp => TIMESTAMP '2025-07-17 00:00:00.000-04:00'
                                ) AS (
                                    timestamp TIMESTAMP,
                                    host      VARCHAR,
                                    service   VARCHAR,
                                    message   VARCHAR
                                )

                                Relative timestamps

                                SELECT *
                                FROM dd.logs(
                                    columns => ARRAY['timestamp','host','service','message'],
                                    from_timestamp => now() - INTERVAL '7 days',
                                    to_timestamp => now()
                                ) AS (
                                    timestamp TIMESTAMP,
                                    host      VARCHAR,
                                    service   VARCHAR,
                                    message   VARCHAR
                                )

                                Optional parameters

                                SELECT *
                                FROM dd.logs(
                                    columns => ARRAY['timestamp','host','service','message'],
                                    filter  => 'source:java',
                                    indexes => ARRAY['trino'],
                                    storage => 'hot'
                                ) AS (
                                    timestamp TIMESTAMP,
                                    host      VARCHAR,
                                    service   VARCHAR,
                                    message   VARCHAR
                                )

                                Nested field access

                                Column aliases cannot contain dots; replace them with underscores or any other valid character when defining the alias.

                                SELECT timestamp, host, asset_id, view_url, data_resource_type
                                FROM dd.logs(
                                    filter  => 'service:mcp',
                                    columns => ARRAY['timestamp','host','@asset.id','@view.url','@data.resource.type']
                                ) AS (
                                    timestamp TIMESTAMP,
                                    host      VARCHAR,
                                    asset_id  VARCHAR,
                                    view_url  VARCHAR,
                                    data_resource_type VARCHAR
                                )

                                Tags

                                DDSQL exposes tags as an hstore type, which is inspired by PostgreSQL. You can access the values for specific tag keys using the PostgreSQL arrow operator. For example:

                                SELECT instance_type, count(instance_type)
                                FROM aws.ec2_instance
                                WHERE tags->'region' = 'us-east-1' -- region is a tag, not a column
                                GROUP BY instance_type
                                

                                Tags are key-value pairs where each key can have zero, one, or multiple tag values corresponding to it. When accessed, the tag value returns a single string, containing all corresponding values. When the data has multiple tag values for the same tag key, they are represented as a sorted, comma-separated string. For example:

                                SELECT tags->'team', instance_type, architecture, COUNT(*) as instance_count
                                FROM aws.ec2_instance
                                WHERE tags->'team' = 'compute_provisioning,database_ops'
                                GROUP BY tags->'team', instance_type, architecture
                                ORDER BY instance_count DESC
                                

                                You can also compare tag values as strings or entire tag sets:

                                SELECT *
                                FROM k8s.daemonsets da INNER JOIN k8s.deployments de
                                ON da.tags = de.tags -- for a specific tag: da.tags->'app' = de.tags->'app'
                                

                                Additionally, you can extract tag keys and values into individual arrays of text:

                                SELECT akeys(tags), avals(tags)
                                FROM aws.ec2_instance
                                

                                HSTORE functions and operators

                                NameReturn typeDescription
                                tags -> ’text'TextGets the value for a given key. Returns null if key is not present.
                                akeys(hstore tags)Array of textGets the keys of an HSTORE as an array
                                avals(hstore tags)Array of textGets the values of an HSTORE as an array

                                Template variables

                                Template variables in DDSQL Editor are in Preview, so their syntax and supported types are subject to change. You can use a variable only as the second argument of dd.matches(). Referencing $var anywhere else in a query is not supported. Contact Datadog support to request access.

                                Template variables let you change query filters without editing SQL.

                                Filter rows with dd.matches

                                Use dd.matches(column, $var) in a WHERE clause to compare a column or expression with the variable’s selected values. For example, for a variable named env:

                                SELECT *
                                FROM aws.ec2_instance
                                WHERE dd.matches(tags->'env', $env);
                                Selected valuesMatches
                                prodAn exact, case-sensitive match.
                                prod, stagingEither value.
                                *No filter. An empty selection also applies no filter.
                                prod*Values starting with prod.
                                *prodValues ending with prod.
                                *prod*Values containing prod.

                                Variable syntax

                                Pass $env directly, without single quotes or .value. The column or expression determines what is filtered; the variable’s tag is not added.

                                For non-text columns, cast the expression to VARCHAR first, for example dd.matches(CAST(status_code AS VARCHAR), $status).

                                Use $env for a lowercase variable name. Enclose names containing uppercase letters, spaces, or punctuation in double quotes, for example $"aws-region".

                                Writing efficient queries

                                Queries that read large amounts of data or run heavy computations can be slow or return resource errors. The patterns below are the most common causes, each with a rewrite that usually resolves the issue.

                                Filter early and aggregate early. Computations in the query filter or a GROUP BY summary run against the index. Computations in a JOIN or a wide LIMIT are held in memory.

                                Checklist

                                Before re-running a slow query, ask the following questions:

                                • Does the query filter include a selective token (not a wildcard like service:* or env:*)?
                                • Is the time range as small as it can be for the question?
                                • Are you selecting only the columns you actually use?
                                • If you have a large LIMIT, could a GROUP BY summary work instead?
                                • If you have many JOIN clauses, could the query be rewritten as a single scan?
                                • When joining across sources, is each side filtered?
                                • Is the JOIN key high-cardinality (user/ request/trace ID)?
                                • Is the same regex being run more than once per row?

                                Filtering

                                Filter on the data source

                                Always include a selective token in your data source query, such as service:, host:, env:, or any @attribute:value.

                                Wildcard filters such as service:* or env:* match every event, so they don’t actually narrow the data. Treat these filters as equivalent to leaving the filter blank.

                                Before

                                -- No filter; scans all logs in the time range
                                SELECT timestamp, service, host, message
                                FROM dd.logs(
                                    columns        => ARRAY['timestamp', 'service', 'host', 'message'],
                                    from_timestamp => NOW() - INTERVAL '7 days',
                                    to_timestamp   => NOW()
                                ) AS (
                                    timestamp TIMESTAMP,
                                    service   VARCHAR,
                                    host      VARCHAR,
                                    message   VARCHAR
                                )
                                

                                After

                                -- filter => narrows the scan to matching events before any SQL runs
                                SELECT timestamp, service, host, message
                                FROM dd.logs(
                                    filter         => 'service:checkout-api env:prod',
                                    columns        => ARRAY['timestamp', 'service', 'host', 'message'],
                                    from_timestamp => NOW() - INTERVAL '7 days',
                                    to_timestamp   => NOW()
                                ) AS (
                                    timestamp TIMESTAMP,
                                    service   VARCHAR,
                                    host      VARCHAR,
                                    message   VARCHAR
                                )
                                

                                Choose a time range that fits the question

                                Scan time grows with the time range. Consider starting with a window that covers the question (often a few hours or a day) and widening only when the question demands more. For long-term trends, a pre-aggregated metric or a daily-summary query runs faster than re-scanning raw events on every run.

                                Goal: understand log volume from the billing service over the last month.

                                Before

                                -- Scans 31 days of raw events
                                SELECT timestamp, message
                                FROM dd.logs([Page truncated to keep GeezerVison snappy.]

                                You are visitor 01402775 — GeezerVison does not store the pages you look up.
                                Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.