Use parameters within the a personalized SQL query

Use parameters within the a personalized SQL query

You can make use of another individualized SQL ask locate an excellent count on the number of purchases and you can manage a left join into the Sales and Dealers tables:

Problems when content columns was referenced

Whether your customized SQL inquire sources content columns, you can aquire mistakes of trying to make use of among the many columns on the studies inside the Tableau. This may happens even when the query holds true. For example, consider the following inquire:

The new ask is valid, although au_id community try unclear since in cases like this it can be obtained inside the “authors” dining table together with “titleauthor” dining table. Tableau will connect to new inquire but you will rating a keen mistake whenever you make an effort to make use of the bien au_id community. For the reason that Tableau cannot understand hence desk you are it comes down in order to.

Note: It’s an only habit in order to describe column aliases which have an Because the term whenever you can when you look at the a customized SQL Inquire. Simply because for every single database possesses its own guidelines whether or not it comes to automatically generating a column name and in case an alias try not utilized.

Edit a customized SQL inquire

  1. On the databases page, on material, double-click the personalized SQL query about logical covering.
  2. Hover across the custom SQL dining table from the real level until this new arrow displays.
  3. Click on the arrow and discover Modify Custom SQL Inquire .
  4. On dialog package, change this new individualized SQL query.

When you drag a personalized SQL query to the analytical covering of material, Tableau provides they a standard identity: Personalized SQL Inquire, Customized SQL Query1, and stuff like that. You could potentially alter the standard label so you can anything a lot more important.

Toward data source web page, regarding analytical layer of fabric, discover shed-down arrow regarding the personalized SQL inquire desk and pick Rename .

You can use variables within the a custom made SQL inquire statement to help you replace a constant worthy of that have an active worthy of. After that you chicas escort Bridgeport CT can upgrade the fresh factor in the workbook to modify the relationship. Including, you can even relate genuinely to a custom SQL inquire that provide websites travelers studies for a particular page that’s given because of the a pageID. In place of having fun with a steady really worth with the pageID value into the the newest SQL ask, you might input a parameter. Following immediately after doing the partnership, you could let you know a parameter handle throughout the workbook. Use the parameter manage to alter the actual pageID and you will eliminate inside studies each page interesting without having to revise otherwise copy the partnership.

For the Tableau Desktop, you possibly can make a factor right from this new Custom SQL dialogue container or fool around with people parameters which can be the main workbook. For many who carry out a different sort of factor, it gets available for use in the workbook just like any almost every other parameter. Select Perform Variables to find out more.

To own websites authoring (inside the Tableau On line or Tableau Host), you should use an existing parameter composed regarding Tableau Desktop computer. You cannot perform a different sort of factor inside the websites currently talking about.

  1. On the data source page, from the fabric, hover along the table through to the change symbol displays, and then click the edit key.
  2. In the bottom of your dialogue field, simply click Enter Parameter .
  3. Come across a stable really worth regarding the SQL report immediately after which, about Input Factor drop-off eating plan find the parameter we would like to have fun with rather. When you yourself have not written a factor yet, pick Carry out an alternate factor . Follow the rules inside the Carry out Parameters to make a parameter.

Throughout the analogy lower than, the personalized SQL ask output all of the sales that will be marked since the Immediate consideration. On personalized SQL report, the order priority is the constant worthy of. Should you want to replace the link with see the Higher top priority purchases, you would have to revise the info source.


Yorum yaz