Skip to content

Updated examples with latest syntax and made some file reorganization #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

davidfauth
Copy link

Updated examples with latest syntax.
Changed references to GDS.
Updated executive example to reference Snowflake source data.
Updated basket-analysis to use Snowflake sample data.

davidfauth added 5 commits May 1, 2025 07:27
Updated the Patient-Journey and TPC-H examples.
Added in a WCC example.
Rename TPCH to Basket Analysis
Updated with permissions and set app name
Updated the patient journey example
Updated the wcc-business-executive to remove GDS and link to source data.
Addressed issues with the basket-analysis example to use the Snowflake sample data.
Copy link
Collaborator

@orazve orazve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes, I left some questions and comments to improve style and formatting

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. There are two basket analysis files basket-analysis/Basket_Analysis.ipynb and basket-analysis/basket-analysis-quickstart/Basket_Analysis.ipynb - which one is right?

  2. I see that you use staged data from Neo4j, is it easier to use data from snowflake like it is done here product-recommendation/product-recommendation.sql

  3. Do product-recommendation/product-recommendation.sql and basket-analysis duplicate each other?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the quickstart to make it easier.
Using staged data as an example

from p2p_demo.public.p2p_users_vw_lou
group by community
order by community_size desc;
SELECT community, COUNT(*) AS community_size,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table above is ill-formed, |=== and ===| are missed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea on how to fix this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead

But broadly, you will need a few things:
| Name                                      | Description                                                 | Our Value                                      |
|-------------------------------------------|-------------------------------------------------------------|------------------------------------------------|
| `EXAMPLE_DB.DATA_SCHEMA.NODES`           | A table for nodes                             | `p2p_demo.public.p2p_users_vw`                 |
| `EXAMPLE_DB.DATA_SCHEMA.RELATIONSHIPS`   | A table for relationships                   | `p2p_demo.public.P2P_AGG_TRANSACTIONS`         |
| `COMPUTE_POOL`                            | The size of the compute pool you would like to use| `CPU_X64_XS`                              |
| `EXAMPLE_DB.DATA_SCHEMA.NODES_COMPONENTS`| A table to output results                    | `p2p_demo.public.p2p_users_vw_lou`             |
| `NODES`                                   | A node label for our nodes                   | `p2p_users_vw`                                 |

Use

But broadly, you will need a few things:

| Name                                       | Description                                        | Our Value                              |                 
|--------------------------------------------|----------------------------------------------------|----------------------------------------|
| `EXAMPLE_DB.DATA_SCHEMA.NODES`             | A table for nodes                                  | `p2p_demo.public.p2p_users_vw`         |
| `EXAMPLE_DB.DATA_SCHEMA.RELATIONSHIPS`     | A table for relationships                          | `p2p_demo.public.P2P_AGG_TRANSACTIONS` |
| `COMPUTE_POOL`                             | The size of the compute pool you would like to use | `CPU_X64_XS`                           |
| `EXAMPLE_DB.DATA_SCHEMA.NODES_COMPONENTS`  | A table to output results                          | `p2p_demo.public.p2p_users_vw_lou`     |
| `NODES`                                    | A node label for our nodes                         | `p2p_users_vw`                         |

The space before table start makes it correctly shown. Nicely formatted spaces and table delimiters are also an important thing.

Updated multiple files to address comments
Copy link
Collaborator

@orazve orazve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some more minor comments to address.

One more comment: probably the file entity-resolution-fraud-detection/img/p2p-graph-snapshot.png have to be deleted - there is no usage of it.

from p2p_demo.public.p2p_users_vw_lou
group by community
order by community_size desc;
SELECT community, COUNT(*) AS community_size,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead

