List of code examples for the Migrate command
- Last UpdatedJan 22, 2025
- 2 minute read
Code example 1
In this code example, a migration of all selected eDNA points is triggered, as defined in the specified CSV mapping file for the EDNA.HISTORY service. eDNA point data is migrated for the time range of January 1, 2023 to August 1, 2023, in batches of 100,000 events, which is the default. Debug and error logs for the migrate operation are saved the default location (“./Logs/”).
edna2pi migrate EDNA.HISTORY “./Map/eDNAPointMap_2024-09-09-11-35-00.csv” 1/1/2023 8/1/2023
Code example 2
In this example, a migration of all selected eDNA points is triggered, as defined within the specified CSV mapping file for the EDNA.HISTORY service. eDNA point data is migrated for the time range of January 1, 2023 to August 1, 2023, in batches of 25,000 events. Debug and error logs for the migrate operation are saved the default location (“./Logs/”).
edna2pi migrate EDNA.HISTORY “./Map/eDNAPointMap_2024-09-09-11-35-00.csv” 1/1/2023 8/1/2023 --maxBatchSize 25000
Code example 3
In this example, a migration of all selected eDNA points is triggered as defined within the specified CSV mapping file for the EDNA.HISTORY service. eDNA point data is migrated for the time range of January 1, 2023 to August 1, 2023, in batches of 100,000 events, which is the default. The error log is saved as “LatestMigrationErrorLog” in the “Logs” folder within the folder where the edna2pi.exe application resides. The debug log “LatestMigrationDebugLog.txt” is saved to C:\Windows\Temp. Additional diagnostic information is shown in the console window where the command is run, detailing the migration operation progress.
edna2pi migrate EDNA.HISTORY “./Map/eDNAPointMap_2024-09-09-11-35-00.csv” 1/1/2023 8/1/2023 --diagnostics --errorLog “./Logs/LatestMigrationErrorLog.txt” --log “C:/Windows/Temp/LatestMigrationDebugLog.txt”
Code example 4
In this example, a migration of all selected eDNA points is triggered as defined within the specified CSV mapping file for the EDNA.HISTORY service. eDNA point data is migrated for the time range of January 1, 2023 to August 1, 2023, in batches of 100,000 events, which is the default. For eDNA points that have data classified as unreliable during the migration time range, the value PI tags do not have the “Questionable” annotation marked for that timestamp.
edna2pi migrate EDNA.HISTORY “./Map/eDNAPointMap_2024-09-09-11-35-00.csv” 1/1/2023 8/1/2023 --setQuestionable false
Code example 5
In this example, a migration of all selected eDNA points is triggered as defined in the specified CSV mapping file for the EDNA.HISTORY service using the ISO-8601 date/time format for a migration on a machine with a non-US region setting. eDNA point data is migrated for the time range of January 1, 2024 12:00:00 AM and EndTime of December 31, 2024 11:59:59 PM in a time zone that has a -3:00 hour UTC offset.
Date and Time with UTC Offset
./edna2pi.exe migrate edna.history "./Map/eDNAPointMap_2025-01-07-13-49-48.csv" "2024-01-01T00:00:00-3:00" "2024-12-31T23:59:59-3:00"
Date and Time in UTC
./edna2pi.exe migrate edna.history "./Map/eDNAPointMap_2025-01-07-13-49-48.csv" "2024-01-01T03:00:00Z" "2025-01-01T02:59:59Z"