In Aginity, you can apply various parameters in the queries:
- To do so, insert the $symbol in any part of your SQL statement.
- When you execute a query, the application will ask you to fill in a parameter's value before sending a query to a database.
1 --sample parameter quer
3 select *
4 from landing_dim_customer
5 where gender = $fill_in_gender_at_runtime
6 limit 100;
- The application will provide you with the following data type at runtime:
Parameter Data Type
Aginity will send entered value exactly as written, with no casting. This feature often helps when you use a parameter to fill in the database table or column names.
- You can specify default values by using this syntax with your parameters:
When you run a query with all your parameters, you'll see the little gear icon as shown below. Click on it to populate the default value if needed.
🔎 Note: If you're using a column with the text format, please, keep in mind that you need to add ‘’ or “” symbols into the designated field in the Run query with parameters pop-up.