Ë
    èlÖiÞn  ã                   óš  — d dl mZ d dlmZmZmZmZmZmZ d dl	m
Z
 d dlmZmZmZ d dlmZmZ d dlmZmZ d dlmZ d dlmZmZmZmZmZmZmZmZm Z m!Z!  G d	„ d
ee   ee   «      Z" G d„ dee   ee   «      Z# G d„ dee   ee   «      Z$ G d„ dee   ee   «      Z% G d„ dee   ee   «      Z& G d„ dee   ee   «      Z'dedee(   fd„Z)y)é    )Údefaultdict)ÚDefaultDictÚDictÚGenericÚListÚSequenceÚSet)Úbucket)ÚMetricÚSemanticManifestÚSemanticManifestT)ÚMeasureReferenceÚMetricModelReference)ÚAggregationTypeÚDimensionType)ÚUniqueAndValidNameRule)
ÚFileContextÚMetricContextÚSemanticManifestValidationRuleÚSemanticModelElementContextÚSemanticModelElementReferenceÚSemanticModelElementTypeÚValidationErrorÚValidationIssueÚValidationWarningÚvalidate_safelyc                   óH   — e Zd ZdZe ed¬«      dedee   fd„«       «       Z	y)ÚSemanticModelMeasuresUniqueRulez6Asserts all measure names are unique across the model.zVrunning model validation ensuring measures exist in only one configured semantic model©Úwhats_being_doneÚsemantic_manifestÚreturnc                 óú  — g }t        t        «      }| j                  D ]Ú  }|j                  D ]É  }|j                  |v r‘|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                  ¬«      d|j                  › d||j                     › d�¬«      «       ||j                     j                  |j                  «       ŒË ŒÜ |S )N©Úmetadata©Úsemantic_model_nameÚelement_name©Úfile_contextÚsemantic_model_elementÚelement_typezFound measure with name z) in multiple semantic models with names (ú)©ÚcontextÚmessage)r   ÚlistÚsemantic_modelsÚmeasuresÚ	referenceÚappendr   r   r   Úfrom_metadatar%   r   Únamer   ÚMEASURE)r!   ÚissuesÚ%measure_references_to_semantic_modelsÚsemantic_modelÚmeasures        úq/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/dbt_semantic_interfaces/validations/measures.pyÚvalidate_manifestz1SemanticModelMeasuresUniqueRule.validate_manifest   sÿ   € ð
 )+ˆäNYÔZ^ÓN_Ð-Ø/×?Ñ?ò 	eˆNØ)×2Ñ2ò e�Ø×$Ñ$Ð(MÑMØ—M‘MÜ'Ü$?Ü-8×-FÑ-FÐP^×PgÑPgÔ-hÜ7TØ8F×8KÑ8KÐZa×ZfÑZfô8"ô .F×-MÑ-Mô%ð '?¸w¿|¹|¸nð M Ø EÀg×FWÑFWÑ XÐYÐYZð%\ô
ôð 6°g×6GÑ6GÑH×OÑOÐP^×PcÑPcÕdñeð	eð$ ˆó    N©
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústaticmethodr   r   r   r   r>   © r?   r=   r   r      s;   „ Ù@àÙØqôðÐ->ð À8ÈOÑC\ò óó ñr?   r   c            	       ó„   — e Zd ZdZe ed¬«      dededee	   fd„«       «       Z
e ed¬«      d	edee	   fd
„«       «       Zy)ÚMeasureConstraintAliasesRulez¿Checks that aliases are configured correctly for constrained measure references.

    These are, currently, only applicable for PydanticMetric types, since the MetricInputMeasure is only
    z/ensuring measures aliases are set when requiredr   ÚmetricÚmetric_contextr"   c                 óH  — g }t        | j                  «      t        t        | j                  «      «      k(  r|S t        | j                  d„ «      }|D ]È  }t        ||   «      }t        |«      dk(  rŒ t        |«      }t        |«      dk(  r4|j                  t        |d| j                  › d|› d|d   › d�¬«      «       Œm|D �cg c]  }|j                  €Œ|j                  �Œ|‘Œ  }}|sŒ™|j                  t        |d| j                  › d	|› d
