|
ORE Studio 0.0.4
|
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 () | |
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
| Path get_repo_root | ( | ) |
Get the repository root directory.

| str get_header | ( | ) |
Generate SQL file header.

| str escape_sql_string | ( | str | s | ) |
Escape single quotes for SQL strings.

| generate_catalog_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the catalog populate SQL file.

| generate_coding_schemes_artefact_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the coding schemes artefact populate SQL file.

| generate_methodology_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the methodology populate SQL file.

| generate_coding_schemes_dataset_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the coding schemes dataset populate SQL file (separate for ordering).

| generate_dataset_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the dataset populate SQL file (excludes coding_schemes datasets).

| generate_dataset_tag_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the dataset tag populate SQL file.

| generate_dataset_dependency_sql | ( | dict | manifest, |
| Path | output_file | ||
| ) |
Generate the dataset dependency populate SQL file.

| generate_master_sql | ( | Path | output_file | ) |
Generate the iso.sql master include file.
