Cloudflare 中文文档
Analytics
Analytics
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

GraphQL datasets (tables)

Cloudflare Analytics offers a range of datasets, including both general and product-specific ones. Datasets use a consistent naming scheme that explicitly identifies the type of data they return:

  • Domain - Each dataset is named after the field it describes and is associated with a set of nodes. Product-specific data nodes incorporate the name of the relevant product, for instance loadBalancingRequests* nodes.

  • Adaptive Sampling - Nodes that represent data acquired using adaptive sampling incorporate the Adaptive suffix. For more details, refer to sampling.

  • Aggregated data - Nodes that represent aggregated data include the Groups suffix. For example, the loadBalancingRequestsAdaptiveGroups node represents aggregated data for Load Balancing requests. Aggregated data is returned in an array of ...Group objects. Please note: we have a node that currently excluded from that naming convention - workersInvocationsAdaptive (beta).

  • Raw data - Raw data nodes, such as loadBalancingRequestsAdaptive, are not aggregated and so do not incorporate the Groups suffix. Raw data is returned in arrays containing objects of the relevant data type. For example, a query to loadBalancingRequestsAdaptive returns a variety of LoadBalancingRequest objects.

To find out more information about datasets, availability, beta, and deprecation statuses, please refer to GraphQL discovery features.

​​ Working with datasets

​​ Aggregated fields

This example illustrates the structure for Groups:

Unique values are not available as a dimension but can be queried as demonstrated in this example:

​​ Schema type definitions

Every exposed table has a GraphQL type definition. Type definitions observe the following rules:

  • Regular fields represent themselves.
  • Every field, including nested fields, has a type and represents a list of that type.
  • The enum type represents an enumerated field.

Here is an example type definition for ContentTypeMapElem: