쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

Degree mutate centrality algorithm

포커스 모드
Degree mutate centrality algorithm - Neptune Analytics
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

The .degree.mutate centrality algorithm counts the number of incident edges of every node in the graph. This measure of how connected the node is can in turn indicate the node's importance and level of influence in the network. The .degree.mutate algorithm then stores each node's calculated degree value as a property of the node.

The algorithm returns a single success flag (true or false), which indicates whether the writes succeeded or failed.

.degree.mutate   syntax

CALL neptune.algo.degree.mutate( { writeProperty: A name for the new node property where the degree values will be written, edgeLabels: [a list of edge labels for filtering (optional)], vertexLabel: "a node label for filtering (optional)", traversalDirection: traversal direction (optional), concurrency: number of threads to use (optional) } ) YIELD success RETURN success

.degree.mutate   inputs

a configuration object that contains:
  • writeProperty (required)   –   type: string;   default: none.

    A name for the new node property that will contain the computed degree values.

  • edgeLabels   (optional)   –   type: a list of edge label strings;   example: ["route", ...];   default: no edge filtering.

    To filter on one more edge labels, provide a list of the ones to filter on. If no edgeLabels field is provided then all edge labels are processed during traversal.

  • vertexLabel (optional)   –   type: string;   default: none.

    A node label for node filtering. If vertexLabel is provided, vertices matching the label are the only vertices that are processed, including vertices in the input list.

  • traversalDirection (optional)   –   type: string;   default: "outbound".

    The direction of edge to follow. Must be one of: "inbound", "outbound", or "both".

  • concurrency   (optional)   –   type: 0 or 1;   default: 0.

    Controls the number of concurrent threads used to run the algorithm.

    If set to 0, uses all available threads to complete execution of the individual algorithm invocation. If set to 1, uses a single thread. This can be useful when requiring the invocation of many algorithms concurrently.

Output of the .degree.mutate algorithm

The computed degree values are written to a new vertex property using the property name specified by the writeProperty input parameter.

A single Boolean success value (true or false) is returned, which indicates whether or not the writes succeeded.

.degree.mutate query examples

The example below is a standalone example, where the source vertex list is explicitly provided in the query.

This query writes the degree values of all nodes in the graph to a new vertex property called DEGREE:

CALL neptune.algo.degree.mutate({writeProperty: "DEGREE", edgeLabels: ["route]})

After using the mutate algorithm, the newly written properties can then be accessed in subsequent queries. For example, after the mutate algorithm call above, you could use the following query to retrieve the .degree property of specific nodes:

MATCH (n) WHERE id(n) IN ["101", "102", "103"] RETURN n.DEGREE'

Sample output from .degree.mutate

Here is an example of the output returned by .degree.mutate when run against the sample air-routes dataset [nodes], and sample air-routes dataset [edges], when using the following query:

aws neptune-graph execute-query \ --graph-identifier ${graphIdentifier} \ --query-string "CALL neptune.algo.degree.mutate({writeProperty: 'degree'}) YIELD success RETURN success" \ --language open_cypher \ /tmp/out.txt cat /tmp/out.txt { "results": [ { "success": true } ] }

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.