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.
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.
The vertex-ID types this UDTF accepts, the numeric types a per-call codebook maps to native ids, and its string-key limits are listed in Vertex ID support; the concrete call-specific schema comes from gpu_validate_call.
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.
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.
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;
The field filter defines the candidate papers. References outside those fields still count because the edge relation includes the full citation network.