1 Reply Latest reply on Nov 28, 2014 5:55 AM by Ivan Monnier

    Runs the full refresh operation in the foreground.

    jagruthi.mothukuri

      Hi,

       

      We are running the extracts using tabcmd from redwood. The redwood triggers the extracts and completes. but it doesn’t wait for the extract to complete or fail. How can I use the synchronous option to make the process run in foreground and return success/failure to redwood, so , Redwood in turn will handle failure and takes care of alerts and reruns.


      Appreciate any help!


      Thanks in advance.


      Jagruthi

        • 1. Re: Runs the full refresh operation in the foreground.
          Ivan Monnier

          Hello,

           

          here is one thing I did with MS SQL Server to get the extract update status:

           

          This is the part of my sql query that polls the Tableau database.
          I think that it would not be too hard to adapt it to your need.

           

          Declare @statutmaj INT, @finmaj DATETIME

          WAITFOR DELAY '00:00:30'

              SET @finmaj = (select completed_at

              from(SELECT *,rank() over(partition by title order by started_at desc) as rnk

                  FROM workgroup.public._background_tasks

                  where title like ''MYCONNECTIONNAME'') x

                where x.rnk = 1'))

           

          WHILE @finmaj is NULL

            BEGIN  

              WAITFOR DELAY '00:01:00'

              SET @finmaj = (select completed_at

              from(SELECT *,rank() over(partition by title order by started_at desc) as rnk

                  FROM workgroup.public._background_tasks

                  where title like ''MYCONNECTIONNAME'') x

                where x.rnk = 1'))

            END

           

          SET @statutmaj = (select finish_code

              from (SELECT *,rank() over(partition by title order by started_at desc) as rnk

                  FROM workgroup.public._background_tasks

                  where title like ''MYCONNECTIONNAME'') x

                where x.rnk = 1'))

           

          print dateadd(hh,2,@finmaj)

          if @statutmaj = 0

          print 'Succès'

          else print 'Echec'

           

          I hope it will help while waiting for a more elegant solution by one of the Tableau gurus

           

          Best regards

           

          Ivan