|› d�¬«      «       ŒÊ |S c c}w )a¦  Checks if valid aliases are set on the input measure references where they are required.

        Aliases are required whenever there are 2 or more input measures with the same measure
        reference with different constraints. When this happens, we require aliases for all
        constrained measures for the sake of clarity. Any unconstrained measure does not
        need an alias, since it always relies on the original measure specification.

        At this time aliases are required for ratio metrics, but eventually we could relax that requirement
        if we can find an automatic aliasing scheme for numerator/denominator that we feel comfortable using.
        c                 ó   — | j                   S ©N©r7   )Úxs    r=   ú<lambda>zQMeasureConstraintAliasesRule._validate_required_aliases_are_set.<locals>.<lambda>V   s
   € ÈÏÉ€ r?   é   zPydanticMetric zB has multiple identical input measures specifications for measure zF. This might be hiding a semantic error. Input measure specification: r   ú.r.   z? depends on multiple different constrained versions of measure zy. In such cases, aliases must be provided, but the following input measures have constraints specified without an alias: )ÚlenÚmeasure_referencesÚsetr
   Úinput_measuresr1   r5   r   r7   ÚfilterÚaliasr   )	rI   rJ   r9   Úinput_measures_by_namer7   rV   Údistinct_input_measuresr<   Ú$constrained_measures_without_aliasess	            r=   Ú"_validate_required_aliases_are_setz?MeasureConstraintAliasesRule._validate_required_aliases_are_setB   s[  € ð )+ˆäˆv×(Ñ(Ó)¬S´°V×5NÑ5NÓ1OÓ-PÒPàˆMô "(¨×(=Ñ(=Ñ?OÓ!PÐØ*ò $	ˆDÜ!Ð"8¸Ñ">Ó?ˆNä�>Ó" aÒ'Øä&)¨.Ó&9Ð#ÜÐ*Ó+¨qÒ0ð —‘Ü%Ø .à-¨f¯k©k¨]ð ;'Ø'+ fÐ,rØ-¨aÑ0Ð1°ð4ôô	ð ð (6ö4Ø#¸¿¹Ñ9SÐX_×XeÑXeÑXm’ð4Ð0ð 4ò 4Ø—‘Ü#Ø .à-¨f¯k©k¨]ð ;'Ø'+ fð -UàCÐDÀAðGôõ
ð5$	ðL ˆùò!4s   ÃDÃDÃ"Dz2checking constrained measures are aliased properlyr!   c                 óT  — g }t        | «      }t        t        «      }| j                  D �]v  }t	        t        j                  |j                  ¬«      t        |j                  ¬«      ¬«      }|t        j                  ||¬«      z  }|j                  D �cg c]  }|j                  €Œ|‘Œ }}|D ]ï  }|j                  sJ d«       ‚|t        j                  |j                  |«      z  }|j                  |v r7|j!                  t#        |d|j                  › d|j                  › d�¬	«      «       |j                  |v r<|j!                  t#        |d
|j                  › d|› d||j                     › �¬	«      «       ||j                     j!                  |j                  «       Œñ �Œy |S c c}w )a  Ensures measures that might need an alias have one set, and that the alias is distinct.

        We do not allow aliases to collide with other alias or measure names, since that could create
        ambiguity at query time or cause issues if users ever restructure their models.
        r$   ©Úmetric_name©r*   rI   )rI   rJ   zEType refinement assertion, previous filter should ensure this is truezAlias `z` for measure `z�` conflicts with measure names defined elsewhere in the model! This can cause ambiguity for certain types of query. Please choose another alias.r.   zMeasure alias a   conflicts with a measure alias used elsewhere in the model! This can cause ambiguity for certain types of query. Please choose another alias, or, if the measures are constrained in the same way, consider centralizing that definition in a new semantic model. Measure specification: z1. Existing metrics with that measure alias used: )Ú)_get_measure_names_from_semantic_manifestr   r1   Úmetricsr   r   r6   r%   r   r7   rH   r\   rV   rX   r   Úcheck_valid_namer5   r   )	r!   r9   Úmeasure_namesÚmeasure_alias_to_metricsrI   rJ   Úinput_measureÚaliased_measuresr<   s	            r=   r>   z.MeasureConstraintAliasesRule.validate_manifest   sÄ  € ð )+ˆäAÐBSÓTˆÜ@KÌDÓ@QÐ Ø'×/Ñ/ó *	LˆFÜ*Ü(×6Ñ6ÀÇÁÔPÜ+¸¿¹ÔDôˆNð
 Ô2×UÑUØ¨nð Vó ñ ˆFð
 4:×3HÑ3Hö Ø"/ÈM×L_ÑL_ÑLk’ð Ðð  ð ,ò L�Ø—}’}ÐmÐ&mÓm�}ØÔ0×AÑAÀ'Ç-Á-ÐQ_Ó`Ñ`�Ø—=‘= MÑ1Ø—M‘MÜ'Ø$2à")¨'¯-©-¨¸ÈÏÉÀ~ð VFð !Gôô	ð —=‘=Ð$<Ñ<Ø—M‘MÜ'Ø$2à"0°·±°ð @cð dkÐbkð lIØIaÐbi×boÑboÑIpÐHqð	!sô	ôð )¨¯©Ñ7×>Ñ>¸v¿{¹{ÕKò9Lð*	LðX ˆùòE s   ÂF%Â&F%N)rA   rB   rC   rD   rE   r   r   r   r   r   r\   r   r>   rF   r?   r=   rH   rH   <   s~   „ ñð
 ÙÐ&WÔXð9°6ð 9È=ð 9Ð]eÐfuÑ]vò 9ó Yó ð9ðv ÙÐ&ZÔ[ð6Ð->ð 6À8ÈOÑC\ò 6ó \ó ñ6r?   rH   c            	       óŠ   — e Zd ZdZe ed¬«      dedee   de	e
   fd„«       «       Ze ed¬«      d	ede	e
   fd
„«       «       Zy)ÚMetricMeasuresRulez9Checks that the measures referenced in the metrics exist.z4checking all measures referenced by the metric existr   rI   Úvalid_measure_namesr"   c                 ó2  — g }| j                   D ]…  }|j                  |vsŒ|j                  t        t	        t        j                  | j                  ¬«      t        | j                  ¬«      ¬«      d|j                  › d| j                  › d�¬«      «       Œ‡ |S )Nr$   r^   r`   zMeasure z referenced in metric z is not defined in the model!r.   )
rT   r(   r5   r   r   r   r6   r%   r   r7   )rI   rj   r9   Úmeasure_references       r=   Ú#_validate_metric_measure_referencesz6MetricMeasuresRule._validate_metric_measure_references½   sš   € ð )+ˆà!'×!:Ñ!:ò 	ÐØ ×-Ñ-Ð5HÒHØ—‘Ü#Ü -Ü)4×)BÑ)BÈFÏOÉOÔ)\Ü#7ÀFÇKÁKÔ#Pô!ð
 'Ð'8×'EÑ'EÐ&FÐF\Ð]c×]hÑ]hÐ\ið j4ð 5ô	õð	ð ˆr?   z7running model validation ensuring metric measures existr!   c                 ó~   — g }t        | «      }| j                  xs g D ]  }|t        j                  ||¬«      z  }Œ |S )N)rI   rj   )ra   rb   ri   rm   )r!   r9   rj   rI   s       r=   r>   z$MetricMeasuresRule.validate_manifestÒ   sZ   € ð )+ˆÜGÐHYÓZÐà'×/Ñ/Ò5°2ò 	ˆFØÔ(×LÑLØÐ3Fð Mó ñ ‰Fð	ð ˆr?   N)rA   rB   rC   rD   rE   r   r   r	   Ústrr   r   rm   r   r>   rF   r?   r=   ri   ri   º   s€   „ ÙCàÙÐ&\Ô]ð°Fð ÐQTÐUXÑQYð Ð^fÐgvÑ^wò ó ^ó ðð& ÙÐ&_Ô`ðÐ->ð À8ÈOÑC\ò ó aó ñr?   ri   c                   óH   — e Zd ZdZe ed¬«      dedee   fd„«       «       Z	y)Ú MeasuresNonAdditiveDimensionRulezGChecks that the measure's non_additive_dimensions are properly defined.z:ensuring that a measure's non_additive_dimensions is validr   r!   r"   c                 óÈ
  ‡
