-
Notifications
You must be signed in to change notification settings - Fork 587
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
bq query audit [VS-1396] #8847
bq query audit [VS-1396] #8847
Conversation
Have you run an integration test? |
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.
Looks good, but could use an integration test?
NUMANRESULTS=$(awk 'END{print NR}' bq_an_output.csv) | ||
NUMACRESULTS=$(awk 'END{print NR}' bq_ac_output.csv) | ||
|
||
|
||
echo "false" > ~{pf_file} | ||
# if the results of the queries have any rows, that means there are sites with mis-matched gvs_all_an or gvs_all_ac | ||
if [[ $NUMANRESULTS != "0" ]]; then | ||
echo "The VAT table ~{fq_vat_table} has mis-matched calculations for AC, and AC of subpopulations" > ~{results_file} | ||
echo "The VAT table ~{fq_vat_table} has mis-matched calculations for AC, and AC of subpopulations, 100 rows max shown in results." 1>&2 |
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'm not sure this is the very best way to handle the error message (suggestions please!), but the existing code was wrong: we wrote an error message to ~{results_file}
and then immediately clobbered it with the CSV output from bq query
. There's another pattern for this used above that I like even less so I'm reluctant to switch to that...
cp bq_an_output.csv ~{results_file} | ||
elif [[ $NUMACRESULTS != "0" ]]; then | ||
echo "The VAT table ~{fq_vat_table} has mis-matched calculations for AN, and AN of subpopulations" > ~{results_file} | ||
echo "The VAT table ~{fq_vat_table} has mis-matched calculations for AN, and AN of subpopulations, 100 rows max shown in results." 1>&2 |
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.
same situation as above
@@ -395,7 +397,7 @@ task SpotCheckForExpectedTranscripts { | |||
echo "The VAT table ~{fq_vat_table} only has the expected transcripts at the tested location ('IGFLR1' and 'AD000671.2' in chromosome 19, between positions 35,740,407 - 35,740,469)." > ~{results_file} | |||
echo "true" > ~{pf_file} | |||
else | |||
echo "The VAT table ~{fq_vat_table} had unexpected transcripts at the tested location: [csv output follows] " > ~{results_file} | |||
echo "The VAT table ~{fq_vat_table} had unexpected transcripts at the tested location: [csv output with 100 results max follows] " > ~{results_file} |
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.
Incidental finding: this is a bit strange, the result is a CSV with an extra line of error message at the top
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.
small lol that there are these issues with the VAT validation
@@ -479,7 +482,7 @@ task SchemaNoNullRequiredFields { | |||
echo "The VAT table ~{fq_vat_table} has no null values in required fields" > ~{results_file} | |||
echo "true" > ~{pf_file} | |||
else | |||
echo "The VAT table ~{fq_vat_table} had null values in required fields: [csv output follows] " > ~{results_file} | |||
echo "The VAT table ~{fq_vat_table} had null values in required fields: [csv output with 100 results max follows] " > ~{results_file} |
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.
same here
@@ -597,7 +602,7 @@ task SchemaPrimaryKey { | |||
echo "The VAT table ~{fq_vat_table} has all unique key combinations (vid+transcript)" > ~{results_file} | |||
echo "true" > ~{pf_file} | |||
else | |||
echo "The VAT table ~{fq_vat_table} had repeating key combinations (vid+transcript): [csv output follows] " > ~{results_file} | |||
echo "The VAT table ~{fq_vat_table} had repeating key combinations (vid+transcript): [csv output with 100 results max follows] " > ~{results_file} |
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.
again
@@ -117,7 +117,8 @@ task CoreStorageModelSizes { | |||
local table_pattern="$1" | |||
local output_file_name="$2" | |||
|
|||
bq --apilog=false query --project_id='~{project_id}' --format=csv --use_legacy_sql=false \ | |||
# bq query --max_rows check: explicitly set massive max rows as we expect there to be as many rows as there are superpartitions |
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.
isn't this going to always return one line because it's a sum()
?
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.
oops yes
@@ -117,7 +117,8 @@ task CoreStorageModelSizes { | |||
local table_pattern="$1" | |||
local output_file_name="$2" | |||
|
|||
bq --apilog=false query --project_id='~{project_id}' --format=csv --use_legacy_sql=false \ | |||
# bq query --max_rows check: ok one row | |||
bq --apilog=false query --max_rows 10000000 --project_id='~{project_id}' --format=csv --use_legacy_sql=false \ |
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.
do we eventually want the max_rows to be a param somewhere?
6fcfb2a
to
afa1718
Compare
Integration run here |
No description provided.