ORE Studio 0.0.4
Loading...
Searching...
No Matches
Functions
src.flags_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_methodology_sql (dict manifest, str methodology_text, 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 flag metadata (methodology, datasets, tags).

Reads the manifest.json and methodology.txt from external/flags/ and generates:
  - flags_methodology_populate.sql
  - flags_dataset_populate.sql
  - flags_dataset_tag_populate.sql
  - populate_flags.sql (master include file)

Usage:
    python3 flags_generate_metadata_sql.py
    python3 flags_generate_metadata_sql.py --manifest-dir /path/to/external/flags
    python3 flags_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_methodology_sql()

generate_methodology_sql ( dict  manifest,
str  methodology_text,
Path  output_file 
)
Generate the methodology populate SQL file.
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.
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 populate_flags.sql master include file.
Here is the caller graph for this function: