In Degrees All
UDTF: cugraph_in_degrees_all
Official cuGraph reference: C API
Count incoming 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_in_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.
How much of each paper's reported citation count appears in this dataset?
papers.n_citation stores AMiner's reported count, while in_degree counts
incoming edges present in this dataset. Their difference measures the gap between
reported metadata and the edges present in this snapshot.
SELECT p.year, d.in_degree AS in_graph, p.n_citation AS reported,
p.n_citation - d.in_degree AS citation_gap,
p.title AS paper
FROM cugraph_in_degrees_all(edges => (SELECT src, dst FROM citation_edges)) d
JOIN papers p ON p.paper_id = d.vertex
ORDER BY d.in_degree DESC
LIMIT 5;