has anyone set up a prisma server for ad hoc queri...
# orm-help
g
has anyone set up a prisma server for ad hoc queries? I have a production prisma server and production database, but want to set up a separate server and follower (read only) database to run ad hoc queries on the data. however, Prisma seems to require write permissions to hook into a database. is there a way around this or does anyone have another solution? I do not want to spin up a graphql server either and was planning on using
prisma-binding
am not able to set up a prisma server at
<http://app.prisma.io|app.prisma.io>
with heroku connecting to my follower database. i have SSL turned on and
migrations: false
but getting "user has no connect priviledge" then cannot "create table in read only environment". seems like passive PostgreSQL mode doesn't work
h
Hi, Prisma requires to create some internal table to store the current form of your datamodel. So you definitely require this access. Also it is not recommended to directly consume the prisma api direct as it acts as wire protocol for the client and it is very open and direct consumption is something which can risk security of your app.
g
Hi Harshit, thanks for your reply. The database I am trying to connect to is a read-only copy of my production database so it already has that internal table. I’d rather not set up access on my production app for reading the database to make ad-hoc queries because I want to limit the WRITE privilege and avoid putting extra load on the production app server and database.
further, it seems like the ability to set up an ETL flow is complicated by the inability to set up Prisma with just read access to a copy of a Prisma database. i’d like to use the prisma bindings to avoid writing raw SQL