Add --reload flag to data synchronization script #12

Merged
nick merged 2 commits from feature/add-reload-flag-for-loading-data into master 2025-05-22 12:27:44 -04:00
Owner

This PR introduces a new command-line argument --reload to the data synchronization script.
When this flag is used, the script will truncate the specified feature layer in ArcGIS and load data
from a specified JSON file instead of fetching it from the API. This feature is useful for scenarios
where data needs to be reloaded without making API calls, allowing for quicker testing and data management.

Additionally, the feature layer is now truncated at the start of the script execution, ensuring that
it is cleared before loading new data.

This PR introduces a new command-line argument `--reload` to the data synchronization script. When this flag is used, the script will truncate the specified feature layer in ArcGIS and load data from a specified JSON file instead of fetching it from the API. This feature is useful for scenarios where data needs to be reloaded without making API calls, allowing for quicker testing and data management. Additionally, the feature layer is now truncated at the start of the script execution, ensuring that it is cleared before loading new data.
nick added 2 commits 2025-05-22 12:27:09 -04:00
- Introduced a new command-line argument `--reload` to allow loading data from a specified JSON file.
- Updated `parse_arguments` to include the `--reload` flag.
- Modified `main` function to truncate the feature layer and load data from the JSON file when the flag is used.
- Enhanced documentation to reflect the new functionality and usage examples.
- Moved the call to the truncate function to always execute at the beginning of the main function.
- Ensured that the feature layer is cleared before loading data from a JSON file or fetching from the API.
nick merged commit b58653f3f7 into master 2025-05-22 12:27:44 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: nick/753-Data-Sync#12
No description provided.