Skip to content

Commit

Permalink
Sync with #596
Browse files Browse the repository at this point in the history
  • Loading branch information
samanvp committed May 19, 2020
1 parent d54adb8 commit 924ff45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions cloudbuild_CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ steps:
- '--project ${PROJECT_ID}'
- '--image_tag ${COMMIT_SHA}'
- '--run_unit_tests'
- '--run_preprocessor_tests'
- '--run_bq_to_vcf_tests'
- '--run_all_tests'
- '--run_presubmit_tests'
- '--test_name_prefix cloud-ci-'
id: 'test-gcp-variant-transforms-docker'
entrypoint: '/opt/gcp_variant_transforms/src/deploy_and_run_tests.sh'
Expand Down
2 changes: 1 addition & 1 deletion gcp_variant_transforms/libs/bigquery_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def get_flatten_table_schema(self, schema_file_path):
bq_command)
else:
logging.info('Successfully extracted the schema of flatten table.')
if _delete_table(full_table_id) == 0:
if delete_table(full_table_id) == 0:
logging.info('Successfully deleted temporary table: %s', full_table_id)
else:
logging.error('Was not able to delete temporary table: %s', full_table_id)
Expand Down
6 changes: 3 additions & 3 deletions gcp_variant_transforms/vcf_to_bq.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def run(argv=None):
load_avro = bigquery_util.LoadAvro(avro_root_path,
known_args.output_table,
suffixes, not known_args.append)
_ = load_avro.start_loading()
not_empty_variant_suffixes = load_avro.start_loading()
except Exception as e:
logging.error('Something unexpected happened during the loading of AVRO '
'files to BigQuery: %s', str(e))
Expand All @@ -561,14 +561,14 @@ def run(argv=None):

if known_args.sample_lookup_optimized_output_table:
flatten_call_column = bigquery_util.FlattenCallColumn(
known_args.output_table, suffixes)
known_args.output_table, not_empty_variant_suffixes)
try:
flatten_schema_file = tempfile.mkstemp(suffix=_BQ_SCHEMA_FILE_SUFFIX)[1]
if not flatten_call_column.get_flatten_table_schema(flatten_schema_file):
raise ValueError('Failed to extract schema of flatten table')
# Create output flatten tables if needed
if not known_args.append:
for suffix in suffixes:
for suffix in not_empty_variant_suffixes:
output_table_id = bigquery_util.compose_table_name(
known_args.sample_lookup_optimized_output_table, suffix)
bigquery_util.create_output_table(output_table_id,
Expand Down

0 comments on commit 924ff45

Please sign in to comment.