ORE Studio 0.0.4
Loading...
Searching...
No Matches
Functions
src.iso_generate_metadata_sql Namespace Reference

Functions

Path get_repo_root ()
 
str get_header ()
 
str escape_sql_string (str s)
 
 generate_catalog_sql (dict manifest, Path output_file)
 
 generate_coding_schemes_artefact_sql (dict manifest, Path output_file)
 
 generate_methodology_sql (dict manifest, Path output_file)
 
 generate_coding_schemes_dataset_sql (dict manifest, Path output_file)
 
 generate_dataset_sql (dict manifest, Path output_file)
 
 generate_dataset_tag_sql (dict manifest, Path output_file)
 
 generate_dataset_dependency_sql (dict manifest, Path output_file)
 
 generate_master_sql (Path output_file)
 
 main ()
 

Detailed Description

Generates SQL populate scripts for ISO Standards metadata.

Reads the manifest.json from external/iso/ and generates:
  - iso_catalog_populate.sql
  - iso_coding_schemes_populate.sql
  - iso_methodology_populate.sql
  - iso_dataset_populate.sql
  - iso_dataset_tag_populate.sql
  - iso_dataset_dependency_populate.sql
  - iso.sql (master include file)

Usage:
    python3 iso_generate_metadata_sql.py
    python3 iso_generate_metadata_sql.py --manifest-dir /path/to/external/iso
    python3 iso_generate_metadata_sql.py --output-dir /path/to/output

Function Documentation

◆ get_repo_root()

Path get_repo_root ( )
Get the repository root directory.
Here is the caller graph for this function:

◆ get_header()

str get_header ( )
Generate SQL file header.
Here is the caller graph for this function:

◆ escape_sql_string()

str escape_sql_string ( str  s)
Escape single quotes for SQL strings.
Here is the caller graph for this function:

◆ generate_catalog_sql()

generate_catalog_sql ( dict  manifest,
Path  output_file 
)
Generate the catalog populate SQL file.
Here is the caller graph for this function:

◆ generate_coding_schemes_artefact_sql()

generate_coding_schemes_artefact_sql ( dict  manifest,
Path  output_file 
)
Generate the coding schemes artefact populate SQL file.
Here is the caller graph for this function:

◆ generate_methodology_sql()

generate_methodology_sql ( dict  manifest,
Path  output_file 
)
Generate the methodology populate SQL file.
Here is the caller graph for this function:

◆ generate_coding_schemes_dataset_sql()

generate_coding_schemes_dataset_sql ( dict  manifest,
Path  output_file 
)
Generate the coding schemes dataset populate SQL file (separate for ordering).
Here is the caller graph for this function:

◆ generate_dataset_sql()

generate_dataset_sql ( dict  manifest,
Path  output_file 
)
Generate the dataset populate SQL file (excludes coding_schemes datasets).
Here is the caller graph for this function:

◆ generate_dataset_tag_sql()

generate_dataset_tag_sql ( dict  manifest,
Path  output_file 
)
Generate the dataset tag populate SQL file.
Here is the caller graph for this function:

◆ generate_dataset_dependency_sql()

generate_dataset_dependency_sql ( dict  manifest,
Path  output_file 
)
Generate the dataset dependency populate SQL file.
Here is the caller graph for this function:

◆ generate_master_sql()

generate_master_sql ( Path  output_file)
Generate the iso.sql master include file.
Here is the caller graph for this function: