Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: images data read and load using PDI

  1. #1
    Join Date
    Aug 2015
    Posts
    313

    Default images data read and load using PDI

    Hi Sir,Madam,

    PDI 6.1, Java 1.7

    I want to read data which is exist in excel file that is consists images as well. as of now i deal with data only not with images. Could you please help me what is best process to load the data with images.

    Is there any steps to read images in PDI tool. Attached my sample file data(imagedata.zip ) kindly help me

    Thank you
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Excel-Input does not extract images from cells into binary fields, but it is fairly easy to extract images using Unzip-File.
    You need an XML step (Get-Data-From-XML or XML-Input-Stream) to relate the images to the cells, though.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Aug 2015
    Posts
    313

    Default

    Sorry Marabu Sir. Actually i am not able to understand the logic how to read image using steps: (Get-Data-From-XML or XML-Input-Stream). I am trying from my end also.

    I should not ask this one but requesting you, could you please provide sample transformation for my excel sheet.


    I attached the zip file because of not able to upload excel file directly. client provided excel file directly to me.

    Kind regards,
    santhi

  4. #4
    Join Date
    May 2014
    Posts
    358

    Default

    I think what Marabu meant is that you have to treat the XLSX file as a zip file. You must first unzip it (in a job step), which will give you the image files and some XML files, and then read the XML files as XML input, not Excel input.

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by Lukfi View Post
    I think what Marabu meant
    and right you are, thank you!

    I'm so used to zip all my attachments, that it never crossed my mind someone would relate my mentioning of Unzip-File to the zip-format of the attachment.

    Image resources are under /xl/media and we can use a Copy-Files job entry to save them in a local folder.
    Layout using image references is in /xl/drawing/draing1.xml.
    A mapping of image references to the resources can be found in /xl/drawing/_rels/drawing1.xml.rels.
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Aug 2015
    Posts
    313

    Default

    Thank you very much sir. I'm able to load images to folder using your inputs. thank you very much Sir. Hope you are experts no need to post success transformation if need i will.

    Could you please tell me how can we convert Excel sheet rows into columns(in below context column1 consists all column names and column2 consists Data for the column1).

    I want to convert column1 to individual columns and data should be store to the respective columns. I am using (steps) for this approach
    Microsoft Excel Input -> Row Normaliser -> Row denormaliser

    column1 Column2
    Claim Number 1219677
    Item Number 02 F 418921
    Item Description F LITPT BNT SYNCV2 BRKT
    Serial Number
    Warranty Option R
    Claim Number 1263532
    Item Number 02 F 438818
    Item Description F LIT BNT FLARE RT USB WRLS
    Serial Number
    Warranty Option R
    Final result would be like
    Name:  data format.jpg
Views: 601
Size:  11.4 KB

    Thank you

  7. #7
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Row-Denormalizer is what you need, but you must introduce a group id first.
    So long, and thanks for all the fish.

  8. #8
    Join Date
    Aug 2015
    Posts
    313

    Default

    I am feeling shy to ask this, Could you please provide sample transformation for my task if possible. I tried but no luck sir.

    Thanks for your understanding.

  9. #9
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    It's not a matter of luck, believe me.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  10. #10
    Join Date
    Aug 2015
    Posts
    313

    Default

    Marabu Sir, Thanks for your inputs/suggestions. little bit late(of course i am tube light) but finally succeed,attached the .ktr

    test denorm xlsx copy.ktr
    Last edited by santhi; 02-22-2017 at 02:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.