For many database, you could potentially connect to a particular ask instead of the entire study place

Because the databases features quite more SQL sentence structure away from both, the new personalized SQL you employ to connect to one to database you’ll be varied regarding the custom SQL you might use to connect to another. not, using custom SQL they can be handy once you know exactly this new important information and you can know how to generate SQL concerns.

However, there are prominent good reason why you may use personalized SQL, you need custom SQL to help you commitment your computer data round the tables, recast areas to do cross-databases joins, restructure otherwise slow down the sized your data for study, etc.

Getting Excel and you may text message document research provide, this can be acquired merely inside the workbooks that were created before Tableau Pc 8.2 or when using Tableau Desktop to your Screen with the legacy commitment. For connecting to Do well or text documents utilizing the heritage partnership, relate genuinely to the fresh file, as well as in the new Unlock dialog field, click the Unlock get rid of-off menu, right after which pick Discover with Legacy Relationship .

NOTE: You start with Tableau 2020.dos, history Do just fine and you will Text associations are no extended offered. Understand the History Commitment Options document during the Tableau Neighborhood to own possibilities to presenting the heritage relationship.

Connect with a custom SQL query

After you simply click Okay, the fresh new inquire runs and individualized SQL query desk seems during the brand new logical level of your canvas. Merely related areas about personalized SQL ask display screen about investigation grid for the Data source page.

Examples of personalized SQL concerns

If you would like append studies to one another, you can make use of the fresh partnership solution on the physical level from the fresh new fabric inside the Tableau. In some instances their databases will not support this package, so you’re able to explore custom SQL as an alternative.

When you need to do a hop on between a couple tables within the the fresh new bodily layer of your own canvas, the information sort of the areas you sign up to your have to be an equivalent. Into the circumstances if analysis variety of the latest areas are not an identical, you can make use of personalized SQL adjust the details form of (cast) the field in advance of undertaking brand new signup.

Including, imagine we want to subscribe a couple of tables, Head and you can Sub, utilizing the Resources and ID sphere, respectively. The underlying job try a variety variety of therefore the ID industry try a set method of. You should use another individualized SQL inquire to change the studies sorts of Sources of a number so you can a sequence therefore that you can join the Head and you will Sub dining tables with the Supply and ID areas.

Whenever using large analysis sets, often you can save day whenever you are handling your data in the event the you get rid of its size first.

Such as for example, guess you really have a massive dining table named FischerIris. You need to use the next custom SQL inquire so you’re able to recover this new given articles and you can ideas and so decreasing the measurements of the data place that you relate to from Tableau.

See [FischerIris].[Species] Given that [Species], [FischerIris].[Width] Because [Petal Thickness], COUNT([FischerIris].[ID]) Once the [Num from Varieties] From [FischerIris] In which [FischerIris].[Organ] = ‘Petal’ And you may [FischerIris].[Width] > Group By the [FischerIris].[Species], [FischerIris].[Width]

In some cases, you will be coping with a dining table that really must be restructured before investigation. Whether or not this type of activity can help you regarding the physical level of the fabric inside Tableau by using choices such pivot, the databases might not back it up. In this situation, you need individualized SQL rather.

To change the structure and maximize your analysis getting research from inside the Tableau, you need the following customized SQL inquire:

Come across Table1.Year ID Since the [Seasons ID], Table1.Issues – Can’t stand As [Quantity], “Dislike” Once the [Reason] Out of Table1 Partnership Most of the Find Table1.12 months ID As the [Season ID], Dining table.Situations – Defective As the [Quantity], “Defective” As [Reason] Regarding Table1 Connection The Get a hold of Table1.Seasons ID Once the [Season ID], Table1.Facts – Too large As the [Quantity], “Too big” Because [Reason] Off Table1 Connection The Get a hold of Table1.Year ID As 12 months ID, Table1.Products – Too tiny Because the [Quantity] “Too tiny” As [Reason] Out of Table1


Deja un comentario