Project Lenses

Project Lenses

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 Paxata 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 Paxata 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.


A Lens is added through the new lens tool. Online help in the Paxata application guides you through the process of adding and editing a Lens:


0 Kudos
4 Replies

Hi Akshay,
Please let us know if we apply rules and lenses to the paxata project through a java program?

Regards,
Abhijeet
0 Kudos

Hello Abhijeet,

Could you give me an example of a rule that you want to apply to a project? Building business rules and logics on a Project is usually advised to be done through the UI - however you can use the /scripts endpoint to modify the script of the project through REST.

I hope this helps! 

Best Regards,
Akshay
0 Kudos

I would like to get the lens applied to my project when I try this REST API it does not give me lens information as part of json response, let me know any issues with my REST API CALL, if my url is incorrect, then let me know the right api?

/scripts/-1?projectId=myProjectId&version=-1&includeLens=true

0 Kudos

What kind of lens information are you looking for? Just the name of the lens?
0 Kudos