Skip to content

Commit

Permalink
fix: fix bug causing fgdb downloads to fail
Browse files Browse the repository at this point in the history
Closes #239
  • Loading branch information
stdavis committed Nov 6, 2024
1 parent abff6fd commit 938252f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Production: [https://electrofishing-query.ugrc.utah.gov](https://electrofishing-
- Update Parameters -> Max Number of Records Returns from 1000 to 5000.
1. Publish `scripts/Download.tbx/Download` as `Electrofishing/Download`:
- asynchronous
- message level: "info"
- max time a client can use the service: `300`
- Copy `scripts/swq_secrets.py`, `scripts/__init__.py`, `scripts/download.py`, & `scripts/sql/*` to `C:\arcgisserver\directories\arcgissystem\arcgisinput\Electrofishing\Download.GPServer\extracted\p20\scripts`
- Update `swq_secrets.py` to reflect the environment that you have published to.
Expand Down
2 changes: 1 addition & 1 deletion scripts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def copy_related_tables(dataset):
arcpy.AddMessage('copying {} table'.format(destination))
where = f'{foreign_key} IN (SELECT {primary_key} FROM {secrets.DATABASE}.{secrets.USERNAME}.{dataset} where {events_where})'
layer = arcpy.management.MakeTableView(join(sde, destination), destination + '_layer', where)
arcpy.management.CopyRows(layer, join(fgdb, destination))
arcpy.management.CopyRows(layer, join(fgdb, destination.split('.')[-1]))

if arcpy.Exists(join(fgdb, relationship_class.split('.')[-1])):
continue
Expand Down

0 comments on commit 938252f

Please sign in to comment.