Get Free Trial

slice, mapping set api when using pivot-puppeteer

dongbeom Kim asked on September 6, 2020

We are going to create a function that allows users to apply for a pivot type in the desired form and export large amounts of data in that form.
When using pivot-puppeteer, is there a way or API to export by specifying slices or mappings from the outside?
It doesn’t matter which method is using shell script. If there is no API or method, please provide a good idea

1 answer

Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 7, 2020

Thank you for contacting us.
The specific report, including slice and mapping objects, can be specified using the setReport function of our GitHub example:

function setReport(report) {
  page.evaluate(report => {
  }, report)

It is also possible to complement the sample with more specific methods using the mentioned setReport function as a template.
The configuration itself can be passed to the server-side using any appropriate JavaScript tool. For example, it is possible to use AJAX and send POST requests to hit the server running Puppeteer. After receiving such a request, the server would perform export based on the data from the request’s body.
We hope it helps.
Please let us know in case other questions arise.

Please login or Register to Submit Answer