https://github.com/davidbakereffendi/tigergraph-yelp
Contains the GSQL scripts and TigerGraph solution to import and model the Yelp challenge dataset into TigerGraph respectively.
https://github.com/davidbakereffendi/tigergraph-yelp
import tigergraph tigergraph-yelp yelp yelp-challenge yelp-dataset
Last synced: about 1 month ago
JSON representation
Contains the GSQL scripts and TigerGraph solution to import and model the Yelp challenge dataset into TigerGraph respectively.
- Host: GitHub
- URL: https://github.com/davidbakereffendi/tigergraph-yelp
- Owner: DavidBakerEffendi
- Created: 2020-02-16T13:16:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-03T09:31:13.000Z (about 4 years ago)
- Last Synced: 2025-03-29T04:12:35.025Z (about 2 months ago)
- Topics: import, tigergraph, tigergraph-yelp, yelp, yelp-challenge, yelp-dataset
- Language: Shell
- Size: 30.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TigerGraph Yelp Dataset Solution
Contains the GSQL scripts and TigerGraph solution tarball to import and model the Yelp challenge dataset using
TigerGraph.## Getting Started
### Starting TigerGraph
The TigerGraph Docker container is built from the official TigerGraph image. Original instructions can be found
[here](https://github.com/tigergraph/ecosys/blob/master/guru_scripts/docker/README.md). The following commands
will get TigerGraph up and running:* `docker-compose up` to get the Docker container up. The name of the container is set to `tigergraph-yelp`.
* Open a shell to the TigerGraph server using the following command: `ssh -p 14022 tigergraph@localhost` with
password `tigergraph`. A convience script called `connect` calls this command.
* Start the TigerGraph service using `gadmin start` (may take up to 1 minute).Now, one will have access to the following:
* GSQL shell: Make use of the GSQL shell be calling `gsql`.
* GraphStudio: Open a browser to `http://localhost:14240` for TigerGraph's GraphStudio.### Importing the Yelp Solution File
From the GraphStudio home, select "Import An Existing Solution" and select `yelp-solution.tar.gz`. This file
contains a basic Yelp schema, a few example queries, and the geo-grid code from the Graph Gurus episode
[Location, Location, Location](https://www.youtube.com/watch?v=gPF_SXibDxw).Note: After importing the solution, your GraphStudio may not load Design Schema and additional menus. If this
occurs, simply reset `gadmin` by calling `gadmin stop` followed by `gadmin start`.### Importing the Yelp Dataset
Before the Yelp dataset can be imported, it needs to be converted to CSV. `yelp-loader.gsql` is based on the
data produced from my
[Yelp dataset normalization and feature selection](https://github.com/DavidBakerEffendi/yelp-normalization)
script.Once the dataset has been normalized and converted to CSV then run `./transfer_data` which will move these
CSV files and `yelp-loader.gsql` into the Docker container. `./transfer_data` assumes this directory is on the
same level as [`yelp-normalization`](https://github.com/DavidBakerEffendi/yelp-normalization). Once SSH'd in
to the Docker container using `./connect`, run `gsql` and then the following command:
```
GSQL > @yelp-loader.gsql
```
This will begin the batch offline data loading job. Remember to edit the file paths in `yelp-loader.gsql` before
starting each job.