from rosreestrXml.ui.tools.KPT.egrn_tool.add_helper.create_Materialized_Views import CreateMaterialized_Views
from rosreestrXml.ui.tools.db_helper.dbRsc import DbRsc

path_sourcer=r"E:\Download\RossRestr\newEGRN\test_import.gpkg"
name_layer='view_land_record'
name_layer_new='spatial_land_record'
name_key='parent_row_id'
name_geo='geom'
db=DbRsc(path_sourcer)
CreateMaterialized_Views(db,name_layer,name_layer_new,name_key,name_geo)
db.close()