Parameters can be used to store data source information, such as server and database names, file paths, filenames, and even input parameters to SQL stored procedures. With multiple queries leveraging the same M query parameter values, implementing changes, such as migrations from development or QA environments to production environments, becomes very straightforward.
Two examples of parameterized data sources are described in this recipe, including the server and database of an SQL Server database and the directory path and file name for an Excel workbook. Additionally, M query parameters are assigned to the input parameters of a SQL stored procedure.