def load(self, config_data):
"""
Method to load the configuration file, the configuration schema, and select the correct validator and backend
Args:
config_data(dict): The configuration dictionary
Returns:
None
"""
self.config_data = config_data
# Load the schema file based on the config that was provided
try:
schema_name = self.config_data['schema']['name']
except KeyError as err:
raise ConfigFileError("The specified schema was not found: {}. Try to update your ingest client library or double check your ingest job configuration file".format(self.config_data['schema']['name']))
with open(os.path.join(resource_filename("ingestclient", "schema"), "{}.json".format(schema_name)), 'rt') as schema_file:
self.schema = json.load(schema_file)
评论列表
文章目录