in datascan/bulk-creation-scripts/lib.py [0:0]
def validateCLI(gcp_project_id, location_id, bq_tables) -> None:
"""
Method to valide the CLI Input
return: None
"""
# check for all the CLI arguments
if not gcp_project_id or not location_id or not bq_tables:
raise ValueError(
"CLI input must define configs using the parameters: "
"('--gcp_project_id', '--location_id', '--bq_tables'). "
)
for full_table_name in bq_tables:
if not re.match(r'^[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+$', full_table_name):
raise ValueError(
f"bqTable - {full_table_name} does not match the expected format 'project_id.dataset_id.table_id'"
)
return None