Out Degrees All
UDTF: cugraph_out_degrees_all
Official cuGraph reference: C API
Count outgoing edges for every vertex in the graph.
Quickstart
The call below supplies edges from registered relation target_edges with canonical src and dst columns and may include weight. Substitute your own registered relations.
SELECT *
FROM cugraph_out_degrees_all(
edges => (SELECT src, dst FROM target_edges)
);
Inputs
Every relation is a named parenthesized SELECT subquery. The required edges role uses canonical src and dst columns; every role, its canonical columns, and their accepted Arrow types are listed under Relation arguments. Metadata validation resolves registered tables named in its JSON request.
Endpoint columns accept numeric Int32, Int64 vertex IDs or logical string Utf8, LargeUtf8, Utf8View vertex IDs; string vertex-identity outputs are canonicalized to Utf8 (native mapping Int64) while scores, distances, counts, coordinates, and opaque labels stay numeric. The shared vertex-ID contract is summarized in Vertex ID support; the concrete call-specific schema comes from gpu_validate_call.
Logical string side-input limitations:
- edge ID columns and edge-ID predicate side inputs are not supported for logical string graphs
Arguments and options
Relation arguments
Every edge_id column must have the integer type of src and dst; string-keyed graphs accept no edge IDs.
Named value arguments
This UDTF has no algorithm-specific value arguments. Its inputs are the relation arguments above and the graph construction options below.
Graph construction options
Graph construction follows the shared defaults (directed=true, renumbering, python_cugraph policy) documented in Graph Construction Options.
Output
These are generic descriptor schemas; run gpu_validate_call to get the concrete, table-specific output schema.
Examples
This example runs on the citation network demo dataset.
Which recent NLP papers offer the broadest bibliographies?
When preparing a literature review, a paper with a long reference list can provide many starting points. Restrict the search to papers from 2015 through the snapshot's 2020 cutoff in the language-related fields below, then count their outgoing citations. The result ranks bibliography breadth within this corpus; it does not measure review quality.
SELECT p.year, p.title, d.out_degree AS bibliography_size
FROM cugraph_out_degrees_all(edges => (SELECT src, dst FROM citation_edges)) d
JOIN papers p ON p.paper_id = d.vertex
WHERE p.year BETWEEN 2015 AND 2020
AND p.primary_fos IN (
'Natural language processing', 'Language model',
'Machine translation', 'Question answering')
ORDER BY d.out_degree DESC, p.paper_id
LIMIT 6;
Neural Approaches to Conversational AI. has the largest bibliography in this filtered set, with 385 outgoing references.
The field filter defines the candidate papers. References outside those fields still count because the edge relation includes the full citation network.
Limits
No algorithm-specific limitations.
To dry-run validate relation metadata, column types, and options without execution, see gpu_validate_call.