|
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_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 () | |
Generates SQL populate scripts for cryptocurrency metadata (methodology, datasets, tags).
Reads the manifest.json and methodology.txt from external/crypto/ and generates:
- crypto_methodology_populate.sql
- crypto_dataset_populate.sql
- crypto_dataset_tag_populate.sql
- populate_crypto.sql (master include file)
Usage:
python3 crypto_generate_metadata_sql.py
python3 crypto_generate_metadata_sql.py --manifest-dir /path/to/external/crypto
python3 crypto_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_methodology_sql | ( | dict | manifest, |
| str | methodology_text, | ||
| Path | output_file | ||
| ) |
Generate the methodology populate SQL file.

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

| 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 populate_crypto.sql master include file.
