Is it possible to use a query as a source of readi...
# random
i
Is it possible to use a query as a source of reading (extracting) from postgres? I don't want to read a table. I have a complicated query that should be used to extract the data. From what I saw here: https://docs.meltano.com/guide/integration/#selecting-entities-and-attributes-for-extraction I'm under the impression I need to import the data from each table and then transform it, instead of using a query. I'm aware of the option to create a view on the DB and use it as a source. But prefer to use a query and not calling a view.
t
It’s certainly possible and I’d love to see it added to tap-postgres. https://github.com/MeltanoLabs/tap-postgres/issues/185 is an open issue about that. Can you leave on comment on there?
i
Thanks @Taylor Murphy (Arch), I'll take a look. The root problem is that I need to also collect data from a system table. Maybe I missed something, but I'm under the impression only user tables can be used. I need to read data from pg_stat_database (a Postgres system table).
That's why I prefer just to be able to write my own query...
t
If you log in with the right user you should be able to query anything