in datascan/bulk-creation-scripts/dataquality /lib.py [0:0]
def validateCLI(gcp_project_id, location_id, data_profile_ids) -> 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 data_profile_ids:
raise ValueError(
"CLI input must define configs using the parameters: "
"('--gcp_project_id', '--location_id', '--data_profile_ids'). "
)
for data_profile in data_profile_ids:
if not re.match(r'^[a-zA-Z0-9_-]+\.[a-z][a-z0-9-]+[a-z0-9]\.[a-z][a-z0-9-]+[a-z0-9]$', data_profile):
raise ValueError(
f"data_profile_id - {data_profile} does not match the expected format 'project_id.location_id.datascan_id'"
)
return None