I have found a code that takes the file and deletes the tables completely.
In this case, it is difficult to use join
If it is possible to change the code so that it first imports all the tables into the database, for example, import_takhrij, and then upserts the information using join, and...