8 Replies Latest reply on May 21, 2018 7:37 PM by csawyer

    AF Transformer - editing a AF hierarchy

    Archie

      Hello!

      I have a pretty complex hierarchy and I want to eliminate some attributes in the hierarchy which reads bad values but maintain the shape of the AF hierarchy. Is it possible with AF transformer? the examples I see are all transforming the existing hierarchy or creating a new template which I do not want to do.

        • Re: AF Transformer - editing a AF hierarchy
          csawyer

          Yes.  You can place filters at the Task, Element and Attribute level to screen items out of the SearchShape which you don't want carried forward into the OutputShape, including screening out bad/garbage attribute values.

          1 of 1 people found this helpful
            • Re: AF Transformer - editing a AF hierarchy
              Archie

              My AF hierarchy is template based and I am having a hard time duplicating the template into the AF transformer.  Each element has a template and I need to drill down and eliminate certain attributes mapped to a particular pi point.

                • Re: AF Transformer - editing a AF hierarchy
                  Archie

                  Is discardfilter the only way to eliminate garbage attributes?

                  • Re: AF Transformer - editing a AF hierarchy
                    csawyer

                    Let me see if I can fashion an example of my own.

                      • Re: AF Transformer - editing a AF hierarchy
                        Archie

                        thank you. I am trying to discard attributes whose value is a "NOData" PI Point. I am unable to delete using PI Builder as my AF hierarchy is template based and I can't seem to delete anything.

                          • Re: AF Transformer - editing a AF hierarchy
                            skwan

                            By design you cannot delete attributes that were instantiated from template.  Afterall, that the whole idea of a template.  We do give you a way to exclude the attribute that you don't need.  Have you tried that?

                            --

                            Steve Kwan

                              • Re: AF Transformer - editing a AF hierarchy
                                Archie

                                Hi Stephen,

                                My AF hierarchy is completely template based. i tried discard filters and it didnt work as the AF hierarchy is template based.

                                  • Re: AF Transformer - editing a AF hierarchy
                                    csawyer

                                    You can solve this by running AF Transform twice.  Use the output DB from the first run as the input for your second run (I think you can also just add a new <Task> and define additional <SearchShapes> and <OutputElementShapes> tied into that task.

                                     

                                    Essentially you can just screen out the null elements in the second pass with a Task-level data filter, like this...

                                     

                                     

                                    <Task Id="1000">

                                                                               <SearchShapes>

                                                                                              <SearchShape Id="1003" ReaderId="1004" FilterMatchType="Any" >

                                                                                                            <DataFilters>                                                             

                                                                                                            <Filter Expression="[10.value]==null" />

                                                                                                            </DataFilters>

                                                                                              </SearchShape>

                                                                               </SearchShapes>

                                                                               <OutputElementShapes>

                                                                                              <OutputElement Id="1005" />

                                                                               </OutputElementShapes>

                                                                               <TaskWriters>

                                                                                              <TaskWriter Id="1006" />

                                                                               </TaskWriters>

                                    </Task>