‡— g }| j                   xs g D �]D  }|j                  D �]1  }|j                  Š‰€Œ|j                  |j                  «      Š
t        ˆ
fd„|j                  D «       d «      }|€œ|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                   ¬«      d|j                  › d‰
j"                  › d|j                  › d�¬	«      «       Œët        ˆfd
„|j                  D «       d «      }|€›|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                   ¬«      d|j                  › d‰j                  › d|j                  › d�¬	«      «       |�rÏ|j$                  t&        j(                  k7  rŽ|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                   ¬«      d|j                  › d‰j                  › d�¬	«      «       |j*                  �r|j*                  �r
|j*                  j,                  |j*                  j,                  k7  rÝ|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                   ¬«      d|j                  › d‰j                  › d|j*                  j,                  j                  › d|j                  › d|j*                  j,                  j                  › d�¬	«      «       ‰j.                  t0        j2                  t0        j4                  hvr˜|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                   ¬«      d|j                  › d‰j.                  j6                  › d�¬	«      «       |j8                  D �ch c]  }|j                  ’Œ }}t;        ‰j<                  «      }|j?                  |«      }	tA        |	«      tA        |«      k7  s�ŒŸ|j                  t        t        t        j                  |j                  ¬«      t        |j                  |j                  ¬«      t        j                   ¬«      d|j                  › d|jC                  |	«      › d�¬	«      «       �Œ4 �ŒG |S c c}w )Nc              3   óV   •K  — | ]   }‰j                   |j                  k(  sŒ|–— Œ" y ­wrM   )r(   r7   )Ú.0ÚdimÚagg_time_dimension_references     €r=   ú	<genexpr>zEMeasuresNonAdditiveDimensionRule.validate_manifest.<locals>.<genexpr>í   s&   øè ø€ Òw˜SÐA]×AjÑAjÐnq×nvÑnvÓAv”SÑwùó   ƒ)¢)r$   r&   r)   ú	Measure 'z' has a agg_time_dimension of z7 that is not defined as a dimension in semantic model 'z'.r.   c              3   óV   •K  — | ]   }‰j                   |j                   k(  sŒ|–— Œ" y ­wrM   rN   )rt   ru   Únon_additive_dimensions     €r=   rw   zEMeasuresNonAdditiveDimensionRule.validate_manifest.<locals>.<genexpr>  s&   øè ø€ Òi˜SÐAW×A\ÑA\Ð`c×`hÑ`hÓAh”SÑiùrx   z*' has a non_additive_dimension with name 'z8' that is not defined as a dimension in semantic model 'z)' has a non_additive_dimension with name'zD' that is defined as a categorical dimension which is not supported.z$' that has a base time granularity (z8) that is not equal to the measure's agg_time_dimension z with a base granularity of (z).zC' has a non_additive_dimension with an invalid 'window_choice' of 'z-'. Only choices supported are 'min' or 'max'.zR' has a non_additive_dimension with an invalid 'window_groupings'. These entities z$ do not exist in the semantic model.)"r2   r3   r{   Ú&checked_agg_time_dimension_for_measurer4   ÚnextÚ
dimensionsr5   r   r   r   r6   r%   r   r7   r   r8   r(   Útyper   ÚTIMEÚtype_paramsÚtime_granularityÚwindow_choicer   ÚMINÚMAXÚvalueÚentitiesrU   Úwindow_groupingsÚintersectionrS   Ú
difference)r!   r9   r;   r<   Úagg_time_dimensionÚmatching_dimensionÚentityÚentities_in_semantic_modelrˆ   Úintersected_entitiesrv   r{   s             @@r=   r>   z2MeasuresNonAdditiveDimensionRule.validate_manifestâ   s  ù€ ð )+ˆØ/×?Ñ?ÒEÀ2ó L	ˆNØ)×2Ñ2ó K�Ø)0×)GÑ)GÐ&Ø)Ð1ØØ/=×/dÑ/dÐel×evÑevÓ/wÐ,Ü%)Ûw N×$=Ñ$=ÔwØó&Ð"ð &Ð-à—M‘MÜ'Ü$?Ü-8×-FÑ-FÐP^×PgÑPgÔ-hÜ7TØ8F×8KÑ8KÐZa×ZfÑZfô8"ô .F×-MÑ-Mô%ð #,¨G¯L©L¨>Ð9WØ#?×#LÑ#LÐ"Mð NYØYg×YlÑYlÐXmÐmoð!qôôð  ô &*Ûi N×$=Ñ$=ÔiÐkoó&Ð"ð &Ð-Ø—M‘MÜ'Ü$?Ü-8×-FÑ-FÐP^×PgÑPgÔ-hÜ7TØ8F×8KÑ8KÐZa×ZfÑZfô8"ô .F×-MÑ-Mô%ð #,¨G¯L©L¨>ð :$Ø$:×$?Ñ$?Ð#@ð A*Ø*8×*=Ñ*=Ð)>¸bð!Bôôò  &à)×.Ñ.´-×2DÑ2DÒDØŸ™Ü+Ü(CÜ1<×1JÑ1JÐTb×TkÑTkÔ1lÜ;XØ<J×<OÑ<OÐ^e×^jÑ^jô<&ô 2J×1QÑ1Qô)"ð '0°·±¨~ð >(Ø(>×(CÑ(CÐ'Dð Eið%jôôð( +×6Ó6Ø.×:Ó:à.×:Ñ:×KÑKØ1×=Ñ=×NÑNòOð Ÿ™Ü+Ü(CÜ1<×1JÑ1JÐTb×TkÑTkÔ1lÜ;XØ<J×<OÑ<OÐ^e×^jÑ^jô<&ô 2J×1QÑ1Qô)"ð '0°·±¨~ð >(Ø(>×(CÑ(CÐ'Dð E(Ø(:×(FÑ(F×(WÑ(W×(\Ñ(\Ð']ð ^HØHZ×H_ÑH_ÐG`ð a7Ø7I×7UÑ7U×7fÑ7f×7kÑ7kÐ6lÐlnð	%pôôð( *×7Ñ7Ä×@SÑ@SÔUd×UhÑUhÐ?iÑiØ—M‘MÜ'Ü$?Ü-8×-FÑ-FÐP^×PgÑPgÔ-hÜ7TØ8F×8KÑ8KÐZa×ZfÑZfô8"ô .F×-MÑ-Mô%ð #,¨G¯L©L¨>ð :7Ø7M×7[Ñ7[×7aÑ7aÐ6bð cMð!Nôôð$ IW×H_ÑH_Ö-`¸f¨f¯k«kÐ-`Ð*Ð-`Ü#&Ð'=×'NÑ'NÓ#OÐ Ø'7×'DÑ'DÐE_Ó'`Ð$ÜÐ+Ó,´Ð4DÓ0EÔEØ—M‘MÜ'Ü$?Ü-8×-FÑ-FÐP^×PgÑPgÔ-hÜ7TØ8F×8KÑ8KÐZa×ZfÑZfô8"ô .F×-MÑ-Mô%ð #,¨G¯L©L¨>ð :Fà#3×#>Ñ#>Ð?SÓ#TÐ"Uð V2ð!2ôöòwKðL	ð\ ˆùò- .as   Ñ0UNr@   rF   r?   r=   rq   rq   ß   s>   „ ÙQàÙÐ&bÔcðPÐ->ð PÀ8ÈOÑC\ò Pó dó ñPr?   rq   c                   óH   — e Zd ZdZe ed¬«      dedee   fd„«       «       Z	y)ÚCountAggregationExprRulez1Checks that COUNT measures have an expr provided.zPrunning model validation ensuring expr exist for measures with count aggregationr   r!   r"   c                 ó$  — g }| j                   D �]}  }|j                  D �]j  }t        t        j                  |j
                  ¬«      t        |j                  |j                  ¬«      t        j                  ¬«      }|j                  t        j                  k(  r6|j                  €*|j                  t        |d|j                  › d�¬«      «       |j                  t        j                  k(  sŒÎ|j                  sŒÛ|j                  j!                  «       j#                  d«      s�Œ|j                  t        |d|j                  › d|j                  j$                  › d	|j                  › d
|j                  j$                  › d�	¬«      «       �Œm �Œ€ |S )Nr$   r&   r)   ry   zw' uses a COUNT aggregation, which requires an expr to be provided. Provide 'expr: 1' if a count of all rows is desired.r.   z	distinct z
' uses a 'z%' aggregation with a DISTINCT expr: 'z±. This is not supported as it effectively converts an additive measure into a non-additive one, and this could cause certain queries to return incorrect results. Please use the z_distinct aggregation type.)r2   r3   r   r   r6   r%   r   r7   r   r8   Úaggr   ÚCOUNTÚexprr5   r   ÚlowerÚ
startswithr†   )r!   r9   r;   r<   r/   s        r=   r>   z*CountAggregationExprRule.validate_manifestz  s_  € ð
 )+ˆà/×?Ñ?ó %	ˆNØ)×2Ñ2ó $�Ü5Ü!,×!:Ñ!:ÀN×D[ÑD[Ô!\Ü+HØ,:×,?Ñ,?ÈgÏlÉlô,ô ":×!AÑ!Aô�ð —;‘;¤/×"7Ñ"7Ò7¸G¿L¹LÐ<PØ—M‘MÜ'Ø$+à"+¨G¯L©L¨>ð :að !aôôð —K‘K¤?×#8Ñ#8Ó8ØŸ›ØŸ™×*Ñ*Ó,×7Ñ7¸ÖDð
 —M‘MÜ'Ø$+à"+¨G¯L©L¨>¸ÀGÇKÁK×DUÑDUÐCVð W*Ø*1¯,©,¨ð 8EàELÇ[Á[×EVÑEVÐDWÐWrð!tôö
ò5$ð%	ðL ˆr?   Nr@   rF   r?   r=   r‘   r‘   w  s;   „ Ù;àÙØkôð)Ð->ð )À8ÈOÑC\ò )óó ñ)r?   r‘   c                   óH   — e Zd ZdZe ed¬«      dedee   fd„«       «       Z	y)ÚPercentileAggregationRulezYChecks that only PERCENTILE measures have agg_params and valid percentile value provided.zprunning model validation ensuring the agg_params.percentile value exist for measures with percentile aggregationr   r!   r"   c                 óÂ  — g }| j                   D �]L  }|j                  D �]9  }t        t        j                  |j
                  ¬«      t        |j                  |j                  ¬«      t        j                  ¬«      }|j                  t        j                  k(  rÃ|j                  �|j                  j                  €+|j                  t!        |d|j                  › d�¬«      «       ŒÇ|j                  j                  dk  s|j                  j                  dk\  sŒú|j                  t!        |d	|j                  › d
|j                  j                  › d�¬«      «       �Œ=|j                  t        j"                  k(  rÂ|j                  s�Œh|j                  j                  �Z|j                  j                  dk7  rA|j                  t!        |d|j                  › d|j                  j                  › d�¬«      «       |j                  j$                  s�Œð|j                  t!        |d|j                  › d�¬«      «       �Œ|j                  s�Œ*|j                  j                  s.|j                  j$                  s|j                  j&                  s�Œng }|j                  j                  r|j                  d«       |j                  j$                  r|j                  d«       |j                  j&                  r|j                  d«       dj)                  |«      }|j                  t!        |d|j                  › d|j                  j*                  › d|› d�¬«      «       �Œ< �ŒO |S )Nr$   r&   r)   ry   zU' uses a PERCENTILE aggregation, which requires agg_params.percentile to be provided.r.   r   rQ   z.Percentile aggregation parameter for measure 'z' is 'zÓ', but must be between 0 and 1 (non-inclusive). For example, to indicate the 65th percentile value, set 'percentile: 0.65'. For percentile values of 0, please use MIN, for percentile values of 1, please use MAX.g      à?z9' uses a MEDIAN aggregation, while percentile is set to 'zD', a conflicting value. Please remove the parameter or set to '0.5'.zw' uses a MEDIAN aggregation, while use_discrete_percentile is set to true. Please remove the parameter or set to False.Ú
percentileÚuse_discrete_percentileÚuse_approximate_percentilez, z' with aggregation 'z' uses agg_params (z') only relevant to Percentile measures.)r2   r3   r   r   r6   r%   r   r7   r   r8   r“   r   Ú
PERCENTILEÚ
agg_paramsr›   r5   r   ÚMEDIANrœ   r�   Újoinr†   )r!   r9   r;   r<   r/   Úwrong_paramsÚwrong_params_strs          r=   r>   z+PercentileAggregationRule.validate_manifest­  s  € ð )+ˆà/×?Ñ?ó L	ˆNØ)×2Ñ2ó K�Ü5Ü!,×!:Ñ!:ÀN×D[ÑD[Ô!\Ü+HØ,:×,?Ñ,?ÈgÏlÉlô,ô ":×!AÑ!Aô�ð —;‘;¤/×"<Ñ"<Ò<Ø×)Ñ)Ð1°W×5GÑ5G×5RÑ5RÐ5ZØŸ™Ü+Ø(/à&/°·±¨~ð >Lð %Lôõð !×+Ñ+×6Ñ6¸!Ò;¸w×?QÑ?Q×?\Ñ?\Ð`aÓ?aØŸ™Ü+Ø(/à&TÐU\×UaÑUaÐTbð c(Ø(/×(:Ñ(:×(EÑ(EÐ'Fð G/ð%/ô	öð —[‘[¤O×$:Ñ$:Ò:Ø×)Ô)Ø"×-Ñ-×8Ñ8ÐDÈ×I[ÑI[×IfÑIfÐjmÒImØ"ŸM™MÜ /Ø,3Ø.7¸¿¹°~ð F/Ø/6×/AÑ/A×/LÑ/LÐ.Mð NEð-Eô!"ôð #×-Ñ-×EÔEØ"ŸM™MÜ /Ø,3Ø.7¸¿¹°~ð F0ð -0ô!"öð ×'Ô'Ø×&Ñ&×1Ò1Ø×)Ñ)×AÒAØ×)Ñ)×DÔDà#%�LØ×)Ñ)×4Ò4Ø$×+Ñ+¨LÔ9Ø×)Ñ)×AÒAØ$×+Ñ+Ð,EÔFØ×)Ñ)×DÒDØ$×+Ñ+Ð,HÔIà'+§y¡y°Ó'>Ð$à—M‘MÜ'Ø$+à"+¨G¯L©L¨>Ð9MÈgÏkÉk×N_ÑN_ÐM`ð a$Ø$4Ð#5Ð5\ð!^ôöòGKðL	ðZ ˆr?   Nr@   rF   r?   r=   r™   r™   ª  sA   „ ÙcàÙð!ôðPÐ->ð PÀ8ÈOÑC\ò Pó	ó ñ
Pr?   r™   r!   r"   c                 ó¨   — t        «       }| j                  D ]8  }|j                  D ]'  }|j                  |j                  j
                  «       Œ) Œ: |S )z:Return every distinct measure name specified in the model.)rU   r2   r3   Úaddr4   r(   )r!   rd   r;   r<   s       r=   ra   ra     sU   € ä“E€MØ+×;Ñ;ò >ˆØ%×.Ñ.ò 	>ˆGØ×Ñ˜g×/Ñ/×<Ñ<Õ=ñ	>ð>ð Ðr?   N)*Úcollectionsr   Útypingr   r   r   r   r   r	   Úmore_itertoolsr
   Ú!dbt_semantic_interfaces.protocolsr   r   r   Ú"dbt_semantic_interfaces.referencesr   r   Ú"dbt_semantic_interfaces.type_enumsr   r   Ú5dbt_semantic_interfaces.validations.unique_valid_namer   Ú5dbt_semantic_interfaces.validations.validator_helpersr   r   r   r   r   r   r   r   r   r   r   rH   ri   rq   r‘   r™   ro   ra   rF   r?   r=   ú<module>r®      s  ðÝ #ß B× Bå !÷ñ ÷
 Vß MÝ X÷÷ ÷ ôÐ&DÐEVÑ&WÐY`ÐarÑYsô ô@{Ð#AÐBSÑ#TÐV]Ð^oÑVpô {ô|"Ð7Ð8IÑJÈGÐTeÑLfô "ôJUÐ'EÐFWÑ'XÐZaÐbsÑZtô Uôp0Ð=Ð>OÑPÐRYÐZkÑRlô 0ôfXÐ >Ð?PÑ QÐSZÐ[lÑSmô XðvÐAQð ÐVYÐZ]ÑV^ô r?   