[ Web Proxy ]
URL:
Viewing: https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/graph-data-types [Back]  [Original]

GQL data types  |  BigQuery  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

GQL data types Stay organized with collections Save and categorize content based on your preferences.

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

Note: To provide feedback or request support for this feature, send an email to bq-graph-preview-support@google.com.

Graph Query Language (GQL) supports all GoogleSQL data types, including the following GQL-specific data type:

Graph data types list

Name Summary
Graph element type An element in a property graph. Can be a GRAPH_NODE or GRAPH_EDGE.
SQL type name: GRAPH_ELEMENT
Graph path type A path in a property graph.
SQL type name: GRAPH_PATH

Graph element type

Name Description
GRAPH_ELEMENT An element in a property graph.

A variable with a GRAPH_ELEMENT type is produced by a graph query. The generated type has this format:

GRAPH_ELEMENT<T>

A graph element is either a node or an edge, representing data from a matching node or edge table based on its label. Each graph element holds a set of properties that can be accessed with a case-insensitive name, similar to fields of a struct.

Example

In the following example, n represents a graph element in the FinGraph property graph:

GRAPH graph_db.FinGraph
MATCH (n:Person)
RETURN n.name

In the following example, the TYPEOF function is used to inspect the set of properties defined in the graph element type.

GRAPH graph_db.FinGraph
MATCH (n:Person)
RETURN TYPEOF(n) AS t
LIMIT 1

/*--------------------------------------------------------+
 | t                                                      |
 +--------------------------------------------------------+
 | GRAPH_NODE(myproject.graph_db.FinGraph)<id INT64, ...> |
 +--------------------------------------------------------*/

Graph path type

Name Description
GRAPH_PATH A path in a property graph.

The graph path data type represents a sequence of nodes interleaved with edges and has this format:

GRAPH_PATH<NODE_TYPE, EDGE_TYPE>
Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page