1 2 3 Previous Next 32 Replies Latest reply on Sep 1, 2017 8:04 AM by Srini Ramanathan

    Customized views API questions

    Tamas Foldi

      My goal is to read and write (maybe create) customized views from outside the tableau frame. I would like to know what filters were set in a customized view and in the future generate customized views. My current state is, that I can read the XML behind a customized user view by executing the following steps:

       

      1) First add more rights to my tableau postgres user. I guess this one is unsupported, however, it is required to access the underlying XML of my customized view.

       

      C:\Program Files (x86)\Tableau\Tableau Server\7.0\pgsql\bin>psql -p 8060  workgroup  tblwgadmin

       

      workgroup=# alter user tableau superuser;

      ALTER ROLE

       

      2) Get and export  my customized view

       

      workgroup=# COPY (SELECT data FROM pg_largeobject WHERE loid IN

                (select content from customized_views, repository_data

                  where 1=1

                    and repository_data.id = repository_data_id 

                    and customized_views.name ='View Name') ) TO 'c:\\temp\\output.xml' ;


       

      3) open the generated XML with editor or API and process filter lines like:

       

              <groupfilter function='member' level='[contact_state]' member='&quot;Inactive&quot;' />

       

      Thus, I can get the filters from the customized views but I do not feel comfortable, since it is not seems like a standard way. Is it any better way of that?

       

      Second question, how can I save the current viz state from outside the embedded IFRAME? Can I invoke some undocumented javascript api? Or how should I create a "Remember View"/"Original view" button? Any ideas would be appreciated

        1 2 3 Previous Next