Stored procedures are used to write once run anywhere technique that allows programmers to use the same definition of code with different parameters.
Follow the below steps to use stored procedures in tableau,
1. Connect to the database (Ex: MYSQL)
2. Once you connect to the database, you can see a list of tables and stored procedures in the database.
3. Drag the stored procedure that needs to be used and drop it in the sheet.
4. A parameter dialog box opens, you can either manually enter or use or create tableau parameters to give values dynamically.
5. Click ok.
For more information, visit this page,
Hope it helps!