Have fun with parameters in the a custom made SQL inquire

Have fun with parameters in the a custom made SQL inquire

You need another custom SQL query to locate a beneficial rely on what amount of purchases and create a remaining register on the Requests and Suppliers dining tables:

Errors whenever duplicate articles are referenced

When your individualized SQL inquire recommendations backup articles, you may get errors when trying to use one of many articles on your own research when you look at the Tableau. This can happen even if the ask holds true. For example, look at the adopting the query:

The brand new ask holds true, but the au_id job are unclear once the in this situation they can be acquired when you look at the the “authors” dining table and also the “titleauthor” dining table. Tableau usually relate to Columbus chicas escort the fresh new query but you will get an error whenever you attempt to make use of the au_id career. It is because Tableau cannot discover and therefore table you are it comes down to.

Note: It is a best behavior to help you describe line aliases with an enthusiastic Just like the clause whenever possible when you look at the a customized SQL Query. For the reason that for each and every databases possesses its own laws if this comes to instantly generating a column identity whenever an enthusiastic alias try not utilized.

Modify a custom SQL query

  1. Into databases webpage, about fabric, double-click the personalized SQL ask regarding analytical layer.
  2. Hover along the individualized SQL table regarding physical covering until the fresh arrow displays.
  3. Click on the arrow then see Edit Personalized SQL Query .
  4. Regarding the dialog box, modify the fresh new customized SQL ask.

After you pull a custom SQL query towards analytical level of fabric, Tableau offers it a standard name: Individualized SQL Ask, Custom SQL Query1, and so on. You could alter the default identity so you’re able to one thing far more important.

Toward databases webpage, about analytical layer of your own fabric, discover lose-down arrow from the individualized SQL inquire desk and pick Rename .

You can utilize variables in a custom SQL inquire statement to replace a stable well worth which have a working really worth. You may then revise the brand new parameter in the workbook to change the partnership. Like, you can also relate with a customized SQL inquire that give web website visitors studies to own a specific web page that’s specified by the an excellent pageID. In the place of using a steady well worth for the pageID well worth for the the newest SQL inquire, you might submit a parameter. Upcoming just after completing the relationship, you could potentially reveal a parameter control on the workbook. Make use of the factor control to switch out the pageID and you will pull into the data each web page of great interest without the need to edit or copy the relationship.

In Tableau Pc, you possibly can make a parameter right from new Individualized SQL dialog package or have fun with people details that are an element of the workbook. For people who perform a different sort of parameter, it will become available for include in the fresh new workbook as with any other factor. Select Perform Details for more information.

To have internet currently talking about (in Tableau Online otherwise Tableau Servers), you can make use of a current factor wrote away from Tableau Desktop computer. You simply cannot manage another parameter during the websites authoring.

  1. On repository webpage, regarding the canvas, hover over the table till the change symbol displays, and click the fresh new revise switch.
  2. At the bottom of the dialog container, simply click Submit Parameter .
  3. Look for a reliable really worth on SQL declaration and, from the Insert Factor shed-down menu discover parameter we should explore rather. When you have perhaps not written a parameter yet ,, select Would a different factor . Stick to the tips in Carry out Parameters to manufacture a factor.

Regarding example lower than, the individualized SQL query yields the sales which might be designated due to the fact Urgent priority. Throughout the customized SQL report, your order consideration ‘s the ongoing worthy of. If you want to alter the link with see the High consideration commands, you would need to revise the data resource.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *