from sqlalchemy import outerjoin
...
query_test = self.session.query(\
sql.null().label('id_streets_id_np'),\
sql.null().label('id_streets_id_street'),\
sql.null().label('id_streets_name_street'),\
sql.null().label('id_streets_type_street'),\
ID_Streets_history,\
outerjoin(ID_Streets_history, ID_Nps, ID_Nps.id_np == ID_Streets_history.id_np),\
outerjoin(ID_Streets_history, Modify_reason, text(\
'(ID_Streets_history.code_reason=Modify_reason.code_reason '\
'AND ID_Streets_history.code_detail=Modify_reason.code_detail)')))
Но при генерации query2 количество колонок не изменилось.