Skip to content

Files

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 23, 2024
Jun 7, 2023
May 23, 2024
May 23, 2024
May 23, 2024
May 23, 2024
May 23, 2024
May 23, 2024
May 23, 2024
May 23, 2024

Phone Calls TypeDB Example (Node.js)

The Phone Calls Node.js example showcases:

  1. basic migration of CSV, JSON and XML data into a TypeDB knowledge graph database
  2. writing and performing expressive TypeQL queries to gain insights over the dataset

Prerequisites

Quickstart

  1. Checkout this repository: git clone https://github.com/vaticle/typedb-driver-examples && cd typedb-driver-examples
  2. Start the TypeDB Server.
  3. Go to the directory where you have your typedb-all distribution unarchived, and run: ./typedb console (or typedb console, if TypeDB was installed via a package manager)
  4. Load the Phone Calls schema:
> database create phone_calls
> transaction phone_calls schema write
phone_calls::schema::write> source {path-to-the-cloned-repo}/phone_calls/schema.tql
phone_calls::schema::write*> commit
> exit
  1. Install dependencies: npm install.
  2. Migrate the dataset into TypeDB from any of the 3 supported formats: CSV, JSON, or XML, using any one of the following commands:
  • npm run migrateCsv,
  • npm run migrateJson, or
  • npm run migrateXml.
  1. Launch the interactive query runner: npm run queries.