Fool around with details from inside the a custom SQL query

Fool around with details from inside the a custom SQL query

You need to use the following personalized SQL query to find a great believe just how many purchases and would a left sign-up for the Sales and you can Dealers tables:

Errors whenever copy articles are referenced

In case your personalized SQL query references copy columns, you can acquire errors of trying to use one of the articles on your own analysis inside the Tableau. This may happen even when the query is valid. For example, check out the adopting the inquire:

The ask is valid, nevertheless bien au_id field is actually ambiguous due to the fact in cases like this they is obtainable within the both the “authors” table therefore the “titleauthor” desk. Tableau will relate to the brand new inquire but you’ll rating an enthusiastic mistake anytime you try to utilize the au_id job. It is because Tableau doesn’t understand which table you are it comes to.

Note: It’s a just practice to describe column aliases having an Since the condition whenever you can inside the a customized SQL Ask. This is because per databases https://datingranking.net/escort-directory/clovis/ has its own guidelines whether it comes to automatically generating a line label assuming a keen alias try not put.

Revise a custom SQL inquire

  1. On the databases page, from the canvas, double-click on the individualized SQL query throughout the analytical level.
  2. Hover along the personalized SQL desk in the physical coating up until the new arrow screens.
  3. Click on the arrow then select Revise Individualized SQL Query .
  4. From the dialog container, modify the fresh new custom SQL inquire.

Once you drag a custom made SQL query to your logical coating of one’s fabric, Tableau provides it a default label: Individualized SQL Ask, Custom SQL Query1, and the like. You could potentially alter the standard title in order to something a whole lot more significant.

Towards the data source page, from the analytical level of your own fabric, discover miss-off arrow on individualized SQL ask desk and select Rename .

You can make use of parameters from inside the a personalized SQL inquire report in order to replace a stable worth with a working well worth. Then you’re able to inform the new factor from the workbook to modify the connection. For example, it’s also possible to connect with a personalized SQL inquire giving websites site visitors analysis for a specific web page which is given by the an excellent pageID. Rather than using a constant worth into pageID worth in the the fresh SQL query, you might type a parameter. Next just after doing the relationship, you might let you know a parameter handle in the workbook. Use the parameter manage to change from pageID and you may remove inside the investigation each page of great interest without having to revise or duplicate the relationship.

Into the Tableau Desktop, you can create a factor directly from this new Customized SQL dialogue box or fool around with people variables which can be the main workbook. For those who do another factor, it gets designed for include in the fresh new workbook just like any most other factor. Select Manage Details to find out more.

To possess online authoring (in Tableau On the internet or Tableau Server), you can utilize an existing factor published away from Tableau Desktop computer. You can not manage a different sort of factor inside the websites currently talking about.

  1. Toward repository web page, on canvas, hover over the dining table up until the change icon displays, and click brand new revise option.
  2. Towards the bottom of one’s dialogue box, click Enter Factor .
  3. Find a steady really worth regarding SQL report and then, regarding the Submit Factor drop-down eating plan discover the factor you want to use alternatively. When you yourself have perhaps not written a factor yet, look for Perform a different sort of parameter . Proceed with the information inside the Carry out Parameters in order to make a parameter.

On the example less than, the brand new customized SQL query production the commands which can be marked since Immediate top priority. On the individualized SQL statement, your order priority is the constant well worth. If you’d like to change the connection to understand the High concern purchases, you would have to edit the details provider.