Often it's useful to let the calling SQL query pass a runtime argument to the SQL-MapReduce function in order to modify the behavior of the function. To support this, the API provides the useArgumentClause method for declaring argument clauses. An argument clause can contain multiple values, and a function can accept multiple argument clauses. See SQL-MapReduce Query Syntax for an explanation of how the SQL user passes multiple clauses and values.
You declare argument clauses when you declare your RuntimeContract, as shown here:
public final class MyFunction implements RowFunction { public MyFunction(RuntimeContract contract) { String mySingleValue = contract.useArgumentClause("mysingle").getSingleValue(); List<String> myMultipleValues = contract.useArgumentClause("mymultiple").getValues(); // ... } // ... }
After you’ve defined the argument clauses shown in the example above, the user of your SQL-MapReduce function can pass arguments in his SQL query like this:
SELECT ... FROM myfunction( ON mytable MYSINGLE ('some value') MYMULTIPLE ('a value', 'another value') );
See SQL-MapReduce Query Syntax to see this in the context of other select clauses.
SELECT * FROM GetUIDropDown( ON (SELECT 1) producttag(?) maxdropdownsize('500') clustersonly('0') );
Workaround: SSRS allows the use of report parameters. In SSRS, set the parameter so that it does not allow blank values (that is, uncheck the Allow blank values check box). This forces the sending of a string, which allows the SQL-MapReduce function to run with unnamed parameters.