Fix file extensions in USAGE, update IMDB experiment/example.

This commit is contained in:
Mahlon E. Smith 2025-11-04 18:18:03 -08:00
parent 76718fa49f
commit 363ba15be4
Signed by: mahlon
SSH key fingerprint: SHA256:dP84sRGKZRpOOiPD/+GuOq+SHSxEw9qi5BWLQobaHm0
3 changed files with 14 additions and 14 deletions

View file

@ -17,9 +17,9 @@ import
std/os,
std/sequtils,
std/strformat
import kuzu
import lbug
const DB = "imdb.kz"
const DB = "imdb.db"
const DOT = "imdb-results.dot"
if not DB.fileExists:
@ -31,13 +31,13 @@ if paramCount() < 2:
echo "I require 2 actor names, in quotes."
quit 1
var stmt: KuzuPreparedStatement
var res: KuzuQueryResult
var stmt: LbugPreparedStatement
var res: LbugQueryResult
var fromActor = paramStr(1)
var toActor = paramStr(2)
var db = newKuzuDatabase( DB, kuzuConfig(read_only=true) )
var db = newLbugDatabase( DB, lbugConfig(read_only=true) )
var conn = db.connect
echo "Database opened: ", db.path

View file

@ -1,7 +1,7 @@
# vim: set et sta sw=4 ts=4 :
#
# Fetches movie and actor data from IMDB and converts it
# to CSV, then imports into a Kuzu graph database.
# to CSV, then imports into a Ladybug graph database.
#
# Only cares about actors in movies! Things like writers,
# directors, and TV shows are intentionally omitted.
@ -18,9 +18,9 @@ import
std/strformat,
std/strutils,
zip/gzipfiles,
kuzu
lbug
const DB = "imdb.kz"
const DB = "imdb.db"
const SOURCE = "https://datasets.imdbws.com"
const FILES = @[ "name.basics", "title.basics", "title.principals" ]
@ -126,11 +126,11 @@ known_file.close()
#
# Ok, now import into a fresh kuzu database.
# Ok, now import into a fresh ladybug database.
#
if not DB.dirExists:
var db = newKuzuDatabase( DB )
var db = newLbugDatabase( DB )
var conn = db.connect()
var duration = 0