Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General
Add capability to export / import data between s3 and Atlas via ShuttleCli.
Archive Methods
There are two ways to archive data.
Chunked by date is preferred as it more transparently organizes data in s3. If the table does not have a date field or if uploading as a single table is preferable, then use the second method. To do this, do not provide a start-date argument — the entire table is uploaded if start-date is absent.
Usage
where
archive
specifies whether to import exportconfig
defines path of the config filestart-date
(optional) is the date to begin (inclusive at 00:00)days
(optional) is the number of days to integrate beginning atstate-date
. Default is1
Yaml file template:
S3 storage details
Depending on which archive method one choses, s3 file names differ slightly.
File name structure when chunked by date:
/archive01/$dbName/$schemaName/$destinationName/$destinationName_$date[_part$partNumber]
File name structre when archiving the entire table:
/archive01/$dbName/$schemaName/$destinationName[_part$partNumber]
Current gotchas
foo
, then in s3 files will appear asfoo
,foo_part2
,foo_part3
and so on. The Shuttle archiver automatically imports all parts, so this behavior does not affect usage.Potential Improvements