airbnb / knowledge-repo

A next-generation curated knowledge sharing platform for data scientists and other technical professions.
Apache License 2.0
5.48k stars 689 forks source link

confusing documentation for database uri #423

Open tam-borine opened 6 years ago

tam-borine commented 6 years ago

Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj When I tried to use --repo mysql://username:password@hostname/database:table_name as per the documentation, it threw the error that I didn't have the database. But I had connected to it with psql so that wasn't true. Turned out removing the ":table_name" substring worked for me! Maybe the documentation needs updating?

tam-borine commented 6 years ago

Ok so I was a bit confused, it depends where you're using the db uri, with the --repo flag it does need the :tablename but in other places, such as configuring SQLALCHEMY_DATABASE_URI you need to leave it off.

matthewwardrop commented 6 years ago

Hi @tam-borine , and thanks for connecting with us!

The behaviour you described is the correct behaviour, because a repository only needs one table, whereas the post metadata and user databases are indexed across several database tables.

Documentation, though, could definitely be improved. I'll leave this issue open until the documentation is improved in this way.