Skip to content

Commit

Permalink
process.py: Load schema for BODS 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Nov 29, 2024
1 parent 3bb1e8c commit 54f7d07
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cove_bods/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ def process(self, process_data: dict) -> dict:

if check_table_file_new(supplied_data_json_file):
statement_id_name = "statementID"
schema_url = config['schema_versions']['0.2']['schema_url']
schema = config['schema_versions']['0.2']['schema_url']
else:
statement_id_name = "statementId"
schema_url = config['schema_versions'][config['schema_latest_version']]['schema_url']
schema = schema_registry(
config['schema_versions'][config['schema_latest_version']]['schema_url']
).contents("urn:statement")

unflatten_kwargs = {
"output_name": os.path.join(output_dir, "unflattened.json"),
Expand All @@ -218,7 +220,7 @@ def process(self, process_data: dict) -> dict:
"id_name": statement_id_name,
"root_is_list": True,
"input_format": get_file_type_for_flatten_tool(supplied_data_json_file),
"schema": schema_url,
"schema": schema,
}

logger.info(f"{input_filename} {unflatten_kwargs}")
Expand Down

0 comments on commit 54f7d07

Please sign in to comment.