cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How can we Implement Conditional Logic on SQL Query Output in Job Workflow

vishesh_berera
New Contributor III

vishesh_berera_0-1755112079334.png

I'm trying to create a job where I define a get data task that executes a SQL query. After that, I want to apply conditional logic using an if-else task based on the query output. Specifically, I want to check each row individually—if a condition is met, perform one task; otherwise, perform a different task.

However, in the if-else task, I'm only able to access the first row of the SQL output using {{tasks.get_data.output.first_row.column_name}}. I want to iterate over all rows, similar to how it's done in Azure Data Factory using {{tasks.get_data.output.values}}. How can I achieve this?

 

#Datengineering

1 REPLY 1

BR_DatabricksAI
Contributor III

Hello, I believe the the fixed parameter option is exists and introduced recently in  lake flow declarative pipeline where you need to navigate to the configuration section and add parameters.

BR