Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename catchment tables and code to be the same name in all locations #981

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
FIM_VERSION = os.environ['FIM_VERSION']
HAND_BUCKET = os.environ['HAND_BUCKET']
HAND_VERSION = os.environ['HAND_VERSION']
HAND_PREFIX = f"fim/{HAND_VERSION.replace('.', '_')}/hand_datasets"
HAND_PREFIX = f"fim/hand_{HAND_VERSION.replace('.', '_')}/hand_datasets"

CACHE_FIM_RESOLUTION_FT = 0.25
CACHE_FIM_RESOLUTION_ROUNDING = 'up'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run: true

# UNCOMMENT THE LINES BELOW TO RECREATE DATA
# fim_configs:
# - name: branch_0_catchments
# target_table: fim_catchments.branch_0_catchments
# - name: catchments_0_branches
# target_table: fim_catchments.catchments_0_branches
# fim_type: hand

services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run: true

# UNCOMMENT THE LINES BELOW TO RECREATE DATA
# fim_configs:
# - name: branch_0_catchments_hi
# target_table: fim_catchments.branch_0_catchments_hi
# - name: catchments_0_branches_hi
# target_table: fim_catchments.catchments_0_branches_hi
# fim_type: hand

services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run: true

# UNCOMMENT THE LINES BELOW TO RECREATE DATA
# fim_configs:
# - name: branch_0_catchments_prvi
# target_table: fim_catchments.branch_0_catchments_prvi
# - name: catchments_0_branches_prvi
# target_table: fim_catchments.catchments_0_branches_prvi
# fim_type: hand

services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run: true

# UNCOMMENT THE LINES BELOW TO RECREATE DATA
# fim_configs:
# - name: branch_gms_catchments
# target_table: fim_catchments.branch_gms_catchments
# - name: catchments_gms_branch
# target_table: fim_catchments.catchments_gms_branch
# fim_type: hand

services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run: true

# UNCOMMENT THE LINES BELOW TO RECREATE DATA
# fim_configs:
# - name: branch_gms_catchments_hi
# target_table: fim_catchments.branch_gms_catchments_hi
# - name: catchments_gms_branches_hi
# target_table: fim_catchments.catchments_gms_branches_hi
# fim_type: hand

services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ run: true

# UNCOMMENT THE LINES BELOW TO RECREATE DATA
# fim_configs:
# - name: branch_gms_catchments_prvi
# target_table: fim_catchments.branch_gms_catchments_prvi
# - name: catchments_gms_branches_prvi
# target_table: fim_catchments.catchments_gms_branches_prvi
# fim_type: hand

services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"workspaceFactory" : "SDE",
"dataset" : "hydrovis.reference.%Main Stem FIM Catchments_1_1_1",
"datasetType" : "esriDTFeatureClass",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.branch_0_catchments_hi",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.catchments_0_branches_hi",
"srid" : "3857",
"spatialReference" : {
"wkid" : 102100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"workspaceFactory" : "SDE",
"dataset" : "hydrovis.reference.%Main Stem FIM Catchments_1_1_1",
"datasetType" : "esriDTFeatureClass",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.branch_0_catchments",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.catchments_0_branches",
"srid" : "3857",
"spatialReference" : {
"wkid" : 102100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"workspaceFactory" : "SDE",
"dataset" : "hydrovis.reference.%Main Stem FIM Catchments_1_1_1",
"datasetType" : "esriDTFeatureClass",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.branch_0_catchments_prvi",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.catchments_0_braches_prvi",
"srid" : "3857",
"spatialReference" : {
"wkid" : 102100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"workspaceFactory" : "SDE",
"dataset" : "hydrovis.reference.%Main Stem FIM Catchments_1_1_1",
"datasetType" : "esriDTFeatureClass",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.branch_gms_catchments_hi",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.catchments_gms_branches_hi",
"srid" : "3857",
"spatialReference" : {
"wkid" : 102100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"workspaceFactory" : "SDE",
"dataset" : "hydrovis.reference.%Main Stem FIM Catchments_1_1_1",
"datasetType" : "esriDTFeatureClass",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.branch_gms_catchments",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.catchments_gms_branches",
"srid" : "3857",
"spatialReference" : {
"wkid" : 102100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"workspaceFactory" : "SDE",
"dataset" : "hydrovis.reference.%Main Stem FIM Catchments_1_1_1",
"datasetType" : "esriDTFeatureClass",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.branch_gms_catchments_prvi",
"sqlQuery" : "SELECT hydro_id::text as hydro_id, geom, huc8, branch, fim_version,model_version, oid FROM hydrovis.fim_catchments.catchments_gms_branches_prvi",
"srid" : "3857",
"spatialReference" : {
"wkid" : 102100,
Expand Down
2 changes: 1 addition & 1 deletion Core/Manual_Workflows/helper_functions/shared_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def load_df_into_db(table_name, db_engine, df, dtype={'oid': sqlalchemy.types.In

def move_data_to_another_db(origin_db, dest_db, origin_table, dest_table, stage=True, add_oid=True,
add_geom_index=True, columns="*"):
origin_engine = get_db_engine(origin_db)
# origin_engine = get_db_engine(origin_db)
dest_engine = get_db_engine(dest_db)

if stage:
Expand Down
Loading