TPD Error with Variables: Set_Variables - Object Reference not set to an instance of an object

I have an automation file that needs to get three parameters from the user: :FirstDate, :LastDate and :YourEmail. The job then runs four select to file jobs which are supposed to use the the FirstDate and LastDate to get activity counts for the date range. Then send an email with each of the results.

When I run the automation, I get an error stating "Set_Variables - Object Reference not set to an instance of an object. Object Reference not set to an instance of an object."

What am I doing wrong?

Each script is: SELECT CAST(TrxDate AS DATE), SUM(Revenue), COUNT(*) FROM MyTable1 WHERE TrxDate >= :FirstDate AND TrxDate<=:LastDate GROUP BY CAST(TrxDate AS DATE) ORDER BY CAST(TrxDate AS DATE) DESC;

Hard to say without seeing how you're trying to implement bind variables in your automation flow steps.

Having said that, TDP Automation jobs do support bind variables, but you may have to define them (using the Set Variable task) per below. In addition, dates are handles differently in different database platforms, so you may have to play with date casting functions. See snap below for an example, where I had to use a TO_DATE() casting function on Oracle. Hope this helps give you some ideas.