But broadly, you will need a few things:
| Name                                      | Description                                                 | Our Value                                      |
|-------------------------------------------|-------------------------------------------------------------|------------------------------------------------|
| `EXAMPLE_DB.DATA_SCHEMA.NODES`           | A table for nodes                             | `p2p_demo.public.p2p_users_vw`                 |
| `EXAMPLE_DB.DATA_SCHEMA.RELATIONSHIPS`   | A table for relationships                   | `p2p_demo.public.P2P_AGG_TRANSACTIONS`         |
| `COMPUTE_POOL`                            | The size of the compute pool you would like to use| `CPU_X64_XS`                              |
| `EXAMPLE_DB.DATA_SCHEMA.NODES_COMPONENTS`| A table to output results                    | `p2p_demo.public.p2p_users_vw_lou`             |
| `NODES`                                   | A node label for our nodes                   | `p2p_users_vw`                                 |

Use

But broadly, you will need a few things:

| Name                                       | Description                                        | Our Value                              |                 
|--------------------------------------------|----------------------------------------------------|----------------------------------------|
| `EXAMPLE_DB.DATA_SCHEMA.NODES`             | A table for nodes                                  | `p2p_demo.public.p2p_users_vw`         |
| `EXAMPLE_DB.DATA_SCHEMA.RELATIONSHIPS`     | A table for relationships                          | `p2p_demo.public.P2P_AGG_TRANSACTIONS` |
| `COMPUTE_POOL`                             | The size of the compute pool you would like to use | `CPU_X64_XS`                           |
| `EXAMPLE_DB.DATA_SCHEMA.NODES_COMPONENTS`  | A table to output results                          | `p2p_demo.public.p2p_users_vw_lou`     |
| `NODES`                                    | A node label for our nodes                         | `p2p_users_vw`                         |

The space before table start makes it correctly shown. Nicely formatted spaces and table delimiters are also an important thing.


## Prerequisites

### 1) Get Source Data
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only step as is was in the other readme

Comment on lines +23 to +25
"name": "cell3",
"collapsed": false,
"resultHeight": 115
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not cleaned-up notebook

Comment on lines +42 to +43
"collapsed": false,
"name": "Step1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not cleaned-up notebook

"| `EXAMPLE_DB.DATA_SCHEMA.NODES` | A table for nodes | `p2p_demo.public.p2p_users_vw` |\n",
"| `EXAMPLE_DB.DATA_SCHEMA.RELATIONSHIPS` | A table for relationships | `p2p_demo.public.P2P_AGG_TRANSACTIONS` |\n",
"| `COMPUTE_POOL` | The size of the compute pool you would like to use| `CPU_X64_XS` |\n",
"| `EXAMPLE_DB.DATA_SCHEMA.NODES_COMPONENTS`| A table to output results | `p2p_demo.public.p2p_users_vw_lou` |\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion

But broadly, you will need a few things:

| Name                                       | Description                                        | Our Value                                  |
|--------------------------------------------|----------------------------------------------------|--------------------------------------------|
| `EXAMPLE_DB.DATA_SCHEMA.NODES`             | A table for nodes                                  | `p2p_demo.public.p2p_users_vw`             |
| `EXAMPLE_DB.DATA_SCHEMA.RELATIONSHIPS`     | A table for relationships                          | `p2p_demo.public.P2P_AGG_TRANSACTIONS`     |
| `COMPUTE_POOL`                             | The size of the compute pool you would like to use | `CPU_X64_XS`                               |
| `EXAMPLE_DB.DATA_SCHEMA.NODES_COMPONENTS`  | A table to output results                          | `p2p_demo.public.p2p_users_vw_lou`         |
| `NODES`                                    | A node label for our nodes                         | `p2p_users_vw`                             |

Comment on lines +459 to +469
"kernelspec": {
"display_name": "Streamlit Notebook",
"name": "streamlit"
},
"lastEditStatus": {
"authorEmail": "david.fauth@neo4j.com",
"authorId": "8305788275502",
"authorName": "DFAUTH",
"lastEditTime": 1746622940682,
"notebookId": "wogqc5cvdlfnm43junl3",
"sessionId": "b3ee2980-c8de-445b-b296-156a933b77ce"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not cleaned-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants