Skip to main content

varianttests.run_live

LiveRunner Objects​

class LiveRunner()

log_completeness​

def log_completeness(files: list[str], scenario) -> LogCompleteness

Compare the entries in files (paths in the Meta lakehouseA place where you store both "raw" data (like files) and "organized" data (like tables). It combines the best of a File Cabinet and a Database.) with Meta.dbo.logging.

prune_logging​

def prune_logging(scenarios) -> None

De bewaartermijn, na afloop van de hele run.

Aan het eind appendt niets meer, dus deze DELETE kan met niemand botsen en niemand wacht erop. Hij wist alleen regels ouder dan de termijn: die van de vorige run blijven staan, want bij het uitzoeken van een rode uitslag zijn ze het eerste wat je nodig hebt.

dag​

def dag(scenario, dag_step) -> LoadOutcome

Run a DAG notebook as a Fabric job of its own, so it is the top-level run of its batch.

The job id is not the batch id, so the batch is found afterwards through the START line the DAG notebook logged, which also names its log folder. Besides the step's own checks ({batch_id} filled in), every dag step reports the log completeness of that folder and whether the folder is still there. A step with children also reports children_completed: how many of those notebooks have a Completed Fabric job since the DAG started, because a child such as Log_TableUpdater leaves no line in Meta.dbo.logging.

select_scenarios​

def select_scenarios(scenarios, wanted: set[str])

The scenarios to run, and the optional ones left out.

An optional scenario runs only when it is named; without names, it is reported as not run instead of silently missing from the total.

dax_probe​

def dax_probe(effective_user_name: str, model: str) -> int

Ask the notebook, as the service principal, to run DAX with impersonation.

The one thing documentation cannot answer: EffectiveUserName goes over XMLA, and whether the suite's service principal may impersonate there is a permission question about this tenant and this model. Reading DMVs already works from a notebook (DAG_Tabular does it), but that is a different right.

De workspace gaat mee bij naam, want zo wil het XMLA-endpoint hem: de URL is powerbi://api.powerbi.com/v1.0/myorg/<naam> en kent geen id. Precies daar liep sempy op stuk. Het kreeg van ons een id en ging de bijbehorende naam opzoeken via /v1.0/myorg/groups, vier keer 403 voor een service principal (build 1419, 1428, 1435, 1441), zonder ooit XMLA te bereiken. De naam staat in de configuratie, dus er valt niets op te zoeken.

Sinds build 1463 vraagt de probe ook naar het lidmaatschap van de rollen. Dat staat niet in de TMDL - getDefinition laat de members weg - maar de DMV's achter dezelfde XMLA-verbinding kennen ze wel. Of ze bij ons ook gevuld terugkomen is de vraag: er zijn meldingen van een lege TMSCHEMA_ROLE_MEMBERSHIPS terwijl de RLS gewoon werkt.

Deliberately not a scenario. It asserts nothing, touches no table and needs no reset; it prints what came back so a human can read it once and decide.