Graph Over Data Lake
Project data from S3 Tables, S3 Vectors, Databricks, Snowflake, and OpenSearch into a graph for analysis, then export results back.
Graph Over Data Lake
Project data from S3 Tables, S3 Vectors, Databricks, Snowflake, and OpenSearch into a graph for analysis, then export results back.
Session Manager
Manage the full lifecycle of a Neptune Analytics graph: create, import, analyze, export, and destroy — all from Python.
NetworkX Backend
Use familiar NetworkX APIs to run graph algorithms on Neptune Analytics — no code changes required. Just add backend="neptune".
Open Source
Apache 2.0 licensed, developed in the open by AWS Labs.
from nx_neptune.session_manager import SessionManager
session = SessionManager.session("fraud-detection")graph = await session.get_or_create_graph(config={"provisionedMemory": 32})
# Define your Athena SQL to project nodes and edgesNODES = """SELECT DISTINCT "~id", 'customer' AS "~label"FROM ( SELECT "nameOrig" as "~id" FROM transactions UNION ALL SELECT "nameDest" as "~id" FROM transactions);"""
EDGES = """SELECT "nameOrig" as "~from", "nameDest" as "~to", "type" AS "~label", "amount" AS "amount:Float", "isFraud" AS "isFraud:Int"FROM transactions;"""
# Import, run Louvain, export back to Icebergawait session.import_from_table(graph, s3_import_path, [NODES, EDGES], catalog=catalog, database=database)import networkx as nx
# Build a small social networkG = nx.DiGraph()G.add_edges_from([ ("Alice", "Bob"), ("Alice", "Carol"), ("Bob", "Carol"), ("Carol", "Dave"), ("Dave", "Alice"),])
# Run PageRank on Neptune Analyticsscores = nx.pagerank(G, backend="neptune")
for name, score in sorted(scores.items(), key=lambda x: x[1], reverse=True): print(f"{name}: {score:.4f}")