
Neo4j Snowflake Graph Analytics Skill
- 312 installs
- 101 repo stars
- Updated August 3, 2026
- neo4j-contrib/neo4j-skills
Neo4j Snowflake Graph Analytics Skill is an agent skill that helps you install Neo4j Graph Analytics on Snowflake and write SQL to run graph algorithms on warehouse tables.
About
Neo4j Snowflake Graph Analytics Skill teaches agents to use Neo4j Graph Analytics for Snowflake—a Native Application that exposes graph algorithms as SQL procedures on warehouse tables. Solo builders and small data teams install it when they need PageRank, Louvain, Dijkstra, node similarity, and related workloads without exporting data to a separate graph cluster. The skill walks through marketplace setup, privilege grants, compute pool sizing, projection definitions, and the repeatable project-compute-write workflow. It also helps pick algorithms for fraud detection, recommendations, and entity resolution, chain multi-step jobs, and fix projection or permission failures. Expect intermediate Snowflake and SQL fluency; outputs are runnable SQL and configuration patterns aligned with Neo4j’s current Snowflake documentation.
- Covers Snowflake Marketplace install and required roles or privileges
- Documents the project → compute → write pattern for every algorithm job
- SQL syntax and projection config for node tables, relationships, and orientation
- Algorithm catalog spans community detection, centrality, pathfinding, similarity, and embeddings
- Guidance on chaining algorithms, views for column mismatches, and common error troubleshooting
Neo4j Snowflake Graph Analytics Skill by the numbers
- 312 all-time installs (skills.sh)
- +25 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #174 of 911 Databases skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/neo4j-contrib/neo4j-skills --skill neo4j-snowflake-graph-analytics-skillAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 312 |
|---|---|
| repo stars | ★ 101 |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 3, 2026 |
| Repository | neo4j-contrib/neo4j-skills ↗ |
What it does
Run Neo4j graph algorithms inside Snowflake SQL for fraud, recommendations, and entity resolution without leaving the warehouse.
Who is it for?
Best when you're adding fraud, recommendation, or entity-resolution graph jobs directly in Snowflake with marketplace-native Neo4j Graph Analytics.
Skip if: Skip if you only need casual BI aggregates in SQL with no graph structure, or those without Snowflake Native Apps and compute pools.
When should I use this skill?
Writing SQL for graph algorithms on Snowflake, first-time Neo4j Graph Analytics setup, picking algorithms for business problems, sizing compute pools, or fixing privilege and projection errors.
What you get
You get correct install steps, privilege setup, projection configs, and SQL for chosen algorithms following the project → compute → write pattern.
- Marketplace install and privilege checklist
- Projection and algorithm SQL using project → compute → write
- Chained multi-algorithm job patterns and troubleshooting notes
By the numbers
- Five algorithm families: community detection, centrality, pathfinding, similarity, and node embeddings
- Standard job flow: project → compute → write
- Covers WCC, Louvain, Leiden, PageRank, Dijkstra, node similarity, KNN, and related variants
Files
Snowflake Native App — graph algorithm power inside Snowflake. Data stays in Snowflake; project into a graph, run algorithms via SQL CALL, results written back to Snowflake tables.
Docs: https://neo4j.com/docs/snowflake-graph-analytics/current/
---
When to Use
- Running graph algorithms / GDS in Snowflake
- Data already lives in Snowflake tables
- On-demand / pipeline workloads — ephemeral sessions, pay per session-minute
- Full isolation from the live database during analytics
When NOT to Use
- Aura Pro with embedded GDS plugin →
neo4j-gds-skill - Aura Graph Analytics →
neo4j-aura-graph-analytics-skill - Self-managed Neo4j with embedded GDS plugin →
neo4j-gds-skill - Writing Cypher queries →
neo4j-cypher-skill
---
The End-to-End Flow
This is the flow that works. Don't jump straight to a CALL — most failures come from skipping the data-preparation step.
1. Explore the source data — inspect table DDLs to learn columns and types. 2. Prepare projection views — create node/relationship views that expose the required key columns and cast every property to a supported type (see the strict rules below). This is the step that matters most. 3. Project → Compute → Write — run the algorithm with a single CALL, assembling the project, compute, and write config. 4. Inspect & look up names — join numeric results back to the source table to get human-readable labels.
---
Step 1 — Explore the Source Data
Look at the table definitions before designing the graph:
SELECT GET_DDL('TABLE', 'MY_DATABASE.MY_SCHEMA.MY_TABLE');
-- or inspect columns/types:
SELECT COLUMN_NAME, DATA_TYPE
FROM MY_DATABASE.INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'MY_SCHEMA' AND TABLE_NAME = 'MY_TABLE';Decide which tables are nodes and which represent relationships (edges) between them.
---
Step 2 — Prepare Projection Views (the important part)
The graph engine is strict about column names and types. Snowflake views inherit the source column type by default, so you MUST add explicit CASTs — never SELECT col without one for a property column.
Create views that reshape your tables into the node/relationship format:
CREATE OR REPLACE VIEW MY_DATABASE.MY_SCHEMA.MY_NODES_VW AS
SELECT ... FROM MY_DATABASE.MY_SCHEMA.MY_TABLE;Node views
- Key column: expose the primary key as
NODEID. It must beBIGINTorSTRING. Always alias and cast explicitly:
SOURCE_COL::BIGINT AS NODEID or SOURCE_COL::STRING AS NODEID.
- Allowed node property types (exactly):
BIGINT,DOUBLE,ARRAY,VECTOR(FLOAT, n). Anything else must be cast to one of these or dropped. - Composite keys: concatenate parts with
'++'. - Naming:
<table>_NODES_VW.
Source-type → view-type casting rules
Apply these when projecting columns from your tables (keep the original column name unless renaming):
| Source type | Action |
|---|---|
Whole-number numerics (INT, INTEGER, BIGINT, SMALLINT, TINYINT, BYTEINT, NUMBER(p,0)) | CAST(col AS BIGINT) AS col |
Fractional numerics (FLOAT, DOUBLE, REAL, DECIMAL(p,s>0), NUMBER(p,s>0)) | CAST(col AS DOUBLE) AS col |
ARRAY of numbers | keep as ARRAY (except GraphSAGE — see below). Not allowed on relationship views. |
VECTOR(FLOAT, n) | keep as-is. Not allowed on relationship views. |
BOOLEAN | drop by default. Opt-in only: IFF(col, 1, 0)::BIGINT AS col |
DATE, TIME, TIMESTAMP* | drop by default. Opt-in only: DATE_PART('EPOCH_SECOND', col)::BIGINT AS col (tell the user the unit) |
VARCHAR, CHAR, TEXT, STRING | drop — can't be a graph property. To read results by name, join output back to the source table on the key (see Step 4) |
VARIANT, OBJECT, GEOGRAPHY, GEOMETRY, BINARY | drop — not supported as graph properties |
Lowest-common-denominator policy: by default include only safe columns (numeric → BIGINT/DOUBLE, ARRAY, VECTOR). Booleans and time-like columns require explicit opt-in. When you drop columns, briefly tell the user which and why, so they can ask for them back.
Relationship views
- Key columns: expose
SOURCENODEIDandTARGETNODEID, cast with the same rules asNODEID
(SOURCE_COL::BIGINT AS SOURCENODEID, etc.). Every value must match an existing NODEID in a node view.
- Allowed relationship property types (narrower):
BIGINT,DOUBLE,INTonly. No `ARRAY`, no `VECTOR`. (The docs describe relationship properties asFLOAT; the engine accepts these whole/fractional numeric casts and treats them as weights — keep them numeric.) - Naming:
<table>_RELATIONSHIPS_VW.
Example node + relationship views:
CREATE OR REPLACE VIEW MY_DATABASE.MY_SCHEMA.USER_NODES_VW AS
SELECT user_id::BIGINT AS NODEID,
CAST(age AS BIGINT) AS age,
CAST(balance AS DOUBLE) AS balance
FROM MY_DATABASE.MY_SCHEMA.USERS;
CREATE OR REPLACE VIEW MY_DATABASE.MY_SCHEMA.TRANSFERS_RELATIONSHIPS_VW AS
SELECT from_user::BIGINT AS SOURCENODEID,
to_user::BIGINT AS TARGETNODEID,
CAST(amount AS DOUBLE) AS amount
FROM MY_DATABASE.MY_SCHEMA.TRANSFERS;The required logical column names arenodeId/sourceNodeId/targetNodeId— Snowflake folds unquoted identifiers to uppercase, soNODEIDetc. match. Casting explicitly is what matters.
---
Step 3 — Project → Compute → Write
Every run is a single CALL whose first argument is the compute pool and second is a JSON config with three parts. Note JSON uses single quotes in Snowflake SQL.
App name:Neo4j_Graph_Analyticsis only the default installation name. If the app was installed under a different name, replace it everywhere — in the procedure call (<APP>.graph.<algo>), theUSE DATABASE <APP>statement, and the privilege grants below. Check withSHOW APPLICATIONS;.
USE ROLE MY_CONSUMER_ROLE;
CALL Neo4j_Graph_Analytics.graph.wcc('CPU_X64_XS', {
'defaultTablePrefix': 'MY_DATABASE.MY_SCHEMA',
'project': {
'nodeTables': ['USER_NODES_VW'],
'relationshipTables': {
'TRANSFERS_RELATIONSHIPS_VW': {
'sourceTable': 'USER_NODES_VW',
'targetTable': 'USER_NODES_VW',
'orientation': 'NATURAL'
}
}
},
'compute': { 'consecutiveIds': true },
'write': [{
'nodeLabel': 'USER_NODES_VW',
'outputTable': 'result_wcc_user_communities'
}]
});
SELECT * FROM MY_DATABASE.MY_SCHEMA.result_wcc_user_communities;Config parts
- `defaultTablePrefix` — set to the database + schema where your views and output tables live (
DB.SCHEMA); lets you reference them by short name. - `project` —
nodeTables(array; each maps to a label) andrelationshipTables(map; each key maps to a type, withsourceTable/targetTable/orientation). - `compute` — algorithm parameters. Omit any parameter whose value would be null.
- `write` — a list of write targets.
nodeLabel(orsourceLabel/targetLabel) is the table/view name of the nodes being written. For relationship results userelationshipType.
Orientation
Set orientation per relationship table in relationshipTables:
NATURAL(default) — directed, source → target (as stored in the table).UNDIRECTED— treated as bidirectional (each relationship is included in both directions).REVERSE— direction flipped, target → source.
Choose based on the algorithm:
- `UNDIRECTED` — community detection that treats edges symmetrically: WCC, Louvain, Leiden, Label Propagation. Triangle Count requires `UNDIRECTED`.
- `NATURAL` — directed-flow and ranking: PageRank, Article Rank, Dijkstra and the other pathfinding algorithms, Max Flow. Node Similarity expects a bipartite graph (two disjoint node sets) projected
NATURAL; useREVERSEto compare the other node set instead. - KNN ignores relationships entirely — similarity comes from node properties, so orientation has no effect on it (and K-Means likewise uses only node properties).
Compute pools (first CALL argument)
| Pool | Use |
|---|---|
CPU_X64_XS | Default — dev / small graphs |
CPU_X64_S/M/L | Progressively larger |
HIGHMEM_X64_S/M/L | Large graphs, lower CPU need |
GPU_NV_XS, GPU_NV_S, GPU_GCP_NV_L4_1_24G | GraphSAGE / GPU work (availability varies by region) |
Prefer CPU_X64_XS unless the user asks otherwise or GraphSAGE makes a GPU pool appropriate. See Estimating Jobs.
Result table naming
Name output tables result_<algotag>_<short_description>, underscores only, no spaces/special chars (e.g. result_louvain_customer_segments). When writing multiple node labels, use a distinct table per label.
---
Step 4 — Inspect & Look Up Names
What the algorithm produces depends on its type — check the algorithm's write config:
- Node-property results (centrality, community detection, k-means, embeddings, FastPath) — a table keyed by
NODEID. - Relationship results (Node Similarity, KNN, Dijkstra & other pathfinding, Max Flow) — a table keyed by
SOURCENODEID/TARGETNODEID. BFS and other heterogeneous writes also addSOURCELABEL/TARGETLABEL, with the node IDs stored as strings. - A model (GraphSAGE training) — no output table; it writes to the model catalog. Use the model later for prediction, which then produces a node-property table.
VARCHAR labels were dropped during projection, so join the result back to the source table on the key column(s) to get readable names. For node-property results, join on NODEID:
SELECT u.name, u.country, r.score
FROM MY_DATABASE.MY_SCHEMA.result_page_rank_influence r
JOIN MY_DATABASE.MY_SCHEMA.USERS u
ON r.NODEID = u.user_id
ORDER BY r.score DESC
LIMIT 10;For relationship results, join the source table twice — once on SOURCENODEID and once on TARGETNODEID.
---
Available Algorithms
Procedure = Neo4j_Graph_Analytics.graph.<name>. Names below are exact.
For complete algorithm compute/write parameter reference, see references/algorithms.md.
Community Detection
| Algorithm | Procedure | Use case |
|---|---|---|
| Weakly Connected Components | wcc | Find disconnected subgraphs |
| Louvain | louvain | Community detection (modularity) |
| Leiden | leiden | Community detection, more stable than Louvain |
| Label Propagation | label_propagation | Fast community detection by label spreading |
| K-Means | kmeans | Cluster nodes by node properties |
| Triangle Count | triangle_count | Local clustering / dense subgraphs |
Centrality
| Algorithm | Procedure | Use case |
|---|---|---|
| PageRank | page_rank | Rank nodes by influence |
| Article Rank | article_rank | PageRank variant, discounts high-degree neighbours |
| Betweenness | betweenness | Find bridge nodes |
| Degree | degree | Count direct connections |
Pathfinding
| Algorithm | Procedure | Use case |
|---|---|---|
| Dijkstra Source-Target | dijkstra | Shortest path(s) from source to target(s) or pairs |
| Dijkstra Single-Source | dijkstra_single_source | Shortest paths from one node to all others |
| Delta-Stepping SSSP | delta_stepping | Parallel single-source shortest paths |
| Breadth First Search | bfs | BFS traversal from a source |
| Yen's K-Shortest Paths | yens | Top-K shortest loopless paths |
| Max Flow | max_flow | Maximum flow with capacities |
| Min-Cost Max Flow | max_flow_min_cost | Max flow minimising total cost |
| FastPath | fastpath | Fast approximate shortest paths |
Similarity
| Algorithm | Procedure | Use case |
|---|---|---|
| Node Similarity | node_similarity | Similar nodes by shared neighbours |
| Filtered Node Similarity | node_similarity_filtered | Node similarity with source/target filters |
| KNN | knn | K most similar nodes |
| Filtered KNN | knn_filtered | KNN with source/target filters |
Node Embeddings
| Algorithm | Procedure | Use case |
|---|---|---|
| FastRP | fast_rp | Fast node embeddings |
| Node2Vec | node2vec | Random-walk node embeddings |
| HashGNN | hashgnn | GNN-inspired embeddings without training |
GraphSAGE (Graph ML)
| Algorithm | Procedure | Use case |
|---|---|---|
| Node Classification — train | gs_nc_train | Train supervised node-label model |
| Node Classification — predict | gs_nc_predict | Predict labels with a trained model |
| Unsupervised embeddings — train | gs_unsup_train | Train unsupervised embedding model |
| Unsupervised embeddings — predict | gs_unsup_predict | Infer embeddings with a trained model |
Model catalog (GraphSAGE)
show_models, model_exists, drop_model.
---
Algorithm-Specific Notes
GraphSAGE
- Projected node tables used by GraphSAGE must not contain
ARRAYproperty columns — useVECTOR(FLOAT, n)for multi-valued numeric features. (ARRAYis fine for non-GraphSAGE algorithms.) - Feature columns must be non-NULL and finite — filter, impute, or exclude nullable feature columns in the view. For
gs_nc_train, thetargetPropertyis a label (not a feature) and may be NULL. - Before running, list the node properties GraphSAGE will use per node table: all non-
NODEIDcolumns; forgs_nc_trainexclude thetargetProperty. - Training (
gs_nc_train,gs_unsup_train) can be slow and may use a GPU pool (GPU_NV_S). Show the exactCALLand get explicit confirmation before running training.
Dijkstra Source-Target (dijkstra)
Provide one of:
- single pair:
sourceNode+sourceNodeTable,targetNode+targetNodeTable; - one source, many targets:
sourceNode+sourceNodeTable,targetNodes(list) +targetNodesTable; - many pairs:
sourceTargetNodePairsTable(table withSOURCENODEID/TARGETNODEIDcolumns) +sourceNodeTable+targetNodeTable.
General
- Never use
NODEIDitself as an algorithm property. - Omit any config parameter whose value is null.
---
Installation
1. Install Neo4j Graph Analytics from the Snowflake Marketplace (default app name Neo4j_Graph_Analytics). 2. Enable Event sharing when prompted. 3. Data Products → Apps → Neo4j Graph Analytics → Privileges → Grant: grant CREATE COMPUTE POOL and CREATE WAREHOUSE, then click Activate.
---
Privilege Setup (run once per database/schema)
USE ROLE ACCOUNTADMIN;
-- Consumer role for app users
CREATE ROLE IF NOT EXISTS MY_CONSUMER_ROLE;
GRANT APPLICATION ROLE Neo4j_Graph_Analytics.app_user TO ROLE MY_CONSUMER_ROLE;
SET MY_USER = (SELECT CURRENT_USER());
GRANT ROLE MY_CONSUMER_ROLE TO USER IDENTIFIER($MY_USER);
-- Database role granting the app access to your data
USE DATABASE MY_DATABASE;
CREATE DATABASE ROLE IF NOT EXISTS MY_DB_ROLE;
GRANT USAGE ON DATABASE MY_DATABASE TO DATABASE ROLE MY_DB_ROLE;
GRANT USAGE ON SCHEMA MY_DATABASE.MY_SCHEMA TO DATABASE ROLE MY_DB_ROLE;
GRANT SELECT ON ALL TABLES IN SCHEMA MY_DATABASE.MY_SCHEMA TO DATABASE ROLE MY_DB_ROLE;
GRANT SELECT ON ALL VIEWS IN SCHEMA MY_DATABASE.MY_SCHEMA TO DATABASE ROLE MY_DB_ROLE;
-- FUTURE grants let the app read tables/views it creates (needed for chaining)
GRANT SELECT ON FUTURE TABLES IN SCHEMA MY_DATABASE.MY_SCHEMA TO DATABASE ROLE MY_DB_ROLE;
GRANT SELECT ON FUTURE VIEWS IN SCHEMA MY_DATABASE.MY_SCHEMA TO DATABASE ROLE MY_DB_ROLE;
GRANT CREATE TABLE ON SCHEMA MY_DATABASE.MY_SCHEMA TO DATABASE ROLE MY_DB_ROLE;
GRANT DATABASE ROLE MY_DB_ROLE TO APPLICATION Neo4j_Graph_Analytics;
-- Let the consumer role read output tables
GRANT USAGE ON DATABASE MY_DATABASE TO ROLE MY_CONSUMER_ROLE;
GRANT USAGE ON SCHEMA MY_DATABASE.MY_SCHEMA TO ROLE MY_CONSUMER_ROLE;
GRANT SELECT ON FUTURE TABLES IN SCHEMA MY_DATABASE.MY_SCHEMA TO ROLE MY_CONSUMER_ROLE;
USE ROLE MY_CONSUMER_ROLE; -- run algorithms as the consumer roleReplaceMY_DATABASE,MY_SCHEMA,MY_CONSUMER_ROLE,MY_DB_ROLEwith your names throughout.
---
Common Patterns
Chaining algorithms
Because results write to tables (and the FUTURE TABLES grant lets the app read what it creates), feed one algorithm's output into the next:
-- 1. Embeddings
CALL Neo4j_Graph_Analytics.graph.fast_rp('CPU_X64_XS', { ... });
-- 2. KNN over the embedding output table (projected as a node view)
CALL Neo4j_Graph_Analytics.graph.knn('CPU_X64_XS', { ... });Convert categorical data to numeric
The graph engine can't use VARCHAR as a property. Map categories to numbers in the view (e.g. CASE / a lookup join). To read results by their original label, join the output table back to the source table on the key.
---
Troubleshooting
| Problem | Solution |
|---|---|
Insufficient privileges | App needs SELECT on your tables/views and CREATE TABLE on the schema (see Privilege Setup) |
Column nodeId not found | View is missing/mis-cast the key — expose NODEID (and SOURCENODEID/TARGETNODEID) with explicit casts |
| Type / projection error on a property | A property column wasn't cast to a supported type — apply the casting rules; relationship props must be BIGINT/DOUBLE/INT |
| GraphSAGE fails on features | Remove ARRAY feature columns (use VECTOR), and ensure features are non-NULL/finite |
Compute pool not available | Pool may still be starting; wait a minute and retry |
| Algorithm returns no results | Check node/relationship views aren't empty and that every SOURCENODEID/TARGETNODEID matches a NODEID |
Full guide: https://neo4j.com/docs/snowflake-graph-analytics/current/troubleshooting/
---
Further Reading
- Getting Started
- Running Jobs · Scaling Out · Estimating Jobs
- All Algorithms
- Administration
- Integration with Cortex Agent
- Basket Analysis Example on TPC-H Data
---
Checklist
- [ ] App installed; privileges granted on the database/schema
- [ ] Views expose
NODEID/SOURCENODEID/TARGETNODEID, every property explicitly cast - [ ]
orientationmatches the algorithm - [ ] Single
CALLran without error; output table populated - [ ] Results joined back to source table for readable labels
Neo4j Graph Analytics for Snowflake Skill
An Agent Skill that helps AI agents work with Neo4j Graph Analytics for Snowflake — a Snowflake Native Application that brings graph algorithms directly into Snowflake via SQL procedures.
What this skill covers
- Installing Neo4j Graph Analytics from the Snowflake Marketplace
- Setting up the required privileges and roles
- The end-to-end flow: explore → prepare projection views → project-compute-write → inspect
- The strict view/column type rules the graph engine requires (key columns, supported property types, casting)
- Exact SQL
CALLsyntax for all available graph algorithms - Projection configuration (node tables, relationship tables, orientation)
- Looking up human-readable names by joining results back to source tables
- Chaining algorithms together
- Troubleshooting common errors
Use this skill when
- Writing SQL to run graph algorithms on Snowflake tables
- Preparing source tables into graph-ready projection views
- Setting up Neo4j Graph Analytics for the first time
- Choosing the right algorithm for a business problem (fraud detection, recommendations, entity resolution, etc.)
- Configuring compute pool sizes for jobs
- Troubleshooting privilege, projection, or column-type errors
Installation
Cortex Code Desktop
This skill is built for Cortex Code. Add it from GitHub:
1. Open Agent Settings → Skills. 2. In the GitHub Skills section, click `+` (_Add from GitHub_). 3. Enter the skill's path in this repo:
https://github.com/neo4j-contrib/neo4j-skills/tree/main/neo4j-snowflake-graph-analytics-skill4. Click Add.
You can also add it as a Local skill (point _Add Local Skill_ at a folder containing this skill directory, saved to ~/.snowflake/cortex/skills.json) or from a Snowflake Stage (@DATABASE.SCHEMA.STAGE/...).
Once added, Cortex Code invokes the skill automatically when your prompt matches its description, or you can trigger it explicitly by typing / in the chat and selecting it. Skills are folders with a SKILL.md (plus optional references/), which is exactly this directory's layout.
Cortex Code CLI
Use the `/skill add` command (or the cortex skill add equivalent) — from a Git repo, a local folder, or a Snowflake stage:
Alternatively, drop the skill folder into a skills directory the CLI scans — project scope .cortex/skills/ (or .claude/skills/) or user scope ~/.snowflake/cortex/skills/.
Verify with /skill list. Invoke automatically by matching prompt, or explicitly with $neo4j-snowflake-graph-analytics-skill in the conversation.
Other agents
This skill also ships in the **neo4j-skills** bundle for other agents. Quickest, cross-agent:
npx skills add https://github.com/neo4j-contrib/neo4j-skills- Claude Code —
/plugin marketplace add https://github.com/neo4j-contrib/neo4j-skills.gitthen/plugin install neo4j-skills@neo4j-skills-marketplace - Gemini CLI —
gemini extensions install https://github.com/neo4j-contrib/neo4j-skills
See the root README for full per-agent instructions.
Note: this installs the agent skill (guidance for the AI). The Neo4j Graph Analytics Snowflake Native App itself is installed separately from the Snowflake Marketplace — see SKILL.md for that setup.Available algorithms
Procedure = Neo4j_Graph_Analytics.graph.<name>.
| Category | Algorithms (procedure name) |
|---|---|
| Community Detection | WCC (wcc), Louvain (louvain), Leiden (leiden), Label Propagation (label_propagation), K-Means (kmeans), Triangle Count (triangle_count) |
| Centrality | PageRank (page_rank), Article Rank (article_rank), Betweenness (betweenness), Degree (degree) |
| Pathfinding | Dijkstra (dijkstra, dijkstra_single_source), Delta-Stepping (delta_stepping), BFS (bfs), Yen's (yens), Max Flow (max_flow, max_flow_min_cost), FastPath (fastpath) |
| Similarity | Node Similarity (node_similarity, node_similarity_filtered), KNN (knn, knn_filtered) |
| Node Embeddings | FastRP (fast_rp), Node2Vec (node2vec), HashGNN (hashgnn) |
| Graph ML (GraphSAGE) | Node classification (gs_nc_train, gs_nc_predict), Unsupervised embeddings (gs_unsup_train, gs_unsup_predict) |
Quick example
CALL Neo4j_Graph_Analytics.graph.wcc('CPU_X64_XS', {
'defaultTablePrefix': 'MY_DB.MY_SCHEMA',
'project': {
'nodeTables': ['NODES_VW'],
'relationshipTables': {
'RELATIONSHIPS_VW': {
'sourceTable': 'NODES_VW',
'targetTable': 'NODES_VW',
'orientation': 'NATURAL'
}
}
},
'compute': { 'consecutiveIds': true },
'write': [{
'nodeLabel': 'NODES_VW',
'outputTable': 'result_wcc_components'
}]
});Don't call an algorithm against raw tables blindly — first create projection views that exposeNODEID/SOURCENODEID/TARGETNODEIDand cast every property to a supported type. SeeSKILL.mdfor the full rules.
Resources
Algorithm Parameter Reference
Compute and write configuration for all Neo4j Graph Analytics for Snowflake algorithms. Every algorithm shares the same project config structure (see SKILL.md). Only algorithm-specific compute and write parameters listed here.
---
Community Detection
WCC (wcc)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'component' | Node property written back |
relationshipWeightProperty | String | null | Relationship property for weights |
seedProperty | String | null | Initial component assignment (numeric) |
threshold | Float | null | Only traverse rels with weight > threshold |
consecutiveIds | Boolean | false | Map component IDs to consecutive integers |
Write: nodeLabel, nodeProperty (default 'component'), outputTable
---
Louvain (louvain)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'community' | Node property written back |
relationshipWeightProperty | String | null | Relationship property for weights |
seedProperty | String | null | Initial community assignment (non-negative) |
maxLevels | Integer | 10 | Max hierarchical clustering levels |
maxIterations | Integer | 10 | Max modularity optimization iterations per level |
tolerance | Float | 0.0001 | Min modularity change to continue |
includeIntermediateCommunities | Boolean | false | Write intermediate community assignments |
consecutiveIds | Boolean | false | Map to consecutive IDs (incompatible with includeIntermediateCommunities) |
Write: nodeLabel, nodeProperty (default 'community'), outputTable
---
Leiden (leiden)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'community' | Node property written back |
relationshipWeightProperty | String | null | Relationship property for weights |
seedProperty | String | null | Initial community (non-negative) |
maxLevels | Integer | 10 | Max hierarchical levels |
tolerance | Float | 0.0001 | Min modularity change to continue |
includeIntermediateCommunities | Boolean | false | Write intermediate communities |
gamma | Float | 1.0 | Resolution parameter — higher → more communities |
theta | Float | 0.01 | Randomness when splitting communities |
Write: nodeLabel, nodeProperty (default 'community'), outputTable
---
Label Propagation (label_propagation)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'community' | Node property written back |
nodeWeightProperty | String | null | Node property for node weights |
relationshipWeightProperty | String | null | Relationship property for weights |
seedProperty | String | null | Initial community (non-negative) |
maxIterations | Integer | 10 | Max iterations |
Write: nodeLabel, nodeProperty (default 'community'), outputTable
---
K-Means (kmeans)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'community' | Node property written back |
nodeProperty | String | required | Numeric array property to cluster on |
k | Integer | 10 | Number of clusters |
maxIterations | Integer | 10 | Max iterations |
deltaThreshold | Float | 0.05 | Convergence threshold (% change) |
numberOfRestarts | Integer | 1 | Runs with different initializations; keeps best |
randomSeed | Integer | — | Seed for reproducibility |
computeSilhouette | Boolean | false | Compute silhouette score (adds overhead) |
seedCentroids | List | — | Initial centroids; k must match list length |
Write: nodeLabel, nodeProperty (default 'community'), outputTable
---
Triangle Count (triangle_count)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'triangles' | Node property written back |
relationshipWeightProperty | String | null | Relationship property for weights |
maxDegree | Integer | 2^63-1 | Max degree to consider (higher → excluded, assigned -1) |
labelFilter | List of String | [] | Up to 3 node labels; only count triangles with these |
Write: nodeLabel, nodeProperty (default 'triangles'), outputTable
Note: Only finds triangles in undirected graphs — project relationships with UNDIRECTED orientation.
---
Centrality
PageRank (page_rank)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'pageRank' | Node property written back |
dampingFactor | Float | 0.85 | Probability of following a link; must be in [0, 1) |
maxIterations | Integer | 20 | Max iterations |
tolerance | Float | 1e-7 | Convergence threshold |
relationshipWeightProperty | String | null | Relationship property for weights |
sourceNodes | List | [] | Nodes/IDs for Personalized PageRank; supports [[id, bias], ...] |
sourceNodesTable | String | null | Table containing source nodes (required when sourceNodes specified) |
scaler | String or Map | None | Score normalization: MinMax, Max, Mean, Log, StdScore, L1Norm, L2Norm |
Write: nodeLabel, nodeProperty (default 'pageRank'), outputTable
---
Article Rank (article_rank)
Compute: Same parameters as PageRank but with resultProperty default 'articleRank'.
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'articleRank' | Node property written back |
dampingFactor | Float | 0.85 | Must be in [0, 1) |
maxIterations | Integer | 20 | Max iterations |
tolerance | Float | 1e-7 | Convergence threshold |
relationshipWeightProperty | String | null | Relationship property for weights |
sourceNodes | List | [] | For Personalized Article Rank |
sourceNodesTable | String | null | Required when sourceNodes specified |
scaler | String or Map | None | Score normalization |
Write: nodeLabel, nodeProperty (default 'articleRank'), outputTable
---
Betweenness Centrality (betweenness)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'betweenness' | Node property written back |
samplingSize | Integer | node count | Number of source nodes to sample |
samplingSeed | Integer | null | Seed for random source selection |
relationshipWeightProperty | String | null | Relationship property for weights |
Write: nodeLabel, nodeProperty (default 'betweenness'), outputTable
---
Degree Centrality (degree)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'degree' | Node property written back |
relationshipWeightProperty | String | null | Relationship property for weights |
orientation | String | 'NATURAL' | NATURAL, REVERSE, or UNDIRECTED |
Write: nodeLabel, nodeProperty (default 'degree'), outputTable
---
Pathfinding
Dijkstra Source-Target (dijkstra)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNode | Integer/String | required^1^ | Source node identifier |
sourceNodeTable | String | required^1^ | Table for mapping source node |
targetNode | Integer/String | required^1^ | Target node identifier |
targetNodeTable | String | required^1^ | Table for mapping target node |
targetNodes | List | required^1^ | Multiple target node IDs |
targetNodesTable | String | required^1^ | Table for mapping target nodes |
sourceTargetNodePairsTable | String | required^1^ | Table with SOURCENODEID/TARGETNODEID columns |
resultProperty | String | 'total_cost' | Relationship property written back |
resultRelationshipType | String | 'PATH' | Relationship type written back |
relationshipWeightProperty | String | null | Relationship property for weights |
^1^ Specify one of: (a) sourceNode+sourceNodeTable+targetNode+targetNodeTable, (b) sourceNode+sourceNodeTable+targetNodes+targetNodesTable, or (c) sourceTargetNodePairsTable+sourceNodeTable+targetNodeTable.
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'PATH'), relationshipProperty (default 'total_cost')
---
Dijkstra Single-Source (dijkstra_single_source)
Shortest paths from one source node to all reachable nodes.
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNode | Integer/String | required | Source node identifier |
sourceNodeTable | String | required | Table for mapping the source node |
resultProperty | String | 'total_cost' | Relationship property written back |
resultRelationshipType | String | 'PATH' | Relationship type written back |
relationshipWeightProperty | String | null | Relationship property for weights (unweighted if unset) |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'PATH'), relationshipProperty (default 'total_cost')
---
Delta-Stepping SSSP (delta_stepping)
Parallel single-source shortest paths (positive weights only).
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNode | Integer/String | required | Source node identifier |
sourceNodeTable | String | required | Table for mapping the source node |
delta | Float | 2.0 | Bucket width grouping nodes by tentative distance. Small (~2) for power-law graphs; large (~10000) for high-diameter graphs (e.g. transport) |
resultProperty | String | 'total_cost' | Relationship property written back |
resultRelationshipType | String | 'PATH' | Relationship type written back |
relationshipWeightProperty | String | null | Relationship property for weights |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'PATH'), relationshipProperty (default 'total_cost')
Note: With multiple shortest paths of equal cost, the returned path may differ between runs.
---
Breadth First Search (bfs)
Traversal from a source node, optionally stopping at target nodes.
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNode | Integer/String | required | Node where traversal starts |
sourceNodeTable | String | required | Node table containing sourceNode in its NODEID |
targetNodes | List | [] | Target node IDs; traversal stops when any is reached |
targetNodesTable | String | null | Node table containing targetNodes (optional if targetNodes empty) |
maxDepth | Integer | -1 | Max distance from source to visit; -1 = unbounded |
resultRelationshipType | String | 'NEXT' | Relationship type written back |
Write: outputTable, relationshipType (default 'NEXT')
Note: Output is written in heterogeneous form — the table has SOURCENODEID, TARGETNODEID, SOURCELABEL, TARGETLABEL (node IDs as strings). Each row is one link source → target of consecutive nodes on the BFS path; row order does not necessarily match visitation order, and links may include back-tracking jumps that aren't original relationships.
---
Yen's K-Shortest Paths (yens)
Top-K shortest loopless paths between a source and target node.
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNode | Integer/String | required | Source node identifier |
sourceNodeTable | String | required | Table for mapping the source node |
targetNode | Integer/String | required | Target node identifier |
targetNodeTable | String | required | Table for mapping the target node |
k | Integer | required | Number of shortest paths to compute |
resultProperty | String | 'total_cost' | Relationship property written back |
resultRelationshipType | String | 'PATH' | Relationship type written back |
relationshipWeightProperty | String | null | Relationship property for weights |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'PATH'), relationshipProperty (default 'total_cost')
Note: With k=1 behaves like Dijkstra Source-Target. Respects parallel relationships between the same node pair.
---
Max Flow (max_flow)
Maximum flow from source(s) to target(s) under relationship capacities.
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNodes | List/String/Integer | required | Source node(s) flow originates from |
sourceNodesTable | String | required | Table containing the source nodes |
targetNodes | List/String/Integer | required | Target node(s) flow is deposited to |
targetNodesTable | String | required | Table for mapping the target nodes |
capacityProperty | String | required | Relationship property to use as capacity |
nodeCapacityProperty | String | null | Node property limiting total flow through a node (omit for unrestricted nodes) |
resultProperty | String | 'flow' | Relationship property written back |
resultRelationshipType | String | 'FLOW_RELATIONSHIP' | Relationship type written back |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'FLOW_RELATIONSHIP'), relationshipProperty (default 'flow')
---
Min-Cost Max Flow (max_flow_min_cost)
Maximum flow that minimises total cost. Same parameters as Max Flow plus cost.
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNodes | List/String/Integer | required | Source node(s) |
sourceNodesTable | String | required | Table containing the source nodes |
targetNodes | List/String/Integer | required | Target node(s) |
targetNodesTable | String | required | Table for mapping the target nodes |
capacityProperty | String | required | Relationship property to use as capacity |
costProperty | String | required | Relationship property to use as per-unit cost |
nodeCapacityProperty | String | null | Node property limiting total flow through a node |
alpha | Integer | 6 | Cost-scaling rate in the refinement phase; tuning can improve speed |
resultProperty | String | 'flow' | Relationship property written back |
resultRelationshipType | String | 'FLOW_RELATIONSHIP' | Relationship type written back |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'FLOW_RELATIONSHIP'), relationshipProperty (default 'flow')
Note: Optimal solution guaranteed for integer costs/capacities; also runs with double values within the same bounds.
---
FastPath (fastpath)
Temporal node embeddings over base nodes and their related events. Produces a VECTOR embedding per base node.
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
baseNodeLabel | String | required | Node label for which embeddings are produced |
eventNodeLabel | String | required | Node label of events related to base nodes |
contextNodeLabel | String | None | Node label of context nodes describing events |
timeNodeProperty | String | None | Node property representing time on event nodes (int or float) |
nextRelationshipType | String | None | Relationship type between event nodes indicating event order |
firstRelationshipType | String | None | Relationship type from base node to its first event |
eventFeatures | String | None | Node property on event nodes holding numerical features (vector form) |
categoricalEventProperties | List of String | None | Event node properties holding categorical value(s) |
ignoredEventCategory | Integer | -1 | Category value treated as missing and ignored |
outputTime | Float | None | Timestamp at which embeddings are produced; events at/after this are not processed |
outputTimeProperty | String | None | Base-node property giving a per-node output timestamp |
numElapsedTimes | Integer | required | Number of times in the elapsed-time grid; 1 means event timestamps have no effect |
decayFactor | Float | 1.0 | Speed of decay of influence of older events |
maxElapsedTime | Integer | required | Max age of events (relative to output time) considered |
smoothingWindow | Integer | 0 | Aggregate event embeddings over up to 2*smoothingWindow + 1 grid times |
smoothingRate | Float | 0.0 | How fast expected event similarity decays with time-distance |
dimension | Integer | required | Output embedding dimension |
randomSeed | Integer | random | Seed for all randomness |
resultProperty | String | 'embedding' | Node property written back |
Write: nodeLabel, outputTable
Note: Two supported schemas — path-based (firstRelationshipType + nextRelationshipType) or direct base→event relationships. Equivariant over time (shifting all events and output time by a constant leaves embeddings unchanged).
---
Similarity
Node Similarity (node_similarity)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'similarity' | Relationship property written back |
resultRelationshipType | String | 'SIMILAR_TO' | Relationship type written back |
similarityCutoff | Float | 1e-42 | Min similarity score to include (0–1) |
degreeCutoff | Integer | 1 | Min node degree to be compared |
upperDegreeCutoff | Integer | 2147483647 | Max node degree to be compared |
topK | Integer | 10 | K most similar per node |
bottomK | Integer | 10 | K least similar per node |
topN | Integer | 0 | Global N most similar total (0 = no limit) |
bottomN | Integer | 0 | Global N least similar total (0 = no limit) |
relationshipWeightProperty | String | null | Relationship property for weights |
similarityMetric | String | 'JACCARD' | JACCARD, OVERLAP, or COSINE |
useComponents | Boolean/String | false | Use components to skip cross-component comparisons |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'SIMILAR_TO'), relationshipProperty (default 'similarity')
Note: Input must be bipartite — two node sets connected by relationships. Use NATURAL orientation so algorithm knows source vs target side.
---
Filtered Node Similarity (node_similarity_filtered)
Node Similarity restricted to chosen source/target nodes. All node_similarity compute parameters apply, plus the filters below.
Additional compute parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNodeFilter | String/List | null | Node label, list of labels, single node ID, or list of IDs to use as sources |
sourceNodeTable | String | null | Table for mapping source node IDs (required when filtering by ID) |
targetNodeFilter | String/List | null | Node label, list of labels, single node ID, or list of IDs to use as targets |
targetNodeTable | String | null | Table for mapping target node IDs (required when filtering by ID) |
Write: same as Node Similarity (sourceLabel, targetLabel, outputTable, relationshipType default 'SIMILAR_TO', relationshipProperty default 'similarity')
---
KNN (knn)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'similarity' | Relationship property written back |
resultRelationshipType | String | 'SIMILAR_TO' | Relationship type written back |
nodeProperties | String/Map/List | required | Node properties + metrics for similarity |
topK | Integer | 10 | Neighbors per node |
sampleRate | Float | 0.5 | Comparison sampling rate (0, 1] |
deltaThreshold | Float | 0.001 | Early stopping threshold (% updates) |
maxIterations | Integer | 100 | Hard iteration limit |
randomJoins | Integer | 10 | Random connection attempts per node per iteration |
initialSampler | String | 'uniform' | uniform or randomWalk |
randomSeed | Integer | — | Seed (requires concurrency=1) |
similarityCutoff | Float | 0 | Min similarity to include |
perturbationRate | Float | 0 | Probability of replacing equal-similarity neighbor |
Available metrics by property type:
| Property type | Metrics |
|---|---|
| List of Integer | JACCARD, OVERLAP |
| List of Float | COSINE, EUCLIDEAN, PEARSON |
| Scalar number | default only (inverse absolute difference) |
Write: sourceLabel, targetLabel, outputTable, relationshipType (default 'SIMILAR_TO'), relationshipProperty (default 'similarity')
---
Filtered KNN (knn_filtered)
KNN restricted to chosen source/target nodes. All knn compute parameters apply (including the nodeProperties metrics-by-type table), plus the filters below.
Additional compute parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceNodeFilter | String/List | — | Node label or list of node IDs to use as sources |
sourceNodeTable | String | — | Fully-qualified table for source node ID filtering |
targetNodeFilter | String/List | — | Node label or list of node IDs to use as targets |
targetNodeTable | String | — | Fully-qualified table for target node ID filtering |
seedTargetNodes | Boolean | false | Guarantee topK results per source by seeding; overrides similarityCutoff |
Write: same as KNN (sourceLabel, targetLabel, outputTable, relationshipType default 'SIMILAR_TO', relationshipProperty default 'similarity')
---
Node Embeddings
FastRP (fast_rp)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
resultProperty | String | 'fast_rp' | Node property written back |
embeddingDimension | Integer | required | Dimension of output embeddings (min 1) |
iterationWeights | List of Float | [0.0, 1.0, 1.0] | Weight per iteration; list length = number of iterations |
nodeSelfInfluence | Float | 0.0 | How much a node's initial vector influences its own embedding |
normalizationStrength | Float | 0.0 | Degree-based scaling of initial vectors |
propertyRatio | Float | 0.0 | Ratio of embedding for property features (needs featureProperties) |
featureProperties | List of String | [] | Node properties as input features (Float or List of Float) |
relationshipWeightProperty | String | null | Relationship property for weights |
randomSeed | Integer | — | Seed for reproducibility |
Requires either non-empty iterationWeights or non-zero nodeSelfInfluence.
Write: nodeLabel, nodeProperty (default 'fast_rp'), outputTable
---
Node2Vec (node2vec)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
embeddingDimension | Integer | 128 | Size of output embeddings |
walkLength | Integer | 80 | Steps per random walk |
walksPerNode | Integer | 10 | Random walks per node |
inOutFactor | Float | 1.0 | Higher → stay local |
returnFactor | Float | 1.0 | Below 1.0 → higher return tendency |
relationshipWeightProperty | String | null | Relationship property for walk probabilities (≥0) |
windowSize | Integer | 10 | Context window for neural network training |
negativeSamplingRate | Integer | 5 | Negative samples per positive sample |
positiveSamplingFactor | Float | 0.001 | Down-sample frequent nodes |
negativeSamplingExponent | Float | 0.75 | Exponent for negative sampling distribution |
embeddingInitializer | String | 'NORMALIZED' | NORMALIZED or UNIFORM |
iterations | Integer | 1 | Training iterations |
initialLearningRate | Float | 0.01 | Starting learning rate |
minLearningRate | Float | 0.0001 | Learning rate floor |
randomSeed | Integer | — | Seed for walks (embeddings still nondeterministic) |
walkBufferSize | Integer | 1000 | Walks to complete before training starts |
Write: nodeLabel, nodeProperty (default 'node2vec'), outputTable
---
HashGNN (hashgnn)
Compute:
| Parameter | Type | Default | Description |
|---|---|---|---|
featureProperties | List of String | [] | Node properties as input (Float or List of Float) |
iterations | Integer | required | Number of hashing iterations (≥1) |
embeddingDensity | Integer | required | Features sampled per node per iteration (K in paper; ≥1) |
heterogeneous | Boolean | false | Distinguish relationship types |
neighborInfluence | Float | 1.0 | How often neighbors' features are sampled vs own (≥0) |
binarizeFeatures | Map | — | {dimension: N, threshold: T} for hyperplane rounding |
generateFeatures | Map | — | {dimension: N, densityLevel: D} — use when no featureProperties |
outputDimension | Integer | — | Dense projection of binary output |
randomSeed | Integer | — | Seed for reproducibility |
Write: nodeLabel, nodeProperty (default 'hashgnn'), outputTable
---
GraphSAGE (Graph ML)
GraphSAGE trains a model in one job, then uses it to predict in a later job. Training writes a model (no output table); prediction writes node properties. Training is slow and a GPU pool (GPU_NV_S) is strongly recommended unless the dataset is small and the model shallow. Feature columns come from the projected node tables (all non-NODEID columns; for gs_nc_train, excluding targetProperty) and must be non-NULL and finite. Use VECTOR(FLOAT, n) rather than ARRAY for multi-valued features.
Shared training compute parameters (gs_nc_train, gs_unsup_train)
| Parameter | Type | Default | Description |
|---|---|---|---|
modelname | String | required | Unique name of the model to train |
numEpochs | Integer | required | Number of epochs to train |
numSamples | List of Integer | required | Neighbors to sample per layer; list length = number of layers |
hiddenChannels | Integer | 256 | Node embedding dimension of the layer outputs |
activation | String | "relu" | Activation function: "relu" or "sigmoid" |
aggregator | String | "mean" | Neighborhood aggregator: "mean" or "max" |
learningRate | Float | 0.001 | Optimizer learning rate |
dropout | Float | 0.1 | Dropout probability per layer; >= 0.0 and < 1.0 |
layerNormalization | Boolean | true | Apply layer normalization between layers |
epochsPerCheckpoint | Integer | max(numEpochs/10, 1) | Epochs between saving checkpoints |
randomSeed | Integer | random | Seed for all randomness |
Node Classification — train (gs_nc_train)
Shared parameters above, plus:
| Parameter | Type | Default | Description |
|---|---|---|---|
targetLabel | String | required | Node label to train predictions on |
targetProperty | String | required | Node property (column) to predict; NULL values mark unlabeled nodes (semi-supervised) |
splitRatios | Map | {'TRAIN':0.6,'TEST':0.2,'VALID':0.2} | Train/test/validation split; keys TRAIN/TEST/VALID, values sum to 1.0 |
epochsPerVal | Integer | 0 | Epochs between validation-set evaluation; 0 = never |
trainBatchSize | Integer | auto-inferred | Target nodes per training batch |
evalBatchSize | Integer | = trainBatchSize | Batch size for evaluation |
classWeights | Boolean or Map | false | Balance training by class weights; true derives from label distribution, or supply a per-class map |
Unsupervised embeddings — train (gs_unsup_train)
Shared parameters above, plus:
| Parameter | Type | Default | Description |
|---|---|---|---|
numWalks | Integer | 10 | Random walks per node |
walkDepth | Integer | 3 | Steps per random walk |
negSamplingRatio | Float | 1.0 | Ratio of negative to positive samples |
batchSize | Integer | auto-inferred | Target nodes per training batch |
lossReduction | String | auto | Loss reduction: "mean" or "sum" (defaults to "mean" if batchSize set, else "sum") |
Predict (gs_nc_predict, gs_unsup_predict)
Apply a trained model to a projected graph. Most settings are inherited from training, so only modelname is needed in compute.
| Parameter | Type | Default | Description |
|---|---|---|---|
modelname | String | required | Name of the trained model to use |
batchSize | Integer | inherited | Target nodes per prediction batch (defaults to the training eval batch size) |
randomSeed | Integer | random | Seed for all randomness |
Write: nodeLabel, outputTable
A GPU pool is recommended for large graphs or deep models, but a CPU pool may suffice otherwise.
Model catalog
| Procedure | Call | Purpose |
|---|---|---|
model_exists | CALL Neo4j_Graph_Analytics.graph.model_exists('<modelname>') | Check whether a model exists |
show_models | CALL Neo4j_Graph_Analytics.graph.show_models() | List models |
drop_model | CALL Neo4j_Graph_Analytics.graph.drop_model('<modelname>') | Delete a model |
Related skills
How it compares
Use instead of hand-rolled NetworkX or external Neo4j ETL when the source of truth already lives in Snowflake tables.
FAQ
Who is neo4j-snowflake-graph-analytics-skill for?
Data-minded developers and teams shipping analytics on Snowflake who want graph algorithms via SQL procedures rather than a separate graph ops stack.
When should I use neo4j-snowflake-graph-analytics-skill?
During Build integrations when first enabling the Native App, writing algorithm SQL, sizing compute pools, or debugging projection and privilege errors on Snowflake graph jobs.
Is neo4j-snowflake-graph-analytics-skill safe to install?
Treat it like any third-party agent skill: review the Security Audits panel on this Prism page and restrict Snowflake roles and secrets before letting an agent run marketplace installs or production SQL.