Tableau and Custom SQL - plus stored procedure, parameters and initial SQL | sqlbelle

Sdílet
Vložit
  • čas přidán 22. 08. 2024

Komentáře • 43

  • @equiwave80
    @equiwave80 Před rokem +7

    This was a timely video as I was just going through how to make use of Custom SQL and Initial SQL in Tableau. Thanks for this video Donabel!!!👍💯

    • @sqlbelle
      @sqlbelle  Před rokem +2

      That's great to hear Deepak. And many thanks always, for your comments, questions, and support. I appreciate them very much!

  • @RazaKhan-me3ds
    @RazaKhan-me3ds Před 3 měsíci +1

    Best Video, Explanation is very easy to understand. Thanks

  • @savvyf.2996
    @savvyf.2996 Před rokem +2

    OMG thank you so so much. I just had a business user ask about turning their live connection to an extract with stored procedures and this is exactly what I was looking for! Thank you thank you

    • @sqlbelle
      @sqlbelle  Před rokem +1

      Thank you Savvy! So glad to hear it was helpful :)

  • @timbeard8457
    @timbeard8457 Před rokem +2

    Perfect! Looks like this could fix an issue I have with a client. Super video. Just the right length and depth - thank you!

  • @sandrahu7122
    @sandrahu7122 Před rokem +1

    exactly what i am looking for lately. You always deliver what we expected. Thanks again. I gave you tumble up each video i watched.

    • @sqlbelle
      @sqlbelle  Před rokem +1

      Thank you Sandra! Much appreciated :)

  • @piyushk3652
    @piyushk3652 Před rokem +1

    Really I appreciate your way of explanations ...I learnt alot from you....Thanx a ton

  • @poonamwaghmare7205
    @poonamwaghmare7205 Před rokem +1

    Thank you very much Donabel for this wonderful Video.😍🥰❤

  • @katpui99
    @katpui99 Před rokem

    Exactly what i needed. THANK YOU!

  • @manishKumar-tl2ee
    @manishKumar-tl2ee Před rokem +1

    really, Helpful Video

  • @vijaykesarkar8748
    @vijaykesarkar8748 Před rokem +1

    Great explanation, thank you for this video.

  • @guanyilu5498
    @guanyilu5498 Před 7 měsíci +1

    Hello, really lover your tutorials, it is very helpful. Just wondering do you have any schedule for live session? Absolutely need to join !

  • @piyushk3652
    @piyushk3652 Před rokem +1

    Very good 👍

  • @operationbroomstick
    @operationbroomstick Před 7 měsíci

    Thank you so much 🙏

  • @alainponroy2621
    @alainponroy2621 Před rokem

    Super interesting video thank you 🙂

  • @thedriver492
    @thedriver492 Před rokem

    Thank you 😊

  • @MrBasu-iq6md
    @MrBasu-iq6md Před rokem

    I feel the use of stored procedures is very limited in Tableau. How do you use a stored procedure in Tableau that creates a temp table inside the procedure and then returns a select statement from the that temp table??
    Is it even possible in Tableau??

  • @DaddyYow20
    @DaddyYow20 Před 4 měsíci

    wow it's awesome, however, I got this error when I tried to connect my store proc "Unable to complete action
    The "[dbo].[Data_Weekly]" stored procedure returned no results. The fields don't have column names, or the data in the fields is not a supported data type.
    Unable to connect to the Microsoft SQL Server server "Server1". Check that the server is running and that you have access privileges to the requested database."

  • @timbeard8457
    @timbeard8457 Před rokem +1

    Hi Donabel, I'm using quite complex SQL queries and finding that queries that work in Oracle SQL Developer fail in Tableau Custom SQL, generating various generic and unspecific errors. Other than Tableau not liking a semicolon at the end of a query, do you have any other tips or a syntax comparison?

    • @sqlbelle
      @sqlbelle  Před rokem +2

      Hi Tim, I believe we need to use only a single statement in the custom SQL (might need to double check). Usually what I do if I need a custom SQL which has more complicated query, I convert to either Stored Proc, or View, or Table Valued function and use those in the Custom SQL instead.
      For example my custom SQL might look like:
      SELECT *
      dbo.my_new_function_that_does_everything(some params)

    • @timbeard8457
      @timbeard8457 Před rokem

      @@sqlbelle
      Thank you for the feedback! Here are my notes re what I've picked up by dumb trying stuff out:
      - Oracle MS SQL Developer is much more tolerant than Tableau. A query that works here will not necessarily work in Tableau.
      - Remove the ; at the end of the query
      - Use the double quote, not single quote for naming fields using the AS command. Should you be building up a long list of fields and renaming them in Excel, use CHAR(34), e.g.: =A2&" AS "&CHAR(34)&F2&CHAR(34)&","
      - If you're using Excel like this, don't forget to remove the last comma before "FROM"!
      - SQL Developer seems to be tolerant of multiple fields receiving the same name using AS. Tableau is not. Make sure that they are all unique.
      - Tableau wraps further SQL around the Custom SQL, which can cause performance problems. Once I'm finished, I'll be requesting views from the DB manager to match the custom SQL queries that I've built.
      For further tips on custom SQL and performance impacts, see this article by Emre Oktay at the Information lab: (sorry links get comments deleted by CZcams)

  • @ericgoodmandzacka9531
    @ericgoodmandzacka9531 Před rokem +1

    This awesome. I love the fact that you have created a database for Superstore data. Can you share the database script with us. Thank you. You are amazing!!!

    • @sqlbelle
      @sqlbelle  Před rokem +2

      Thank you Eric. I will be putting together some resources I used in videos - I will post them in sqlbelle.com. They're not there yet, but hoping to do so this week. I'll make a post once they're there. Thank you for your comments and support!

    • @ericgoodmandzacka9531
      @ericgoodmandzacka9531 Před rokem

      @@sqlbelle Sounds good, I look forward to seeing that. I appreciate you!

  • @achusridhar1187
    @achusridhar1187 Před rokem

    Hi Mam, can you put a video on how to make an extract connection with stored proc that are using paramaters for From and To dates.

    • @firstname4337
      @firstname4337 Před 8 měsíci

      just do what she did but use a date parameter instead of s string for product name

  • @naveennaravala1707
    @naveennaravala1707 Před rokem +1

    Custom SQL or Stored Procedure which is best for performance ?

    • @sqlbelle
      @sqlbelle  Před rokem +1

      Hello Naveen - I'd say it's always it depends. It depends on what the Custom SQL is, and it depends on whether a stored procedure is a sufficient alternative. There are benefits to using stored proc as database engines tend to optimize these more; however they do pose restrictions when used with Tableau (ie can only do live connections)

    • @naveennaravala1707
      @naveennaravala1707 Před rokem

      @@sqlbelle Thanks for the response

  • @aliyakhankhan3929
    @aliyakhankhan3929 Před 9 měsíci

    Hi mamm

  • @firstname4337
    @firstname4337 Před 8 měsíci

    it seems like passing the product name to the sql could lead to a sql injection attack