-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSM CLI, table persistence #160
Changes from 5 commits
8ee5515
ff92be6
770729c
efdee2f
1f58bdf
93afe62
78eddb9
92d4c96
8d79e7c
befd3b6
63605ab
28e8a80
d6345d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,8 @@ def get_parser() -> argparse.ArgumentParser: | |
dest="action", | ||
) | ||
|
||
# Study creation | ||
|
||
create = actions.add_parser( | ||
"create", help="Create a study instance from a template" | ||
) | ||
|
@@ -135,6 +137,8 @@ def get_parser() -> argparse.ArgumentParser: | |
), | ||
) | ||
|
||
# Database cleaning | ||
|
||
clean = actions.add_parser( | ||
"clean", help="Removes tables & views beginning with '[target]__' from Athena" | ||
) | ||
|
@@ -143,12 +147,20 @@ def get_parser() -> argparse.ArgumentParser: | |
add_study_dir_argument(clean) | ||
add_verbose_argument(clean) | ||
add_db_config(clean) | ||
clean.add_argument( | ||
"--statistics", | ||
action="store_true", | ||
help="Remove artifacts of previous statistics runs", | ||
dest="stats_clean", | ||
) | ||
clean.add_argument( | ||
"--prefix", | ||
action="store_true", | ||
help=argparse.SUPPRESS, | ||
) | ||
|
||
# Database building | ||
|
||
build = actions.add_parser( | ||
"build", | ||
help="Removes and recreates Athena tables & views for specified studies", | ||
|
@@ -158,7 +170,16 @@ def get_parser() -> argparse.ArgumentParser: | |
add_study_dir_argument(build) | ||
add_verbose_argument(build) | ||
add_db_config(build) | ||
|
||
add_data_path_argument(build) | ||
build.add_argument( | ||
"--statistics", | ||
Comment on lines
+174
to
+175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would there be value in offering a way to build statistics outside of a study build? (or clean them?) Like a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, we have one of those for the table builder class - i'm not going to do it here, but #161 |
||
action="store_true", | ||
help=( | ||
"Force regenerating statistics data from latest dataset. " | ||
"Stats are created by default when study is initially run" | ||
), | ||
dest="stats_build", | ||
) | ||
build.add_argument( | ||
"--load-ndjson-dir", help="Load ndjson files from this folder", metavar="DIR" | ||
) | ||
|
@@ -168,6 +189,8 @@ def get_parser() -> argparse.ArgumentParser: | |
help=argparse.SUPPRESS, | ||
) | ||
|
||
# Database export | ||
|
||
export = actions.add_parser( | ||
"export", help="Generates files on disk from Athena views" | ||
) | ||
|
@@ -177,6 +200,8 @@ def get_parser() -> argparse.ArgumentParser: | |
add_verbose_argument(export) | ||
add_db_config(export) | ||
|
||
# Aggregator upload | ||
|
||
upload = actions.add_parser( | ||
"upload", help="Bulk uploads data to Cumulus aggregator" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I mentioned this in passing, but I wanted to call attention to 'you can now include arbitrary args when extending a tablebuilder' as maybe relevant for metrics work.