Saltar para o conteúdo
BeryxTechBeryxTech
Voltar ao guia da aplicação

Documentação do BeryX

Regras

As regras de qualidade do workspace, que o scan avalia automaticamente e que abrem issues quando falham. Usa esta página para criar, editar, ativar ou apagar regras e para importar regras do dbt, Great Expectations, SodaCL ou ODCS.

O que podes fazer

  • Criar uma «Nova regra»: escolhe o dataset (ou todos), o tipo de regra (não nulo, único, padrão, intervalo, atualidade, mínimo de linhas, dígito de controlo, lista de referência ou regras de stream), a coluna, os limites e a severidade. Num dataset com catálogo, a coluna tem de estar nele; se é nova, corre um scan primeiro.
  • Escolher «Todos os datasets» (só administradores): a regra corre em cada dataset com essa coluna, incluindo os que surgirem depois, e os datasets sem a coluna ficam de fora sem falhar. Só o mínimo de linhas e a atualidade dispensam a coluna: o mínimo de linhas corre em todos e a atualidade nos datasets com datas. O «Último resultado» mostra o pior estado e em quantos datasets, como «Falhou em 2 de 5»; cada dataset que falha abre o seu problema. Um dataset que perde a coluna sai do «Último resultado» no scan seguinte, e o problema que tinha aberto fica aberto até o fechares. As regras de stream, SQL, de séries, de integridade referencial e de exatidão precisam de um dataset. Uma regra antiga sem coluna não corre até a editares e indicares a coluna. A regra própria de um dataset e a de todos correm ambas.
  • Ver, antes de gravar e se o dataset já tiver perfil, as estatísticas da coluna escolhida e uma estimativa de se a regra passaria ou falharia com o último perfil; numa regra nova, os limites vêm pré-preenchidos a partir dele.
  • Escrever, em «Porquê esta regra?», que decisão a regra protege e o que acontece ao negócio se falhar (até 500 caracteres). O porquê aparece na coluna «Porquê» da lista, no problema que a regra abre («Porque importa: …») e nos alertas por email, Slack e Teams. Com «Só as regras sem porquê», a lista mostra só as que ainda não o têm.
  • Ter o porquê preenchido sem o escrever: ao aceitar uma sugestão de um pack, a regra traz o porquê do pack; no import, o businessImpact do ODCS e a description do teste dbt passam para o porquê da regra. Se a regra já existir sem porquê, recebe o do ficheiro; um porquê que já lá esteja fica como está, e o do ficheiro, se for outro, aparece na lista do que ficou de fora.
  • Levar a regra num contrato ODCS: cada check escreve o porquê em businessImpact e uma frase sobre o que a regra verifica em description. A tolerância de uma regra de não nulo ou de padrão sai em percentagem (mustBeLessOrEqualTo, unit: percent) e os valores tratados como nulos saem em missingValues; o import lê-os de volta, e reimportar o contrato não duplica a regra. Com required: true e um check de nulos na mesma coluna, a regra é a do check.
  • Saber o que o contrato não leva: a atualidade sai em slaProperties, sem o porquê, e o intervalo e as regras SQL saem como check SQL, que o import traz de volta como a mesma regra. Não saem no contrato as listas de referência do registo, as regras de «Todos os datasets», as regras desativadas e as regras de segmento, de stream, de séries e de exatidão. O contrato que segue para o produtor leva menos: sem regras SQL, sem a chave única de várias colunas, sem a atualidade de uma coluna e sem a classificação.
  • Importar um contrato ODCS inteiro, com a versão dele e as regras ligadas a ela: no detalhe do dataset, separador «Contrato», «Importar contrato ODCS». Aqui, em «Importar (dbt/GX/Soda)», o mesmo ficheiro só cria as regras.
  • Ativar ou desativar uma regra no interruptor da coluna «Ativa», mudá-la com «Editar» ou removê-la com «Apagar» (deixa de ser avaliada nos próximos scans).
  • Criar uma «Nova regra de âmbito» para não repetir a mesma regra dataset a dataset: diz em que datasets (domínio, conexão, equipa, tag, schema ou nome da tabela com * e ?), que colunas (tipo semântico, termo do glossário, sensibilidade ou regex no nome) e que regra. Guardar cria um rascunho, e nada se aplica.
  • Usar «Ensaiar» para ver a lista do que a regra faria, dataset a dataset, e aprová-la. Desmarca os datasets que não a devem ter. A lista aprovada corre no worker, com o progresso no cartão da regra; se a lista mudou entretanto, o BeryX pede outro ensaio. Se parar a meio, o cartão diz quantas colunas faltam e «Continuar a lista» põe-na outra vez na fila. A partir da aprovação, uma tabela que entra no âmbito recebe a regra no scan seguinte, sozinha. Uma coluna nova num dataset que já existia fica «por aprovar» até ao ensaio seguinte. Uma regra de frescura numa tabela sem data também fica por aprovar, com o porquê.
  • Mudar uma regra de âmbito com «Alterar»: é outra versão, e a que está em vigor continua a valer até ensaiares e aprovares a nova. O tipo da regra fica fixo depois da primeira aprovação. O que uma lista aprovada retira só outra lista volta a ligar; uma coluna que deixou de parecer do tipo semântico continua com a regra. «Pausar» para a avaliação em todos os datasets e «Retomar» volta a ligá-la e continua a lista que a pausa cortou. «Arquivar» desliga-a de vez. Os resultados ficam sempre.
  • Ver os datasets cobertos com «Ver datasets» e «Desligar» a regra numa coluna (precisas de poder editar esse dataset). Também se desliga na página do dataset, mesmo a regra de um domínio que não vês. Uma regra com o selo «regra de âmbito» só se muda na regra de âmbito, e o selo leva à página do dataset; desligada, fica desativada e volta a ser do dataset. Um dataset que sai do âmbito fica com a regra desligada; se voltar, ela volta a ligar-se.
  • Saber quem pode e até onde: cria uma regra de âmbito quem edita o domínio escolhido, ou um membro se não houver domínio. Muda-a o dono, quem gere o domínio ou um administrador. Só entram na lista os datasets que podes editar, e os novos seguem o acesso de quem aprovou: se essa pessoa perder a conta ou o domínio, o cartão avisa e o dono recebe a tarefa «Reaprovar uma regra de âmbito». Há um teto de 20 colunas por regra num dataset, de 50 regras de âmbito num dataset e de 2000 por regra; o cartão diz quantas colunas ficaram de fora.
  • Contar com o que acontece aos problemas da regra: o próximo scan fecha os abertos de uma regra apagada ou desligada, com nota no histórico; com o fecho automático desligado, ficam abertos e a descrição avisa.
  • Importar regras com «Importar (dbt/GX/Soda)»: cola um schema.yml do dbt, uma suite Great Expectations, checks SodaCL ou um contrato ODCS, usa «Pré-visualizar» e depois «Importar»; as regras ligam-se aos datasets pelo nome da tabela. Uma regra sobre uma coluna que o catálogo do dataset não tem fica na lista do que ficou de fora, com o motivo, tal como um valor que a regra não guarda (uma data, um infinito ou um texto com caracteres inválidos), e cada regra importada entra na Auditoria como «Regra criada». Um ficheiro com um valor que o YAML ou o JSON não leem, como um número com milhares de dígitos, é recusado e nada se grava. No texto de um check SodaCL (row_count > …), esse número deixa de fora só esse check, com o motivo.
  • Ver o que falta numa regra cuja coluna saiu da tabela: o scan abre o problema «Coluna da regra … não encontrada», o «Último resultado» fica em «Falhou» com a coluna por baixo e a regra continua a contar no veredito. O problema fecha quando a coluna volta e a regra passa. Se a coluna voltar e a regra falhar, passa a dizer o que falhou.
  • Migrar do Informatica Data Quality ou do Collibra DQ: no mesmo diálogo, escolhe o formato e carrega o export das regras; a pré-visualização mostra o relatório de cobertura da migração, que se descarrega em CSV (como migrar).
  • Trazer as regras de qualidade do Microsoft Purview: no mesmo diálogo, escolhe «Microsoft Purview Data Quality (JSON)» e cola ou carrega o JSON da API; um administrador com a integração do Purview lê-as com «Ler as regras do Purview». O plano põe cada regra numa de três listas («Migradas», «Com revisão», «Sem equivalente»), que somam as regras lidas, com o score do Purview e o ensaio de cada proposta na fonte, só em leitura; os ativos que o Purview não deixou ler vêm à parte, com o motivo. Escolhe as que aprovas e carrega em «Importar»: só essas entram, e repetir não duplica, mesmo que tenhas editado a regra. «Descarregar a reconciliação (CSV)» guarda o relatório (o que converte).
  • Trazer os testes singulares do dbt: no formato dbt, carrega os ficheiros tests/*.sql (com o schema.yml e o manifest.json, se quiseres) e cada teste vira uma regra SQL só de leitura; o que não converte aparece na lista do que ficou de fora, com o motivo.
  • Carregar o ficheiro manifest.json em «manifest.json do dbt» para juntar a linhagem ao grafo, comparar os testes dbt com as tuas regras num relatório de gaps e trazer as descrições dos modelos para o catálogo; ao aplicar, as sugestões de regra que daí resultam aguardam aprovação nas Sugestões.
  • Seguir o selo «ajuste proposto» até às Sugestões, onde revês a recalibração do limite proposta a partir do histórico de resultados da regra.

Ver também

  • Packs de regras — regras curadas por indústria e por país, com o porquê de cada limite.
  • Sugestões — aceitar regras propostas e ajustes de limite.
  • Métodos — como o BeryX calcula cada número e recalibra os limiares.

English

Rules

The workspace's quality rules, which the scan evaluates automatically and which open issues when they fail. Use this page to create, edit, enable or delete rules and to import rules from dbt, Great Expectations, SodaCL or ODCS.

What you can do

  • Create a "New rule": choose the dataset (or all of them), the rule type (not null, unique, pattern, range, freshness, minimum row count, check digit, reference list or stream rules), the column, the thresholds and the severity. On a dataset with a catalog, the column has to be in it; if it is new, run a scan first.
  • Choose "All datasets" (admins only): the rule runs on every dataset with that column, including the ones that appear later, and datasets without the column are left out without failing. Only the minimum row count and freshness can go without a column: the minimum row count runs on all of them and freshness on the datasets with dates. "Last result" shows the worst state and on how many datasets, such as "Failed on 2 of 5"; each dataset that fails opens its own issue. A dataset that loses the column leaves "Last result" on the next scan, and the issue it had open stays open until you close it. Stream, SQL, series, referential integrity and accuracy rules need a dataset. An older rule without a column does not run until you edit it and set the column. A dataset's own rule and the one for all datasets both run.
  • See, before saving and if the dataset already has a profile, the chosen column's statistics and an estimate of whether the rule would pass or fail with the latest profile; for a new rule, the thresholds are pre-filled from it.
  • Write, under "Why this rule?", which decision the rule protects and what happens to the business if it fails (up to 500 characters). The why shows in the list's "Why" column, on the issue the rule opens and in the email, Slack and Teams alerts ("Why it matters: …"). With "Only rules without a why", the list shows only the rules that still lack one.
  • Get the why filled in without typing it: accepting a suggestion from a pack brings the pack's reasoning into the rule; on import, the ODCS businessImpact and the dbt test description become the rule's why. If the rule already exists without a why, it receives the one in the file; a why that is already there stays as it is, and the list of what was left out says so.
  • Carry the rule in an ODCS contract: each check writes the why in businessImpact and a sentence on what the rule checks in description. The tolerance of a not-null or pattern rule comes out as a percentage (mustBeLessOrEqualTo, unit: percent) and the values treated as null come out in missingValues; the import reads them back, and reimporting the contract does not duplicate the rule. With required: true and a null check on the same column, the rule is the check's.
  • Know what the contract leaves out: freshness comes out in slaProperties, without the why, and ranges and SQL rules come out as a SQL check, which the import brings back as the same rule. The contract does not carry reference lists from the registry, "All datasets" rules, disabled rules, or segment, stream, series and accuracy rules. The contract sent to the producer carries less: no SQL rules, no unique key over several columns, no column freshness and no classification.
  • Import a whole ODCS contract, with its version and the rules linked to it: in the dataset detail, "Contract" tab, "Import ODCS contract". Here, in "Import (dbt/GX/Soda)", the same file only creates the rules.
  • Enable or disable a rule with the switch in the "Active" column, change it with "Edit" or remove it with "Delete" (it is no longer evaluated in upcoming scans).
  • Create a "New scope rule" so you do not repeat the same rule dataset by dataset: say in which datasets (domain, connection, team, tag, schema or table name with * and ?), which columns (semantic type, glossary term, sensitivity or a regex on the name) and which rule. Saving creates a draft, and nothing applies.
  • Use "Rehearse" to see the list of what the rule would do, dataset by dataset, and approve it. Untick the datasets that should not have it. The approved list runs in the worker, with its progress on the rule's card; if the list changed meanwhile, BeryX asks for another rehearsal. After the approval, a table that enters the scope gets the rule in its next scan, on its own. A new column in a dataset that already existed stays "to approve" until the next rehearsal.
  • Change a scope rule with "Change": it is another version, and the one in force stays until you rehearse and approve the new one. The rule type is fixed after the first approval. "Pause" stops the evaluation on every dataset and "Resume" turns it back on. "Archive" turns it off for good. The results always stay.
  • See the covered datasets with "View datasets" and "Detach" the rule from a column (you need to be able to edit that dataset). A rule with the "scope rule" badge only changes in the scope rule; once detached, it is disabled and belongs to the dataset again. A dataset that leaves the scope has the rule turned off; if it comes back, the rule turns on again.
  • Know who can and how far: a scope rule is created by whoever edits the chosen domain, or by a member when there is no domain. It is changed by its owner, by whoever manages the domain or by an admin. The list only holds the datasets you can edit, and new ones follow the access of whoever approved. There is a cap of 20 columns per rule on a dataset, of 50 scope rules on a dataset and of 2000 per rule; the card says how many columns were left out.
  • Count on what happens to the rule's issues: the next scan closes the open issues of a deleted or disabled rule, with a note in the history; with automatic closing off, they stay open and the description says why.
  • Import rules with "Import (dbt/GX/Soda)": paste a dbt schema.yml, a Great Expectations suite, SodaCL checks or an ODCS contract, use "Preview" and then "Import"; the rules are linked to datasets by table name. A rule on a column the dataset's catalog does not have goes on the list of what was left out, with the reason, as does a value the rule cannot keep (a date, an infinity or text with invalid characters), and each imported rule enters the Audit trail as "Rule created".
  • See what is missing on a rule whose column left the table: the scan opens the issue "Column of rule … not found", "Last result" stays on "Failed" with the column underneath and the rule still counts in the verdict. The issue closes when the column returns and the rule passes. If the column returns and the rule fails, the issue changes to say what failed.
  • Migrate from Informatica Data Quality or Collibra DQ: in the same dialog, choose the format and upload the rules export; the preview shows the migration coverage report, which you can download as CSV (how to migrate).
  • Bring in the quality rules of Microsoft Purview: in the same dialog, choose "Microsoft Purview Data Quality (JSON)" and paste or upload the API's JSON; an admin with the Purview integration reads them with "Read the rules from Purview". The plan puts each rule in one of three lists ("Migrated", "With review", "No equivalent"), which add up to the rules read, with the Purview score and the rehearsal of each proposal at the source, read only; the assets Purview did not let BeryX read come apart, with the reason. Choose the ones you approve and use "Import": only those come in, and repeating does not duplicate, even if you edited the rule. "Download the reconciliation (CSV)" keeps the report (what it converts).
  • Bring in dbt singular tests: with the dbt format, upload the tests/*.sql files (with the schema.yml and the manifest.json, if you like) and each test becomes a read-only SQL rule; whatever does not convert shows up in the list of what was left out, with the reason.
  • Upload your manifest.json file under "dbt manifest.json" to add its lineage to the graph, compare dbt tests with your rules in a gap report and bring model descriptions into the catalogue; once applied, the resulting rule suggestions await approval in Suggestions.
  • Follow the "tuning proposed" badge to Suggestions, where you review the threshold recalibration proposed from the rule's result history.

See also

  • Rule packs — rules curated by industry and by country, with the reasoning behind each threshold.
  • Suggestions — accept proposed rules and threshold tunings.
  • Methods — how BeryX calculates each number, including threshold recalibration.