ekati
ekati copied to clipboard
Add postgres importer
This would be a command similar to a file import command. Though instead of importing from a path a particular file type we import from a database using a particular connection string.
Syntax along the lines of:
load postgres "connection string to database"
When a connection is made to the database we introspect the schema to determine what columns are foreign keys.
When mapping keys we should use a format such as
{host}/{database}/{schema}/{table}/{id}
And that mapping has to happen for both primary keys, and foreign keys.
Composite keys would be similar, we would delimit each portion of the composite key with a /.
We would want to import the database schema as well.
Likely we just use @{table}/{column} in the key. Then we can have a node describing the column.