{"id":79563,"date":"2018-07-05T10:57:21","date_gmt":"2018-07-05T10:57:21","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=79563"},"modified":"2021-09-15T13:22:14","modified_gmt":"2021-09-15T13:22:14","slug":"power-bi-introduction-working-with-parameters-in-power-bi-desktop-part-4","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/sql-server\/bi-sql-server\/power-bi-introduction-working-with-parameters-in-power-bi-desktop-part-4\/","title":{"rendered":"Power BI Introduction: Working with Parameters in Power BI Desktop \u2014Part 4"},"content":{"rendered":"<p><strong>The series so far:<\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-part-1-introduction\/\">Power BI Introduction: Tour of Power BI \u2014 Part 1<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-working-with-power-bi-desktop-part-2\/\">Power BI Introduction: Working with Power BI Desktop \u2014 Part 2<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-working-with-r-scripts-in-power-bi-desktop-part-3\/\">Power BI Introduction: Working with R Scripts in Power BI Desktop \u2014 Part 3<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-working-with-parameters-in-power-bi-desktop-part-4\/\">Power BI Introduction: Working with Parameters in Power BI Desktop \u2014 Part 4<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-working-with-sql-server-data-in-power-bi-desktop-part-5\/\">Power BI Introduction:\u00a0Working with SQL Server data in Power BI Desktop \u2014 Part 5<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/homepage\/power-bi-introduction-power-query-m-formula-language-in-power-bi-desktop-part-6\/\">Power BI Introduction:\u00a0Power Query M Formula Language in Power BI Desktop \u2014 Part 6<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-building-reports-in-power-bi-desktop-part-7\/\">Power BI Introduction: Building Reports in Power BI Desktop \u2014 Part 7<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-publishing-reports-to-the-power-bi-service-part-8\/\">Power BI Introduction: Publishing Reports to the Power BI Service \u2014 Part 8<\/a><\/li>\n<li><a href=\"https:\/\/www.red-gate.com\/simple-talk\/sql\/bi\/power-bi-introduction-visualizing-sql-server-audit-data-part-9\/\">Power BI Introduction: Visualizing SQL Server Audit Data \u2014 Part 9<\/a><\/li>\n<\/ol>\n\n<p>Power BI Desktop, the downloadable application that supports the Power BI service, lets you define parameters that you can use in various ways when working with datasets. The parameters are easy to create and can be incorporated into the import process or later to refine a dataset or add dynamic elements. For example, you can create parameters that supply connection information to a data source or that provide predefined values for filtering data.<\/p>\n<p>This article demonstrates how to create a set of parameters to use with data imported from a local SQL Server instance. The examples are based on data from the <em>AdventureWorks2017<\/em> database, but you can use an earlier version of the database or whatever database you choose, as long as the returned data follows a structure similar to what is used here. Just be sure to update the parameter values accordingly as you work through the article.<\/p>\n<h2>Adding Connection-Specific Parameters<\/h2>\n<p>Some data source connections in Power BI Desktop\u2014such as SharePoint, Salesforce Objects, and SQL Server\u2014let you use parameters when defining the connection properties. For example, if retrieving data from SQL Server, you can use a parameter for the SQL Server instance and a parameter for the target database.<\/p>\n<p>Because parameters are independent of any datasets, you can create them before adding a dataset or at any time after creating your datasets. However, you must define them and set their initial values in Query Editor. The parameters you create are listed in the <em>Queries<\/em> pane, where you can view and update their values, as well as reconfigure their settings.<\/p>\n<p>In this article, you will create two connection parameters for retrieving data from a SQL Server database. The first parameter will include a list of SQL Server instances that could host the source data. (Only one instance needs to work in this case. The rest can be for demonstration purposes only.)<\/p>\n<p>To create the parameter, open Query Editor, click the <em>Manage Parameters<\/em> down arrow on the <em>Home<\/em> ribbon, and then click <em>New Parameter<\/em>. In the <em>Parameters<\/em> dialog box, type <em>SqlSrvInstance<\/em> in the <em>Name<\/em> text box, and then type a parameter description in the <em>Description<\/em> text box.<\/p>\n<p>From the <em>Type<\/em> drop-down list, select <em>Text,<\/em> and from the <em>Suggested Values<\/em> drop-down list, select <em>List of values<\/em>. When you select the <em>List of values<\/em> option, a grid appears, where you type in the individual values you want to assign to the variable, as shown in the following figure. Be sure that at least one of those values is the name of an actual SQL Server instance.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"666\" class=\"wp-image-79564\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image.png\" \/><\/p>\n<p>After you type the list of values, select a default value from the <em>Default Value<\/em> drop-down list and then select the variable\u2019s current value from the <em>Current Value<\/em> drop-down list. In the figure above, a local SQL Server instance named <em>SqlSrv17a<\/em> is used for both the default and current values.<\/p>\n<p>Click <em>OK<\/em> to close the <em>Parameters<\/em> dialog box<em>.<\/em> Query Editor adds the parameter to the <em>Queries<\/em> pane, with the current value shown in parentheses. When you select the parameter, Query Editor displays the <em>Current Value<\/em> drop-down list and the <em>Manage Parameter<\/em> button in the main pane, as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"208\" class=\"wp-image-79565\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-1.png\" \/><\/p>\n<p>You can change the current value at any time by selecting a different one from the <em>Current Value<\/em> drop-down list, or you can change the parameter\u2019s settings by clicking the <em>Manage Parameter<\/em> button, which returns you to the <em>Parameters<\/em> dialog box.<\/p>\n<p>To create the parameter for the target database, repeat the process, but name the parameter <em>Database,<\/em> as shown in the following figure. Be sure to provide at least one valid database in your list of databases. When you click <em>OK,<\/em> Query Editor adds the parameter to the <em>Queries<\/em> pane, just like it did for the <em>SqlSrvInstance<\/em> parameter.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"664\" class=\"wp-image-79566\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-2.png\" \/><\/p>\n<p>That\u2019s all there is to creating the connection parameters. You can also configure parameters with different data types, such as decimals or dates, or with different value formats. For example, you can configure the parameter to accept any value or to use values from a <em>list query,<\/em> a type of query that contains only one column. You can create a list query manually by using an M statement, or you can create a list query based on a regular dataset, although this approach still seems somewhat buggy. For this article, you\u2019ll stick with lists, but know you have other options.<\/p>\n<h2>Using Parameters to Connect to a Data Source<\/h2>\n<p>With your parameters defined, you\u2019re ready to connect to the SQL Server instance and retrieve data from the target database. If you haven\u2019t already done so, apply your changes in Query Editor and close the window.<\/p>\n<p>For this exercise, you will be running a T-SQL query, but before you try to do this, verify that the <em>Require user approval for new native database queries<\/em> property is disabled. If it is enabled, you will receive an error when trying to run the query. To access the property, click the <em>File<\/em> menu, point to <em>Options and settings,<\/em> and then click <em>Options<\/em>. In the <em>Options<\/em> dialog box, go to the <em>Security<\/em> category, clear the property\u2019s checkbox if selected, and click <em>OK<\/em>.<\/p>\n<p>Then, in the main Power BI Desktop window, go to <em>Data<\/em> view and click <em>Get Data<\/em> on the <em>Home<\/em> ribbon. In the <em>Get Data<\/em> dialog box, navigate to the <em>Database<\/em> connections and select <em>SQL Server database,<\/em> as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"678\" class=\"wp-image-79567\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-3.png\" \/><\/p>\n<p>When you click the <em>Connect<\/em> button, the <em>SQL Server database<\/em> dialog box appears. In the <em>Server<\/em> section at the top of the dialog box, click the down arrow associated with the first option (the one to the left) and then click <em>Parameter<\/em>. The second option will change from a text box to a drop-down list that contains the two parameters you just created. Select <em>SqlSrvInstance,<\/em> and then repeat the process in the <em>Database<\/em> section, only this time, select <em>Database<\/em>.<\/p>\n<p>Next, click the <em>Advanced options<\/em> arrow and enter the following T-SQL statement in the <em>SQL statement<\/em> box (or a comparable statement appropriate for your data):<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">SELECT h.SalesPersonID AS RepID,\r\n  CONCAT(p.LastName, ', ', p.FirstName) AS FullName, \r\n  CAST(SUM(h.SubTotal) AS INT) AS SalesAmounts \r\nFROM Sales.SalesOrderHeader h INNER JOIN Person.Person p\r\n  ON h.SalesPersonID = p.BusinessEntityID\r\nWHERE h.SalesPersonID IS NOT NULL\r\n  AND YEAR(h.OrderDate) = 2013\r\nGROUP BY h.SalesPersonID, p.FirstName, p.LastName\r\nORDER BY FullName ASC;<\/pre>\n<p>The <em>SQL Server database<\/em> dialog box should now look similar to the one shown in the following figure, with the <em>SqlSrvInstance<\/em> and <em>Database<\/em> parameters selected.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"675\" class=\"wp-image-79568\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-4.png\" \/><\/p>\n<p>When you click <em>OK,<\/em> Power BI Desktop displays a preview window (assuming everything is working as it should), with the name of the two parameters at the top, as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"577\" class=\"wp-image-79569\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-5.png\" \/><\/p>\n<p>When you click the <em>Load<\/em> button, Power BI Desktop adds the dataset to <em>Data<\/em> view. Before taking any other steps, rename the dataset to <em>RepSales<\/em> or something to your liking. You should end up with a dataset that looks similar to the one shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"501\" class=\"wp-image-79570\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-6.png\" \/><\/p>\n<p>By defining parameters for the connection properties, you can easily change their values at any time, should you need to retrieve the data from a different SQL Server instance or database. You can also use the same parameters for multiple datasets, saving you the trouble of having to repeat connection information each time you create a dataset based on the same data source.<\/p>\n<p>Later in the article, you\u2019ll learn more about working with existing parameters after they\u2019ve been incorporated into your dataset. But for now, open Query Editor and view the M statement associated with the dataset\u2019s <em>Source<\/em> step in the <em>Applied Steps<\/em> section, as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1107\" height=\"538\" class=\"wp-image-79571\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-7.png\" \/><\/p>\n<p>If you examine the M statement closely, you\u2019ll see that the SQL Server connection data references the <em>SqlSrvInstance<\/em> and <em>Database<\/em> parameters. They\u2019re included as the first two arguments to the <strong>Sql.Database<\/strong> function. I\u2019ve copied the statement here and highlighted the two parameters for easier viewing:<\/p>\n<pre class=\"lang:none theme:none\">= Sql.Database(SqlSrvInstance, Database, [Query=\"SELECT h.SalesPersonID AS RepID,#(lf)  CONCAT(p.LastName, ', ', p.FirstName) AS FullName, #(lf)  CAST(SUM(h.SubTotal) AS INT) AS SalesAmounts #(lf)FROM Sales.SalesOrderHeader h INNER JOIN Person.Person p#(lf)  ON h.SalesPersonID = p.BusinessEntityID#(lf)WHERE h.SalesPersonID IS NOT NULL#(lf)  AND YEAR(h.OrderDate) = 2013#(lf)GROUP BY h.SalesPersonID, p.FirstName, p.LastName#(lf)ORDER BY FullName ASC;\"])<\/pre>\n<p>An interesting implication of all this is how easily you can reference parameters within your M statements, providing you with a very powerful and flexible tool for customizing the applied steps that make up your dataset.<\/p>\n<h2>Adding Parameters to Filter Data<\/h2>\n<p>In some cases, you might want to use parameters to filter a dataset, rather than applying a <em>Filtered Rows<\/em> step, an approach that can be inflexible and difficult to update. For example, you might want to use a parameter in place of the hard-coded <strong>2013<\/strong> specified the <strong>WHERE<\/strong> clause of the original T-SQL statement:<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">YEAR(h.OrderDate) = 2013<\/pre>\n<p>You can replace the hard-coded value with a parameter that supports a range of values. To do so, create a parameter just like you saw earlier, only this time, name the parameter <em>SalesYear,<\/em> define a list that contains the years <em>2011<\/em> through <em>2014,<\/em> and set the default and current values to <em>2011,<\/em> as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"665\" class=\"wp-image-79572\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-8.png\" \/><\/p>\n<p>After you\u2019ve created the parameter, update the M statement associated with the dataset\u2019s <em>Source<\/em> step by replacing the <strong>2013<\/strong> value with the following code snippet (including the quotation marks):<\/p>\n<pre class=\"theme:none lang:tsql decode:true \">\" &amp; SalesYear &amp; \"<\/pre>\n<p>&nbsp;<\/p>\n<p>Once you\u2019ve updated the code, click the checkmark to the left of the statement to verify that your changes are formatted correctly and that you didn\u2019t somehow break the code. The statement and dataset should now look similar to those shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"379\" class=\"wp-image-79573\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-9.png\" \/><\/p>\n<p>To test the new variable, select <em>SalesYear<\/em> in the <em>Queries<\/em> pane and choose a different year from the default <em>2011<\/em>. Then re-select the <em>RepSales<\/em> dataset and verify that the data has been updated.<\/p>\n<h2>Adding Parameters to Control Statement Logic<\/h2>\n<p>In some cases, you might want to use parameters to control a query\u2019s logic, rather than just filtering data. For example, the <strong>SELECT<\/strong> clause in the original T-SQL statement uses the <strong>SUM<\/strong> aggregate function to come up with the total sales for each sales rep:<\/p>\n<pre class=\"lang:tsql theme:ssms2012-simple-talk\">CAST(SUM(h.SubTotal) AS INT) AS SalesAmounts<\/pre>\n<p>You can instead insert a parameter in the M statement that allows you to apply a different aggregate function. First, create a parameter name <em>AggType<\/em> and then define a list that includes one item for each function, using the <strong>SUM<\/strong> function as the default and current values, as shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"662\" class=\"wp-image-79574\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-10.png\" \/><\/p>\n<p>I\u2019ve included the <strong>SubTotal<\/strong> column within the options in part to keep the logic clearer, but also to demonstrate that you can summarize the data based on other columns as well, as long as your dataset supports them. For example, you dataset might also include the <strong>DiscountAmounts<\/strong> column, which provides the total sales amounts, less any discounts. In such cases, each parameter option can define the specific function and column, including such values as <strong>SUM(h.DiscountAmounts)<\/strong> and <strong>AVG(h.SubTotal)<\/strong>.<\/p>\n<p>After you create the parameter, update the M statement associated with the dataset\u2019s <em>Source<\/em> step by replacing the hard-coded <strong>SUM(h.SubTotal)<\/strong> fragment with the following snippet (including the quotes):<\/p>\n<pre class=\"theme:none lang:tsql decode:true \">\" &amp; AggType &amp; \"<\/pre>\n<p>&nbsp;<\/p>\n<p>You can also do something similar with the original <strong>ORDER BY<\/strong> clause, using a variable to provide options for how to order the data. First, create a variable named <em>ResultsOrder.<\/em> Then, for each option in the list, specify the column on which to base the sorting (<em>FullName<\/em> or <em>SalesAmounts<\/em>) and whether the sorting should be done in ascending or descending order, as shown in the following figure. In this case, the option <em>FullName ASC <\/em>is used for the default and current values.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"664\" class=\"wp-image-79575\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-11.png\" \/><\/p>\n<p>Once you\u2019ve created the parameter, update the M statement by replacing the <strong>FullName ASC<\/strong> code fragment with the following snippet (including the quotes):<\/p>\n<pre class=\"theme:none lang:tsql decode:true \">\" &amp; ResultsOrder &amp; \"<\/pre>\n<p>&nbsp;<\/p>\n<p>Your M statement and dataset should now look similar to the ones shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1078\" height=\"389\" class=\"wp-image-79576\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-12.png\" \/><\/p>\n<p>Once you understand how to incorporate parameters into your M statements, you have a wide range of options for manipulating data and making your datasets more flexible and accommodating, without having to add a lot of steps to you query. Just be sure that whenever you make any changes, you apply and save them so you know they work and won\u2019t get lost.<\/p>\n<h2>Using Parameters to Name Dataset Object<\/h2>\n<p>Another fun thing you can do with parameters is to use them for applying dynamic names to objects. For example, you can change the name of the <em>SalesAmounts<\/em> column to one that reflects the sales year and type of aggregation being applied. A simple way to do this is to first add a <em>Renamed Columns<\/em> step to your dataset in Query Editor and then update the associated M statement to include the parameter values.<\/p>\n<p>To add the <em>Renamed Columns<\/em> step, right-click the <em>SalesAmounts<\/em> column header, click <em>Rename,<\/em> type <em>Sales<\/em> as a temporary column name, and then press <em>Enter<\/em>. Query Editor adds the <em>Renamed Columns<\/em> step to the <em>Applied Steps<\/em> section, along with the following M statement:<\/p>\n<pre class=\"lang:none theme:none\">= Table.RenameColumns(Source,{{\"SalesAmounts\", \"Sales\"}})<\/pre>\n<p>To incorporate the <em>SalesYear<\/em> and <em>AggType<\/em> parameters into the statement, replace <strong>Sales<\/strong> with the following code:<\/p>\n<pre class=\"lang:none theme:none\">Sales (\" &amp; SalesYear &amp; \"-\" &amp; Text.Range(AggType, 0, 3) &amp; \")<\/pre>\n<p>The concatenation operator (&amp;) joins the name <em>Sales<\/em> with the two variable values, which are separated by a dash and enclosed in parentheses. The <strong>Text.Range<\/strong> function retrieves only the first three characters from the <em>AggType<\/em> variable.<\/p>\n<p>After you update the statement, be sure to verify your changes. The dataset and M statement should now look similar to the ones shown in the following figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1112\" height=\"437\" class=\"wp-image-79577\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-13.png\" \/><\/p>\n<p>Notice that the name of the dataset\u2019s third column now includes the year and function in parentheses, making it easy to see what parameter values have been applied to the data set.<\/p>\n<h2>Working with Parameters in Data View<\/h2>\n<p>As you saw earlier, to change a parameter value in Query Editor, you need to select the parameter in the <em>Queries<\/em> pane and update its value accordingly. However, this can be a cumbersome process, especially when you want to update multiple parameter values concurrently.<\/p>\n<p>Fortunately, you can set parameter values directly in <em>Data<\/em> view. To set the values, click the <em>Edit Queries<\/em> down arrow on the <em>Home<\/em> ribbon and then click <em>Edit Parameters<\/em>. When the <em>Enter Parameters<\/em> dialog box appears, select the values you want to apply to your datasets and then click <em>OK.<\/em> The following figure shows the <em>Enter Parameters<\/em> dialog box and the current parameter settings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"445\" class=\"wp-image-79578\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-14.png\" \/><\/p>\n<p>Although the <em>Edit Parameters<\/em> option name and the <em>Enter Parameters<\/em> dialog box name are somewhat misleading, the features they represent provide an effective way to update the parameter values and in turn update the data. Be aware, however, that the changes you make here apply to all datasets using the parameters. If you want to include similar types of parameters in multiple datasets, but you do not what them to all share the same values, you should create parameters specific to the dataset, naming them in such a way to make them easily distinguishable from each other.<\/p>\n<p>Once you know how to set the parameter values, you can try different variations, viewing the dataset each time you apply the new settings. For example, the following figure shows the dataset after applying the parameter settings shown in the previous figure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"344\" height=\"406\" class=\"wp-image-79579\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2018\/07\/word-image-15.png\" \/><\/p>\n<p>Notice that the <em>Sales<\/em> column includes the year and aggregation type in the column name and that the data is sorted based on the <em>Sales<\/em> values, in descending order. You can also change the parameter values while in <em>Report<\/em> view, allowing you to see you changes immediately within your visualizations.<\/p>\n<p>Clearly, the parameter capabilities help to make Power BI Desktop an even more robust and flexible tool, and you can use parameters in a variety of ways, regardless of where the data originates. The more comfortable you become working with parameters, the more effectively you can use them, and the more control you\u2019ll have over your datasets.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power BI allows you to use parameters to make your reports dynamic. In this article, Robert Sheldon demonstrates how parameters can be used to substitute connection information, query filters, or even calculations within the query.&hellip;<\/p>\n","protected":false},"author":221841,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143528],"tags":[5134],"coauthors":[6779],"class_list":["post-79563","post","type-post","status-publish","format-standard","hentry","category-bi-sql-server","tag-sql-prompt"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/79563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221841"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=79563"}],"version-history":[{"count":9,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/79563\/revisions"}],"predecessor-version":[{"id":79609,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/79563\/revisions\/79609"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=79563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=79563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=79563"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=79563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}