Lenses are used to create publishing points from Steps in your Project. When you publish from a Lens, the resulting AnswerSet is a snapshot of your dataset at that particular Step in the Project. By default, the AnswerSet is saved to your Data Library.
A Lens can be added to any Step or sub-Step in your Project, for example, to an Import Step of an Append. An existing Lens can be dragged to any Step or added multiple times. The Lenses you create are retained in project versions, and you can publish AnswerSets from Lenses in older versions of your Project.
Note that all Lenses are public to anyone who shares your Project.
Lenses are also essential for Project Automation because they define the publishing points to use for automated jobs. When you set up a Project for automation, you select Lenses and configure a corresponding schedule to automatically publish AnswerSets to your Data Library. Therefore, in order to automate a Project, you require at least one Lens in the Project. For more help on automating a Project, see the topic Automation.
Examples of when and how to use a Lens:
- When: to Isolate Rows in your Dataset that Need Further Investigation.
How: add a Lens on a Step where you filter rows that you want to isolate from your current dataset. Name the Lens and click Publish. The resulting AnswerSet is published to the Data Library and includes only the isolated rows you can investigate later. Now you can create a new Step to remove those rows from your current dataset.
- When: to View "Before and After" Aggregation.
How: add a Lens to publish the current dataset prior to shaping your data. Name the Lens and click Publish. The resulting AnswerSet of pre-aggregated data is published to the Data Library. Create a Shape Step, and then add a Lens to publish the resulting dataset. You now have two AnswerSets that reflect your data before and after the aggregation.
- When: to schedule a Project for Automation.
How: add a Lens for every Step in your Project where you want to create a publishing point. Name each Lens with a unique name to describe the output generated from that publishing point. Set up automation to use the Lenses for publishing AnswerSets to the Data Library based on the schedule you configure. See Automation for details.
Add a Lens
- Click the Step where you want to add the Lens.
- Click the new lens tool:
The Lens panel opens and you are prompted to Enter a lens name. Provide a unique name and click Save.
- You can add a Lens to any Step in your Project or to any sub-Step, for example, to the Import Step of an Append.
- An existing Lens can be dragged to any Step or added multiple times.
- All Lenses persist as part of the Projects Steps and are public to anyone who shares your Project.
- A Lens name must be unique because it is used to name the resulting AnswerSet.