6 Replies Latest reply on Sep 24, 2012 9:12 AM by Russell Christopher

    displaying db stored images

    Ronak Patel

      in the adventure works db...there are product images (in gif i think) stored as binary expressions in the production.productphoto...I'm trying to create a product information dashboard and want to get tableau to display the product image depending on what is selected from the list....can tableau do this?

        • 1. Re: displaying db stored images
          Tracy Rodgers

          Hi Ronak,

           

          This can be done using actions:

           

          http://kb.tableausoftware.com/articles/knowledgebase/combining-sheet-links-and-dashboards

           

          You might also want to check out the video from Think Data Thursdays on actions--there are some good tips and tricks:

           

          http://community.tableau.com/thread/119845

           

          -Tracy

          • 2. Re: displaying db stored images
            Ronak Patel

            Hi Tracy,

             

            I'm still on how to use an action to accomplish this. If the image is stored as a binary string in a SQL table, how does tableau convert it to an image?

            • 3. Re: displaying db stored images
              Ronak Patel

              for example....one the photos in the SQL tables is stored as such in the following string:

               

              "

              0x47494638396150003100F70000E3E3FCEBECF3F5F6FE999B9DEDEDFEDCE3EB374249B2BCCFABADB2F9FAFDD3D3D4373C44BBBCBEE2E5EA868B93F9FAFAACB0B6C9CBCCAAABADDCDDEADADADC5068907E848A26272AE9E9FD676D7598A2A9CDCFD7B1B3B5DBDDE1C5CCE3C2C3C5FEFEFEBEC0C194ACC7A2A3A65B75A60506066D71788A8B8C5C66739A9DA2EDF0F3C1C4CA5A5D63CBCED1F5F6F6EEEFFDD2D3DAF0F1F2D1D1E3E7E8EBEDEDFA949698CBCBDBF6F8FD818285B4B5BDE9E9EA7B7D812A2C30E8E9F8FAFCFC4B4D52C8D6E5F3F4FE717375DBDBF2A4A6A9797A7C33343996989C8E9399929295F5F7F861656D132935FCFCFE707CABF1F2FAA9B4C54D5154F7F8F9DFDEFAF1F2F6EAEAED445A6BECEDEEE7E7FBA7A9AC5253557476793755674A4B4E919AA1414246848587637586FAFCFF6482B7D0D0EC545559393A3DEBECEDE5E6F12C303642454AEBECFE686A6DC7C9CB313235FCFEFD5A5A5D616366F0F1FEE2E3E443494FD4D3F4D5D7D983888DE7E9F1E5D2CED6D9E5E6E5F6E1E2F6E2E4E46F8DBCE4E5E6777B82E2E2F19F9B9C3C5589879CBAF1F2FF71787DFCFCFCF2F3FF34373CD8DAEA7888AAFAFFFFE0E1E3EAEBFAB8AFAAC6CCD4FDFCFA929EB166676BC4C4D0799EB3E5E3E6C0BFCBF2F3FCF3F8FA56595DCBC1BCEFF0FB6D7E8CBDB6B1EDEDEA657A9AE3E4F2F2FAFDECEAEBF4F3FEB7B8BA605E628E8F9114181AF2F3F3F0F2FDE8E9E7E5E8E88E8D8F39363BF7F7F6F0F1EDE8E8E9BAB7B93E3E42A7A7AB1F2124FDFEFEFEFFFFFDFFFEFDFEFFFBFEFDFCFFFFFCFDFFF9FBFEFCFFFEF9F8F3E2E4F69E9EA0A1A0A02E2F339D9F9A9E9CA8E6E6F85954576F788070778DF4F3F4B4B6B7797582FAFDFDEFF0ECB8BBB7CFD0D0F1F1FE7E7F81706D70FBFBFFC2C2E1C8C5C5E1D7D51F3A4ADEDFE0C6C8C8EAEBEC7C7B899A9998EFEFF087888A8A8486F4F4F275726F5E5F60F3F4F4AAA6A7757A98C2B5B7AAACA7848AA96A6868AFAFB066666B7293A25E575A6886AB47474A47494AF3F5FA49869F90908E8497C04B5A7AD1CAC6354A5EFCFDFBD6D6EF425F90D6D6F8FDFDFEFFFFFFFCFEFE21F904010000FE002C00000000500031000008FE00FF091C4870A02D7F081322B4750BA1026FFE70159C48B1A2C58B18291E54A8D0DB3A61EA76AC53722BA3C993282B6EE4D85090A90BEEE27451E02FA5CD9B18572ABCD5CFC79F695FD8CDA999D296AD7FBAFE1D35CAB4A9519C16757244382A0C94072553369CCA352154955D1136CC8242983F5F27192214A54285285152326572E162ABD7AF13A5728D65AAC82D8926378A98D7AE13172B88ADE0E35280235E8D4E9BFA7B70C25404A2276F3503A2C2DFAB116AB089AE044989E3C728FD7530B0C5D62E9B5235E0AB50291357D42771F9D3C00482BF5BBC78A50531B0E11C1CA3C2E2C6C8ABD92D465C9830D879545752C84705FA3B4464C442A5096FFE655D5E5157337F7DB0259AA5A586021FE1B31754886B6307693A7E0B5C299FBC457F5E60C3C20589A052CB0FA740F34078067154DF76237887907F36F9234514F868804C162D1461062AA8C003460452843715080D5180DF5D149A848B0AEBC413471A0E64D0863F3ED801C705B5A092C80E1FBC12960FC1D0A2508B26F9E24F11B574B10502A81C81821D08A5F2CD075994514B09C308C1402A53DD7785584866D4D0282CA0824316FE9C524B0A28FC81502CDF9CE18F0E08C4B1E505932C03913F4D04230183650A649742E43C20CB02C820A45B116EA490410C086583839D08C5C0C124179450CB381CD8F10D98FE3C6568588055E84F337D60394037FE238490041835300109510DC5A186178660E58F1D6050FA4F42E484B0851BBB4E37E13F6F20D40F2BAED610CC32D0505A6A6AFECC31C0385F0CC3632DB55C608A38162CD0D040FE80A045190E40F19B3FD080611ABA0845E0461C4216E78FA6D3FC6046226E0CC34322666832227CFD55E4CF15ADC493080F6ECC12CF0FF1D031CB0FAD84C1C3373360E64F2AE3483286089120D4C6090B6A67CB292568F1490254E836D9322C18C1C33089A8D1C50F3F7C91481A69A821440B1159A4DB079A1861868C3BD4300211E504230E3CDD74A3452DF08450F4B0E164F0CE3E8BC8835008A76C44C12C25D043C50439E4A007247678C8832B70484344089758C340FE290308A1C52C467C9144CA13E986003C66C023C4000CD8408512A4F80383DF8208A2CE2C1718E11D60AAD111460524E081D032C1F8334009A86803420A8384318E20642D7081160328800627FEBCD0CF1AFEF4900D03DF68924822D290839940BA11F145C14884D0C11B7204F1802AFE4CC00138D308C200185A0C338C77E8427341277E8C01447EC19851C217F965338B1A4E8062401746FCB0400A4FBC900006B7ACD10C06FFF38700F4500A1CCCC20C42281141FC11023524220E448004355CC00A0138E20172C0452156610E7C40430C30A841CD12A1B53768E703B57080084820896E6C4908F069C6324A70022854A002A830C23192B1081810E005FE58F8C71AC480811BACC10718F047002E9184039EC21FAF19960ECA308B3848A003FEC04002AE70050C48E105CD904315FC20894014C21FB138C23886F183FCA08B03A8480121E850821294AE2131104209282006D095810766D882240AD00F0018230143C440105E50C41BC8E1012B008319CCA035ED9CE00B3FA0450BD69080FD356115C07802017A418A0390C003A4B0052EA8B18123FC601827389E3F82718101806B3A12F91520FDA10D3A0C82108D38412DBEA1073C08801FF270840FD6F0822904410004C8472142110236B8611CBECAC6DFBEA1352500E006467C80221CC1C968808204688808265E00824B8021115F184A834E308C1A984037FFFEB8850F6851821DDC420866B0070980E00F4A98E10B100800061C410031AC01008E90C70B6C410002F8830223E896B282F18532AC63026BB8810FB020004CC82106132000353C300892FD430E2FE0C40BBC2181320CA37404D1CD16CCE0803BBCEB0A7128010F6691061E9481044E50843F6ED00A37EC000F0058C32D0030852770021704C8E019AAF081695C40089361C31780B4540C84D41198E0840028C0077FD4631F1BF047450920805B34E1123B70033B7091AA7CFA435716F0828522508B2F28000EA8B800B2F69106C5D1E2083CD04435C8C08A294C8114582D840B6201A66C0CC008F0D0811DCAD08501C02017D4E887003040030CC8A1100DB0FE811EC640080AC8610DD110C00BF6D003180CE00BF0E8D87C6C11851F18C20B6000441CBCD0803BD0210E1168013A8A10854ED5914B0E4040351C215747CC000D4F28C40B4291837818E103CBE882262430831B04E19902C0C214EA0080215C221D6380C210F8608C3DA021002EC8C736B26406681C4F3BA95802209690014098200310D0C4174E00830E64A3000DE8C00A82B1852EF0C00806A8813664400663F4400002B881187CC00038F0A03B51880307A8E08F7E04A7094D480027EA508D325460113998021AAA700567C0C2199F58C53AD86184E950C41F0A580283EFB08C24204308C348011E30F1044CA0F80698B0441B8880D86F30600376D8C6FE54DA30091E242109F060432938F1DE20208214CF0C821E8AE10A2B38E0128E40B100EA2C0055E4601AC3E0C081FFA19B53B482082860010A005183442C0001341000220AC1E942ACD60659A8B4269E8106018CF305A87E811C28C1860B9CA0065F60C33AF0005354D3C011A190813EC8C08C63C82200002040218290807E2044091C60030F4AB1688938C002804041064C100C0718211159305E2E4080902604421F36E0C008D820844BE8030D54E84C3F709C0B6D702A09B430C3382460275EDC40003498400F30810170DB4006A1B8813168808968A85A003358070B8671A3C2F923053558422732E00009006201894801A57C70EF1E0C411F58D8C309FEC0500474340000139081225E70035E4C8601E3B80011A071B111C040B7410880255C908081CBC018FA9840286890802960E1095290C20D6030822ECC82158B1E961D9680042F2001103B70003BD270071884A2078E18C214C02C8652108118C458060D6E81810E34420FA1D883231A818078F0A0055280C32C5AA1351F8C6214B650051F6E900D19C8C11836888422E4400D2CDCFA05BC3C821158F0178571001944B88309062005C82E610309C0041F38710B3908400CDC90C63264110C0B5C821558E0452A7420055EB4A0066C2C5153D9C0813F584219B7E8C11E7C30033B809D008A60C503F42180FD09401E1358C6166A1975E4F903022918000758FE610B68AC470213C0C20D6CC172B5262102D4F0C71028D18042F4020BD478452CCEC08049D42296BF3AE800989D003E04C01633F0073350088E500868D00174A10809804462F00144400766204F15710B0F9005549200DBD0070D200D5AE0000AD20C04900072100DB160022D9000B62007C0A06372B03FBDE00F1F900266300C1400454B6204EC20011B800554700B7F1003B1C00985D00341E0083AF0073EA00243E07236000126700160507DDAD102107008BBD0100DF10117130C30000C1D000C81C00847700138F000B6100D0DC007FDF00288700304D0011CC002B5B00545E30FD9F005B3800344D008FEF007A9700631F0020270622F7005310075FE78600C73B00E27004F6A5611B8E0038DB00529900B39E50F5BC0033F90030DF0026BE00205F00149B00EDEF052DE100A6B800B445700109089B3D0071EB30EC8F20D1210010F20057FD00F45544404900AA97005104109B47002B3C003950489FED0446520270B140B5190082C500A30E00F2E700654F00031A0043EC009311003002000FEB00110800346300C4EB640F4C0035F200D23F00173F0004D10523DD00B18F0005560870C300238F0051760167D55384AD008DE800BCD4010BA00655F307912000D14D00F55D00CDBA0040F40034A70054D3004DA400442603344B035FA928E0F046F1F400181C64E6B900FD0C0004490049300309B6326CB52F510CDA2005D90065D200DEBA000D7F00B33F0000FD003AF700D79B00E771005103328FF687DEBE00AC3106727100C08000139B009E7E009C270026C80395FF0011EF91507F9076C300CF5B305DDE0099B700FB2400B8F20083BA00569500B51A00D5D591007D10845600499130593200445B00542100751E006B5E00660302609E39538C2015AC0031FF6055100079A50060EC423B33000C2821107F92B6060771770013C9006DE630665900443F11BE38113E6E103F0911052C00042000F69F02D9E390B93400B8689125BF1000A9005F4400F355003124001AB291EE2811AD6213388020D12300003B00ED0302609519013111000003B

               

              "

              • 4. Re: displaying db stored images
                Russell Christopher

                Hey Ronak -

                 

                Don't want to put words in anyone's mouth, but...

                 

                Tracy's response referred to the fact that you can display images in a Tableau worksheet using a combination of the background image feature and actions. She didn't mean that you could somehow bind directly to a SQL image or binary column and then display the image in a frame.

                 

                You'll need to extract these images from SQL Server and then load them into the Tableau workbook as background images. One of the things background images allow you to do is determine when they are shown - the collection of background images for a worksheet has something like a "show this image under certain conditions" filter.

                 

                That's where the actions she mentioned come in. You'd use the action to tell the collection of background images which one should be displayed.

                 

                Hope this clears things up? Didn't want to leave you hanging.

                 

                Edit - adding example of what Tracy was talking about. Click a bar to change the image...

                1 of 1 people found this helpful
                • 5. Re: displaying db stored images
                  Ronak Patel

                  Hey Russell, thanks for the clarification, now, if I had a few thousand product images stored and I want it to change in the product dashboard, do I have to manually add in all the images as backgrounds then using "Background Images"?

                  • 6. Re: displaying db stored images
                    Russell Christopher

                    There are two (potentially three) approaches:

                     

                    • Import the image or reference it via a URL for use as a background image (like in the attached example)
                    • Drop all the images in the \My Tableau Repository\Shapes folder and display them as custom shapes
                    • Keep them in SQL, convince someone to write a really simply app which pulls/displays an image-as-webpage from SQL, and then use URL Actions and the "Web Page" object inside Tableau to display the webpage showing the product image you care about

                     

                    If I had a relatively small number of images to work with, I'd probably go with method 1 or 2...since you have so many, in your shoes I'd go the extra mile to keep all the images *in SQL*. You'd be adding a bit more complexity (the "pull an image from SQL and display in a web page" application), but solving the problem have needing to export images from SQL and potentially needing to keep images in SQL and on the file system "in sync" as new products are added / removed....

                     

                    Hope this helps?

                    2 of 2 people found this helpful