<commit_before>name: service
description: Name server entries based on system.service (i.e. system.service_dns)

templates:
 - system.reference_service_entity
 - backend.status

primary_key:
 - domain
 - service

unique:
 -
  name: unique
  columns:
   - domain
   - service
   - service_entity_name

columns:
 -
  name: registered
  type: dns.t_domain
  description: Registered domain of which domain is a sub domain
  references: dns.registered.domain
 -
  name: domain
  type: dns.t_domain
  description: domain for which the entries should be created

checks:
 -
  name: proper_subdomain
  description: Ensures that domain is a subdomain of registered
  check: registered = right(domain, char_length(p_registered))

<commit_msg>Finally fixes inconsitency with subdomain checks<commit_after>name: service
description: Name server entries based on system.service (i.e. system.service_dns)

templates:
 - system.reference_service_entity
 - backend.status

primary_key:
 - domain
 - service

unique:
 -
  name: unique
  columns:
   - domain
   - service
   - service_entity_name

columns:
 -
  name: registered
  type: dns.t_domain
  description: Registered domain of which domain is a sub domain
  references: dns.registered.domain
 -
  name: domain
  type: dns.t_domain
  description: domain for which the entries should be created

checks:
 -
  name: proper_subdomain
  description: Ensures that domain is a subdomain of registered
  check: registered = domain OR '.' || registered = right(domain, char_length(registered)+1)

{'fraction_non_alphanumeric': 0.07133507853403141, 'fraction_numerical': 0.0006544502617801048, 'mean_word_length': 3.9006410256410255, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3931849', 'n_tokens_mistral': 459, 'n_tokens_neox': 450, 'n_words': 148}