PCDM icon indicating copy to clipboard operation
PCDM copied to clipboard

README background and examples

Open ResearchActuary opened this issue 3 years ago • 2 comments

In the README, can we put in a hyperlink and also a tiny bit of background about what SQL Alchemy is?

Also, can we put in a bit of sample code and output to illustrate some of the key tables and schema? The illustration is helpful, but I'm not fully able to interpret it. For example, it doesn't look like an object-relational model. Having something which shows primary and foreign keys would be very informative.

Not sure if that second paragraph is on point as I'm not 100% sure what SQL Alchemy does. :-)

ResearchActuary avatar Mar 10 '22 14:03 ResearchActuary

Sounds good to me. I think SQLAlchemy ought to allow deployment of this model to different SQL-variants (T-SQL, Oracle, Postgres, SQLite etc.) by simply changing a configuration parameter. I'm not 100% sure if this is all that is needed to be done, but I'll find out as I explore the library further.

genedan avatar Mar 25 '22 13:03 genedan

@genedan, I cloned your repo and ported it to Snowflake. Pretty straightforward since Snowflake provides a SQLAlchemy dialect for Snowflake. I did run into issues with relationships. A couple were due to relationships on foreign keys not lining up from a data type perspective. For example: a key being defined as integer which relates to a foreign key that is a string. Unfortunately, this doesn't work in Snowflake. They have to be the same data type. There were a handful of those situations which I ended up commenting out those relationships due to time constraints and in order to get the tables in place so I could look at them. Good work on this!! Much appreciated!

Bryan-Meier avatar Jun 14 '22 17:06 Bryan-Meier