Forum Discussion

NJamigos's avatar
NJamigos
Frequent Visitor
3 years ago

Transform multiple sample page / query

I'm trying get data from pdf files. Its first page data is slightly different from other pages. First I filtered 1st page and did transformation in sample transformation query. After that from there with add to new query, from filter page step I selected other pages and did the transformations..

Finally I Append both to initial sample query to form my data.. 

 

But when I run this query with a folder with multiple pdf...other than first page, data is getting repeated for other pdfs.. Ie. First pdf data getting repeated..

 

Can you please guide what was wrong.. Or how to solve this

 

amitchandak olgad 

16 Replies

      • Sahir_Maharaj's avatar
        Sahir_Maharaj
        Super User

        technolog I apologize  if my previous responses caused any confusion. However, I wanted to clarify that my action to post one message in multiple replies was intentional and made with the aim of making it easier for the recipient to read and respond.

         

        By breaking it up into smaller pieces, I aimed to provide a better user experience and make it more manageable for the recipient to process the information.

  • Hello NJamigos,

     

    It sounds like the issue may be that your queries are not fully dynamic and are therefore not handling the varying structure of the PDF files in the folder. When you append the queries from the different PDF files, the queries are likely still referring to the first file's structure, causing the data to be repeated.

  • To solve this, you can try creating a fully dynamic query that can handle the varying structure of the PDF files. One way to do this is by using the "Combine binaries (binary.Combine)" function to combine the PDF files into a single binary column.

     

    • Sahir_Maharaj's avatar
      Sahir_Maharaj
      Super User

      2. Use the "Binary.Combine" function to combine the contents of all the PDF files into a single binary column.

    • Sahir_Maharaj's avatar
      Sahir_Maharaj
      Super User

      3. Use the "Pdf.Tables" function to extract the tables from the combined binary column.

    • Sahir_Maharaj's avatar
      Sahir_Maharaj
      Super User

      4. Use any necessary transformations to clean and reshape the data.