In PostgreSQL there is postgres_fdw extension, which allows to add a foreign schema to your own database, like a view which makes it possible to get data from another Postgres making queries to it right inside you own DB.
Does ClickHouse have some kind of the same functionality?
For example - I've recently migrated several schemas from one ClickHouse instance to another one, but I have a query which inserts some data in a INSERT INTO SELECT way, and the schema with the table which is in SELECT statement wasn't migrated, so I can't directly query it anymore.
I want to find some elegant solution to make it possible to save the same INSERT INTO SELECT logic, or at least that I don't need to use dataframes as intermediate data storage for inserting data from another db. I know there is a remote command which makes it possible to query another DB directly, but as far as I understand, it needs to have credentials hardcoded in the SQL, which isn't the best way to deal with it as my code is stored in GitHub. Maybe it is possible to use this remote but in another way?
I have ClickHouse 23.9.
use
remoteandremoteSecuretable functions with combination withnamed collectionslook documentation
https://clickhouse.com/docs/en/operations/named-collections#named-collections-for-accessing-a-remote-clickhouse-database