in dataplex-quickstart-labs/00-resources/scripts/python/business-glossary-import/bg_import/utils.py [0:0]
def configure_argument_parser(parser: argparse.ArgumentParser) -> None:
"""Defines flags and parses arguments related to preprocess_csv().
Args:
parser: argparse.ArgumentParser().
"""
glossary_argument_parser(parser)
parser.add_argument(
"terms_csv_legacy",
help="Path to the CSV file containing the terms data to import.",
metavar="[Terms CSV file (legacy)]",
nargs="?",
type=str,
)
parser.add_argument(
"--categories-csv",
help="Path to the CSV file containing the categories data to import.",
metavar="[Categories CSV file]",
type=str,
)
parser.add_argument(
"--terms-csv",
help="Path to the CSV file containing the terms data to import.",
metavar="[Terms CSV file]",
type=str,
)
parser.add_argument(
"--import-mode",
choices=["strict", "clear"],
default="strict",
type=str,
help=(
"Sets level of permissiviness with which the data is imported into"
' Data Catalog. The default value is "strict".:\n'
"strict\tCheck if the target glossary does not contain any entries,"
" and if it does, stops executing the program.\n"
"clear\tRemove all the pre-existing entries in the target glossary"
" before proceeding with validation and import.\n"
)
)