[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] transform syntax to build complex ads possible?



the GROUP_SORT_EXPR cannot beâ a classad, because it needs to evaluate to an integer
but the _expression_ can contain one or more classads as part of the _expression_

for example

> condor_status -limit 1 -af '[a=1;b=2]["a"]'
1
> condor_status -limit 1 -af '[a=1;b=2]["b"]'
2
> condor_status -limit 1 -af '[a=1;b=2]["c"]'
error

In the above [a=1;b=2] declares a classad,  and ["a"]  does a lookup within that classad for attribute a.
the result of evaluation will be 1

-tj

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Thomas Hartmann <thomas.hartmann@xxxxxxx>
Sent: Thursday, October 7, 2021 8:32 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] transform syntax to build complex ads possible?
 
Hi all,

is it actually possible, to write a a class ad in the new transform
syntax (i.e., w/o square brackets)?

AFAIS it is no macro/function/... where I can return a value, or?

Background is, that I would like to refactor a `GROUP_SORT_EXPR`, that
has grown over time into a forest of IfThenElse()'s.

If I get it correctly, a 'macro' in the []-syntax is effectively a
complex class ad. But I am not sure, if I can evaluate/set a new
transform-like _expression_ directly into an ad?

Cheers,
   Thomas