ores.sql.populate.tag

Table of Contents

Classification tags (domain, subject area, name, description) per dataset.

See the Template variable reference for the complete list of available variables and their semantics.

Template

The full template source. Edit here and re-tangle with compass build --direct tangle_codegen_templates to regenerate library/templates/sql_tag_populate.mustache.

{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/sql_populate.org. Edit the org source. }}
{{! Template to generate SQL with enhanced GPL v3 license and tag data }}
{{{sql_license}}}
/*
 * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 * Template: sql_tag_populate.mustache
 * To modify, update the template and regenerate.
 */

-- =============================================================================
-- Data Quality Slovaris Tags
-- =============================================================================

\echo '--- Data Quality Slovaris Tags ---'

{{#tags}}
select ores_dq_tags_upsert_fn(ores_utility_system_tenant_id_fn(),
    '{{dataset_name}}',
    '{{subject_area_name}}',
    '{{domain_name}}',
    '{{tag_name}}',
    '{{tag_description}}'
);
{{/tags}}

-- =============================================================================
-- Summary
-- =============================================================================

\echo ''
\echo '--- Summary ---'

select 'ores_dq_datasets' as entity, count(*) as count
from ores_dq_datasets_tbl
where valid_to = ores_utility_infinity_timestamp_fn()
union all
select 'ores_dq_tags_artefact', count(*)
from ores_dq_tags_artefact_tbl;

See also

Emacs 29.3 (Org mode 9.6.15)