Move data from one SDE database to another with minimal downtime
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
swapper
This tool will
- Take a sgid-internal feature class name (ie SGID.OWNER.FeatureClass) as input.
- Parse the name to get the corresponding connection files in L:\sgid_to_agol\ConnectionFilesSGID
- Check if the input sgid-internal connection file exists
- Check if the output sgid10 connection file exists
- Check if the sgid-internal input feature class exists
- Copy the feature class to sgid10 named fc_temp
- Run a function to delete the table locks on the old sgid10 feature class that's being replaced
- Delete the sgid10 feature class that's being replaced
- Rename the new copied feature class from fc_temp to fc
- Update the privileges for the agrc and SearchAPI users
Setup
Production
git clone https://github.com/agrc/swappercd swapper- From within a virtual environment that has python 3.6+ and arcpy:
pip install .\ -U - Set
SWAPPER_*environment variables as outlined in [.env.sample].
Development
- Clone project.
- Update
.envfile to be the correct path to the share folder. - From within a virtual environment that has python 3.6+ and arcpy:
pip install -e .[tests] swapper ...pytest
Usage
CLI
Run swapper for usage information.
From within other python code
from swapper import swapper
swapper.copy_and_replace('sgid.boundaries.counties')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ugrc_swapper-1.2.4.tar.gz.
File metadata
- Download URL: ugrc_swapper-1.2.4.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbb5077210630e6babdf98669c7d13538e2f472660f1486f34f501f1e4f5d72c
|
|
| MD5 |
2a39690da26d0e33f3a20797d7b4c07a
|
|
| BLAKE2b-256 |
b58c311daa1794ad0d33d4589e637e89699ba0a3457a0b116a1022c01fdae443
|
Provenance
The following attestation bundles were made for ugrc_swapper-1.2.4.tar.gz:
Publisher:
release.yml on agrc/swapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ugrc_swapper-1.2.4.tar.gz -
Subject digest:
fbb5077210630e6babdf98669c7d13538e2f472660f1486f34f501f1e4f5d72c - Sigstore transparency entry: 697038098
- Sigstore integration time:
-
Permalink:
agrc/swapper@d72e8472efaaea0012a244558d0fcc9cb6bbf228 -
Branch / Tag:
refs/tags/v1.2.4 - Owner: https://github.com/agrc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d72e8472efaaea0012a244558d0fcc9cb6bbf228 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ugrc_swapper-1.2.4-py3-none-any.whl.
File metadata
- Download URL: ugrc_swapper-1.2.4-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
099a4807ddcfa777cd0cc71276daf5ae384e9a014027003f10eebbb8c115de42
|
|
| MD5 |
4d355e7515598ca4eb8b01939033f298
|
|
| BLAKE2b-256 |
e1dcd7555d080e73f0104191ff84a041cf4b9e12c635b9a8a1c2ecf4ba5c1478
|
Provenance
The following attestation bundles were made for ugrc_swapper-1.2.4-py3-none-any.whl:
Publisher:
release.yml on agrc/swapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ugrc_swapper-1.2.4-py3-none-any.whl -
Subject digest:
099a4807ddcfa777cd0cc71276daf5ae384e9a014027003f10eebbb8c115de42 - Sigstore transparency entry: 697038102
- Sigstore integration time:
-
Permalink:
agrc/swapper@d72e8472efaaea0012a244558d0fcc9cb6bbf228 -
Branch / Tag:
refs/tags/v1.2.4 - Owner: https://github.com/agrc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d72e8472efaaea0012a244558d0fcc9cb6bbf228 -
Trigger Event:
release
-
Statement type: