Datebase Views in ThoughtSpot

Database views are important in data warehousing to allow for abstracting a source table into different roles. For instance, a date dimension table can take on my roles when related to a fact table because these fact records will have several dates associated with it. When this happens, you must relate the fact table with several role playing views of the date dimension. 

What is the best way to operate this construct in ThoughtSpot? I noticed that there is no CREATE VIEW keyword in TQL. Has anyone else run into this?

7replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • You can create multiple relationships between tables.  In your example, you'd have an FK for each of the dates in the fact table to the date dimension.  Then when you create a worksheet, you bring in the date multiple times, picking the relationship to use, and give it a different name.  The worksheet effectively is the view.

    Reply Like
  • Thank you Bill, this makes sense to me. I didn't realize you could include the same physical table multiple times.

    Reply Like
  • Bill  On second look, I haven't been able to successfully add the date dimension more than once. I added it in while creating a worksheet by highlighting the columns on the Choose Sources panel, pressing Add Columns, selecting the first relationship, then changing the name of the columns. Then I attempted to add a second instance of the table, however when I press Add Columns, nothing happens. Assistance would be appreciated.

    Reply Like
  • Phillip Hetzel

    Which version of Thoughtspot are you on? There is a bug in 4.5 that doesn't let this happen. A fix is coming in our upcoming version.

    Reply Like
  • That must be it, I just started using 4.5.

    Reply Like
  • Siva Singaram

    Any update on this? Using role playing dimensions is really important to setting up our worksheets properly.

    Reply Like
  • Phillip Hetzel , this has been fixed in version 4.5 of Thoughtspot. So if you are not yet in that version, please discuss it with our support team to update it to that version.

    Reply Like
Like Follow
  • Status Answered
  • 1 yr agoLast active
  • 7Replies
  • 411Views
  • 3 Following