Hello, my name is Robert Pound, and I am a product technologist at Quest. This video will illustrate how to use parameters in Toad Data Point automation. I will show how these parameters can be used in queries, as well as other aspects of automation. What we see on screen is a query that we used in a previous video, talking about parameters, or variables, in queries in Toad Data Point. We will use this query using a select to file activity, so that we can send the data to our users.
Let me go ahead and switch over to an automation. I've already taken the liberty of filling in the email information, because I know that you don't want to see how painfully slow my typing is. But in any event, let's go ahead and choose the select to file activity. And let's move this around. And once I can get the activity selected, I'm going to go ahead and quickly just choose the SQL that we had run previously.
And we can see that it brings the SQL in, and we also have an error that pops up. There's a bind variable, but that's not set. So before, when we ran it in the editor itself, we could prompt users for an input, and then they would be able to enter in their value. In the case of automation, that can't happen automatically. We have to use the set variable.
And again, I'll move this up to the top. Now what we're going to do is create a variable that is exactly the same as this variable, myPop. I'm going to go ahead and do that first. And it was a number value. And let's make the default 1,000. And we want to make sure that we prompt users during the run.
So now the error has gone away here. And let's go ahead and name the export CountryToadExport. And, yeah, that's fine.
But you can see there's still an error with the email, and that's because we need a second value, and we're going to again prompt the user. And this is going to be userEmail. And let's do a default value of Toad@user.com.
So if we take a look at this, we have two values, and they're both going to be prompted. The first one is going to go into this filter for the SQL statement. The second one is going to go into the to line of the email, itself. You can see that when we dereference values, we have to use a pound sign on both sides of them, so that the email user that the user type said will actually appear here. And I went ahead and actually also used the MyPopulation value in the email itself, just for clarity as well. So again, I'm dereferencing it here.
And since I just created this, let me go ahead and attach this. So that way we actually have the data being sent to the users. So let me go ahead and run it. And we're asking for our values. Let's do something a little bit bigger. And let me type in my email address very quickly. And click OK.
So it's exported the data, and it has sent it via email. And as you can see, it's shown up in my inbox. It has the numbers that we entered in for the population. And the data's there, so we can go ahead and start searching through our data.
So now to publish it. We have our automation the way we want it. Let me go ahead and publish it to Toad Intelligence Central Server. This is obviously dependent on having Toad Data Point Pro and Toad Intelligence Central Server, as well as a connection established. And let's go ahead and call this CountryAutom.
Overwrite existing demo folder. Share with everyone, yes. Connections, default values. So if you want to change the default values to something other than what you used in the building of the automation, you can set here. And then I need to supply credentials that it will run under. I'm going to go ahead and use the default. And test run before you publish. Let me go ahead and publish it.
And we have success. I'm not going to look at the log now. But let me go ahead and switch computers. We can see that our CountryAutom automation was successfully uploaded. So from here, as a non-Toad user, I can do things like run this automation. And put in my values that I want to see. And enter in my email address.
And I can get this report even if I don't have Toad Data Point. And we get the indicator that the automation was run successfully. And let me go ahead and check my inbox. And yes, I do have a new email.
So that's all I had to share for today. I hope this video helped you understand a little bit more about parameters in automation. For more information on this product, visit www.quest.com/products/Toad-Data-Point. You can also check out the community-driven innovation going on at www.ToadWord.com. Thank you, and have a great day.