Play with parameters when you look at the a custom made SQL ask

Play with parameters when you look at the a custom made SQL ask

You need the second personalized SQL inquire to track down good trust just how many purchases and you may would a remaining join towards Requests and you may Manufacturers dining tables:

Mistakes whenever duplicate columns is referenced

Should your personalized SQL inquire recommendations content columns, you could get mistakes of trying to make use of one of several columns in your study within the Tableau. This can happen even if the query is true. Such, look at the adopting the inquire:

The new query holds true, nevertheless the au_id career is unknown because in such a case they can be acquired inside both the “authors” table plus the “titleauthor” desk. Tableau tend to relate genuinely to the fresh new query but you will score a keen mistake whenever you you will need to make use of the au_id field. Simply because Tableau cannot know hence desk you’re it comes to.

Note: It is a sole routine to help you define line aliases having an enthusiastic Due to the fact condition as much as possible in a custom SQL Query. For the reason that for each and every databases possesses its own regulations in the event it pertains to immediately promoting a line identity assuming an alias was perhaps not made use of.

Change a personalized SQL ask

  1. On the data source page, about canvas, double-click on the customized SQL inquire throughout the analytical covering.
  2. Hover across the customized SQL dining table about physical coating up until the fresh new arrow displays.
  3. Click the arrow and find Revise Custom SQL Query .
  4. From the dialogue field, modify the new custom SQL ask.

When you pull a personalized SQL inquire towards logical covering of fabric, Tableau gives they a standard name: Personalized SQL Ask, Custom SQL Query1, etc. You could potentially alter the default name so you’re able to anything far more significant.

Towards the databases web page, on logical coating of material, find the lose-down arrow in the individualized SQL ask desk and select Rename .

You need details during the a custom SQL query report so you’re able to replace a constant worthy of with a dynamic well worth. After that you can revision the new factor in the workbook to change the relationship. Including, you can even relate to a custom made SQL query that provides internet tourist research having a particular web page that’s given because of the a good pageID. Instead of using a stable worth towards pageID value into the the SQL query, you can insert a factor. Then immediately following finishing the connection, you could potentially let you know a parameter control on the workbook. Utilize the parameter manage adjust the actual pageID and you will remove during the investigation for each and every page interesting without having to change otherwise backup the connection.

In Tableau Pc, you possibly can make a factor right from the latest Customized SQL dialog package or have fun with one details that will be area of the workbook. For people who do a different sort of factor, it becomes available for use in the new workbook as with any other factor. Select Do Details to learn more.

For online authoring (in the Tableau On the internet or Tableau Server), you can use an existing factor composed regarding Tableau Desktop. You cannot would an alternative parameter in web currently talking about.

  1. With the data source webpage, regarding the canvas, hover along the dining table up until the change icon displays, and then click the brand new revise key.
  2. In the bottom of the dialogue box, click Submit Factor .
  3. Come across a steady worthy of regarding the SQL statement right after which, regarding Enter Parameter miss-down selection find the parameter we need to have fun with as an alternative. For those who have not written a factor but really, discover Would a special parameter . Follow the tips from inside the Manage Variables to produce a factor.

On example below, the latest custom SQL query returns the purchases that will be marked once the Urgent consideration. About custom SQL statement, the transaction top priority is the ongoing value. If you want to replace the link with comprehend the Highest consideration orders, you would have to change the content supply.

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Başa dön