Zum Inhalt springen

Diese Vergleichsmethoden stehen in Analyze-Ausdrücken zur Verfügung.

Kategorie     Ausdruck Struktur Beispiel Beschreibung
Allgemeine Verwendung > > table.column > 23 Größer als
Allgemeine Verwendung < < table.column < 23 Kleiner als
Allgemeine Verwendung >= >= table.column >= 23 Größer als oder gleich
Allgemeine Verwendung <= <= table.column <= 23 Kleiner als oder gleich
Allgemeine Verwendung == == table.column == 23 Gleich
Allgemeine Verwendung != != table.column != 23 Ungleich
Allgemeine Verwendung and_ and_() and_(table.a > 23, table.b == u’blue’)
Weitere Beispiele
Erstellt eine SQL-AND-Bedingung
Allgemeine Verwendung any_ any_() table.column.any((‘red’, ‘blue’, ‘yellow’)) Wendet die SQL-Bedingung ANY() auf eine Spalte an
Allgemeine Verwendung between between table.column.between(23, 46)

get_column(table, ‘LAST_CHANGED_DATE’).between({start_date}, {end_date})
Wendet die SQL-Bedingung BETWEEN an
Allgemeine Verwendung contains contains table.column.contains(‘mno’)

table.SOURCE_SYSTEM.contains(‘TEST’)
Wendet das SQL-LIKE ‘%%’ an
Allgemeine Verwendung endswith endswith table.column.endswith(‘xyz’)

table.Parent.endswith(‘:EBITX’)

table.PERIOD.endswith(“01”)
Wendet das SQL-LIKE ‘%%’ an
Allgemeine Verwendung FALSE FALSE FALSE False, false, FALSE – Alias für Python False
Allgemeine Verwendung ilike ilike table.column.ilike(‘%foobar%’) Wendet die SQL-Methode ILIKE an
Allgemeine Verwendung in_ in_() table.column.in_((1, 2, 3))

get_column(table, ‘Source Country’).in_([‘CN’,‘SG’,‘BR’])

table.MONTH.in_([‘01’,‘02’,‘03’,‘04’,‘05’,‘06’,‘07’,‘08’,‘09’])
Prüft, ob Werte in einem Tupel von Werten enthalten sind
Allgemeine Verwendung is_ is_ table.column.is_(None)

get_column(table, ‘Min SafetyStock’).is_(None)

get_column(table, ‘date_pod’).is_(None)
Wendet das SQL-IS an, etwa für IS NULL
Allgemeine Verwendung isnot isnot table.column.isnot(None) Wendet das SQL-IS an, etwa für IS NOT NULL
Allgemeine Verwendung like like table.column.like(‘%foobar%’)

table.SOURCE_SYSTEM.like(‘%Adjustments%’)
Wendet die SQL-Methode LIKE an
Allgemeine Verwendung not_ not_() not_(and_(table.a > 23, table.b == u’blue’)) Kehrt die Bedingung um
Allgemeine Verwendung notilike notilike table.column.notilike(‘%foobar%’) Wendet die SQL-Methode NOT ILIKE an
Allgemeine Verwendung notin notin table.column.notin((1, 2, 3))

table.LE.notin_([‘12345’,‘67890’])
Kehrt die IN-Bedingung um
Allgemeine Verwendung notlike notlike table.column.notlike(‘%foobar%’) Wendet die SQL-Methode NOT LIKE an
Allgemeine Verwendung NULL NULL NULL Null, null, NULL – Alias für Python None
Allgemeine Verwendung or_ or_() or_(table.a > 23, table.b == u’blue’)
Weitere Beispiele
Erstellt eine SQL-OR-Bedingung
Allgemeine Verwendung startswith startswith table.column.startswith(‘abc’)

get_column(table, ‘Zip Code’).startswith(‘9’)

get_column(table1, ‘GL Account’).startswith(‘CORP’)
Wendet das SQL-LIKE ‘%’ an
Allgemeine Verwendung TRUE TRUE TRUE True, true, TRUE – Alias für Python True
Mathematische Ausdrücke + + + Addition, z. B. 2+3=5
Mathematische Ausdrücke – – - Subtraktion, z. B. 2–3=-1
Mathematische Ausdrücke * * * Multiplikation, z. B. 2*3=6
Mathematische Ausdrücke / / / Division
Mathematische Ausdrücke column.op column.op(operator) column.op('%') Modulo (Rest), z. B. 5%4=1
Mathematische Ausdrücke column.op column.op(operator) column.op('^') Potenzierung, z. B. 2.0^3.0=8
Mathematische Ausdrücke column.op column.op(operator) column.op('!') Fakultät, z. B. 5!=120
Mathematische Ausdrücke column.op column.op(operator) column.op('&') bitweises UND, z. B. 91&15=11
Mathematische Ausdrücke column.op column.op(operator) column.op('#') bitweises XOR, z. B. 17 # 5=20
Mathematische Ausdrücke column.op column.op(operator) column.op('~') bitweises NOT, z. B. ~1=-2
Mathematische Ausdrücke column.op column.op(operator) column.op('&lt;&lt;') bitweise Linksverschiebung, z. B. 1<<4=16
Mathematische Ausdrücke column.op column.op(operator) column.op('>>') bitweise Rechtsverschiebung, z. B. 8>>2=2