-
Notifications
You must be signed in to change notification settings - Fork 13
Create a schema for an existing annotated CLOUD database from a REPL
Jarrod edited this page Sep 15, 2022
·
7 revisions
Include the schema cartographer library and the client api as a dependencies in your project.
(ns your-namespace
(:require
[datomic.client.api :as d]
[schema-cartographer.core :as cartographer]))
(def cfg-map {:server-type :ion
:region "us-east-1"
:system "your-system" ; <stack-name> also called <system-name>
:endpoint "https://ClientApiGatewayEndpoint.execute-api.us-east-1.amazonaws.com"})
(def client (d/client cfg-map))
(def conn (d/connect client {:db-name "your-database"})))
;; Arguments to the save-schema-edn
;; 1) `db`
;; 2) `path` to save the resulting schema file to
;; 3) `db-type` this should be :cloud
(cartographer/save-schema-edn db "resources/db-schema.edn" :cloud)
Progress will be logged to the repl while the utility is running.
Load the resulting output file in the UI that resides at https://schema-cartographer.com