Play with parameters for the a customized SQL inquire

Play with parameters for the a customized SQL inquire

You are able to the second customized SQL inquire to acquire a great believe what amount of requests and create a left sign-up into Requests and you may Companies tables:

Mistakes when content articles is referenced

When your personalized SQL ask sources copy columns, you can acquire mistakes when trying to utilize among columns in your studies when you look at the Tableau. This may occurs even if the query is true. Such as for example, consider the following inquire:

The latest query is true, nevertheless au_id community is uncertain just like the in this situation it can be found during the both “authors” table therefore the “titleauthor” dining table. Tableau usually get in touch with the fresh query but you will score an mistake whenever you you will need to use the au_id occupation. This is because Tableau doesn’t learn and this dining College Station backpage female escort table you’re it comes down so you can.

Note: It’s a sole routine to explain column aliases with an As the clause whenever you can when you look at the a custom made SQL Inquire. It is because for every databases has its own regulations if this comes to instantly generating a line term whenever an alias are perhaps not put.

Change a personalized SQL ask

  1. With the data source webpage, on fabric, double-click on the custom SQL ask throughout the logical coating.
  2. Hover along the personalized SQL dining table throughout the real level until new arrow displays.
  3. Click on the arrow and then select Edit Custom SQL Ask .
  4. On the dialogue field, edit the newest individualized SQL ask.

Once you drag a customized SQL query with the analytical level of the fabric, Tableau provides they a standard identity: Personalized SQL Query, Custom SQL Query1, and the like. You could change the standard name so you can one thing far more important.

Toward databases webpage, in the analytical coating of the canvas, find the miss-down arrow regarding personalized SQL query desk and choose Rename .

You should use variables in a custom SQL ask statement so you’re able to replace a reliable worthy of that have an active really worth. You’ll be able to improve the latest parameter on the workbook to change the partnership. Such as for instance, you could interact with a custom made SQL ask that provides web subscribers research to possess a specific page that is given of the good pageID. In the place of using a stable well worth towards pageID really worth for the the newest SQL inquire, you can submit a parameter. Up coming immediately after finishing the relationship, you could show a factor handle in the workbook. Use the factor control to switch out of the pageID and you can remove in the data for every single webpage of interest without the need to change or backup the relationship.

Inside the Tableau Desktop, you can create a parameter right from the new Personalized SQL dialog box otherwise play with people details which can be part of the workbook. For folks who create an alternate parameter, it becomes available for include in the newest workbook just like any most other factor. Pick Would Parameters for more information.

To own net authoring (within the Tableau On the internet or Tableau Server), you should use an existing factor published from Tableau Desktop. You can’t perform another factor in the online currently talking about.

  1. Toward repository page, regarding the material, hover along side table before the revise icon displays, and click the newest change switch.
  2. Towards the bottom of one’s dialogue box, simply click Type Parameter .
  3. Look for a steady worthy of throughout the SQL statement right after which, about Enter Factor shed-off selection discover factor we want to play with instead. When you have not created a parameter yet ,, come across Do a different parameter . Proceed with the tips from inside the Do Parameters in order to make a parameter.

Regarding example below, this new personalized SQL query productivity most of the instructions that are marked once the Urgent consideration. On customized SQL statement, the transaction concern is the ongoing well worth. If you want to replace the link with comprehend the Large priority purchases, you would have to revise the info resource.

Hai bisogno di aiuto?