SQLPage + ROAPI ? #741
Replies: 2 comments 2 replies
-
what is your setup? do you have one MySQL and one postgres database? Have you tried using postgres foreign data wrappers (FDW) ? |
Beta Was this translation helpful? Give feedback.
-
Yes, I have both mysql and postgres, and would like eventually be able to query multiple databases. The issue about the support for variables is also just one connection to roapi, which is reading a test json file. In terms of set up - its just vanilla sqlpage and roapi via docker compose. sqlpage docker compose file important bits of change -
roapi docker compose file -
roapi.yml file -
test.json file in the testdata folder for roapi
then in index.sql file in sqlpage
|
Beta Was this translation helpful? Give feedback.
-
Has anyone had success with using roapi to connect multiple databases and integrate it with sqlpage ?
I somehow seem to be running into issues with every step of the way, so if anyone has any working examples to share, I would be very grateful to learn from it.
Here are the issues I face (which I am asking for help in roapi issues as well) -
To test some basic functionality, I got roapi to read a csv file and a json file (all test data), connected sqlpage to roapi using postgres wire, and ran into more issues -
I use variables (mysql) to make some bits of the data/code reusable. To adapt the same in postgres, I need to use
with testvars(var1, var2) as (values(1, 2))
. However roapi is erroring out as sqlpage tries to run this as a sql on a postgres connection, but roapi doesnt seem to deal with this the variables. This seems like a big concern as it means the entire sqlpage application that connects to roapi as the datasource cannot use variables and therefore the sql files might get messy with repeating code, too many hard-coded strings, etc.So, If anyone has got any success stories with roapi and sqlpage, I would be very keen to hear about it and thankful to learn from it !
Beta Was this translation helpful? Give feedback.
All reactions