Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hello,
my trigger does not launch with this trigger even though variables VAR_A and VAR_B are set to 1 :
from dataiku.scenario import Trigger
import dataiku
PROJECT_ID = "RCU_V2"
client = dataiku.api_client()
project_handle = client.get_project(PROJECT_ID)
variables = project_handle.get_variables()
print(variables)
t = Trigger()
if variables['standard']['VAR_A'] == 1 & variables['standard']['VAR_B'] == 1:
t.fire()
Please use code blocks (</> icon) when you post Python code as otherwise we can't easily copy/paste your code to test (as Python requires strict identation). You should replace your & by and:
if variables['standard']['VAR_A'] == 1 and variables['standard']['VAR_B'] == 1:
t.fire()
https://www.geeksforgeeks.org/difference-between-and-and-in-python/
Please use code blocks (</> icon) when you post Python code as otherwise we can't easily copy/paste your code to test (as Python requires strict identation). You should replace your & by and:
if variables['standard']['VAR_A'] == 1 and variables['standard']['VAR_B'] == 1:
t.fire()
https://www.geeksforgeeks.org/difference-between-and-and-in-python/
Thank you for your reply !