Answer the question
In order to leave comments, you need to log in
What is the best way to update the data?
The situation is as follows: there is a giant database (MS SQL), and there is (more precisely, there will be) a site on Django, which should use not all, but some of the data from this database. This database is, as it were, "general", that is, not only this proposed site will use it, this database is already being used. You can't change its structure, you can't enter data there either. You can connect to the database via an ssh tunnel.
As I understand it, for a Django site it is necessary to have its own database, with its own structure, with its own tables. How to organize data exchange? The exchange is one-way, you only need to take data from a "large" database.
Is it possible to somehow open an ssh tunnel through Django, write the queries I need to fetch data directly with sql, write this data to some file, and from there read it into my database.
Am I thinking right?
Answer the question
In order to leave comments, you need to log in
Dzhanga can use several databases
Dzhanga can map to an existing database structure
The secure channel should provide a DBMS
msskul is better to change to a DBMS, those to postgres
Create DBRouter, Create a database on anything (yes, even on Sqlite3), Specify it as the main one.
attach MSSQL database as an additional one through this backend django-mssql.readthedocs.io/en/latest
to access the mssql database, in any case, you need to create a separate user with read-only rights
Is it possible to somehow open an ssh tunnel through Django, write the queries I need to fetch data directly with sql, write this data to some file, and from there read it into my database.This should not be done for the reason that connections can suddenly break off. It's over the internet.
Am I thinking right?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question