How to read the entire CSV file content

Hi All,
I am using JDBC adapter and i need to send the entire CSV file to the Blob datatype filed.
How to achive this?
Thanks
Mahi.

Hi Mahi
So you want to send the content of the entire CSV file to a particular field in data base?
You can write a java mapping to read the content of the CSV file and then populate the same under the field of the data base.
If you need help on java mapping then please provide the sample CSV file and the target JDBC structure.

Similar Messages

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • How to send the entire binary file as Content in mail adapter

    Hi,
    I have the below scenario:
    A binary file is there on the XI server and this is more than 1 lines.
    This file needs to be sent across to certain email addresses via the XI interface.
    I have made the design and config and now get the the mail but so far not been able to get the file contents.
    The requiremnet is to send the entire file contents in the mail so that they appear in the body of the received mail.
    How do i do it?
    Can you please advice.
    Regards,
    Archana

    Hi,
    I am giving below the incoming mesasge details and the outgoing Mail message details.
    Sender File Adapter:
    Mesasge Content/Payload:
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_Ack_Mail_In xmlns:ns="Urn:Serco-com:interface:Banking:HSBC:FileTransfer">
    - <Content>
    - <Mail>
      <Details>UNBUNOA:3HEXAGON-ABCABC10268002081201:2152+692125127893</Details>
      </Mail>
    - <Mail>
      <Details>UNH1CONTRL:2:2:UN:APACS</Details>
      </Mail>
    - <Mail>
      <Details>UCI1000246720ABC10268002HEXAGON-ABC4+C09</Details>
      </Mail>
    - <Mail>
      <Details>UNT31</Details>
      </Mail>
    - <Mail>
      <Details>UNZ1692125127893</Details>
      </Mail>
      </Content>
      </ns:MT_Ack_Mail_In>
    Receiver Mail Adapter:
    Message Content/Payload:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>ME-Acknowledgement</Subject>
      <From>email of from</From>
      <To>my email</To>
      </ns1:Mail>
    I need to map the contents of the incoming payload Contents/Mail/Details (all the 5 instance) to outgoing Missing Content (after To field).
    If it can be in Mail body, then it would be best else please suggest what other option can I use?
    Also, If i want the file name to be in the subject of the mail, is that possible to be picked up in the configuration?
    Please help.
    Regards,
    Archana

  • How to Read excel or .csv files in java

    I am writing a program which takes input as excel or .csv file.
    How to read these files.
    Any API's are existed or need to use the third party jar.
    Please suggest me.
    Thanks & Regards

    Did you search in google? Did you search here? There are so many excel related questions here, including answers about third party libraries.
    I have the impression that you didn't research at all.
    _[How to ask questions|http://faq.javaranch.com/view?HowToAskQuestionsOnJavaRanch]_ It's the same here.

  • How to read the java class file to convert it in java.

    hello all,
    i m developing the java application which generated the java code from the java 'class file' .
    Can anybody please help me, Is any java support for reading the class file? or how to know the class file format?
    I know the application javad, jad, javap which is doing the same thing.
    thanks for reply,
    - Jayd

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • How to read the extension .RNO files.

    Guys..
    We are implementing B2B scenario ,
    We are getting .RNO file with Rossettanet, Preamble, ServiceContent, OrderCreate, and DigitalSignature  tags in it. Once XI got .RNO file, XI needs to map with ORDERS05 and send to R/3.
    Can any one explain me
    how to validate the DigitalSignature,
    how to convert .RNO file to XML? or Is there any XSD document which includes “Rossettanet, Preamble, ServiceContent, OrderCreate, and DigitalSignature”.
    Thanks
    M

    Hi Murali,
    1) Are you using the SAP business package for B2B over Rosettanet -- This contains the Mappings to backend ERP system but comes at an extra license cost .
    From your description, I assume that you are the seller ?
    2) The conversion of a RosettaNEt PIP message into XML is done ( keeping only the service content payload to be mapped afterwards ) by the XI RNIF adapter. What version of RNIF are you using RNIF1.1 or RNIF2.0
    Also signature validation should be done by the adapter by setting the right flags in the adapter.
    Many variants are possible but i depends on what you agreed with your partner
    3) The security settings are done in the sender/receiver agreements and in the communication channels
    rgds
    Dirk

  • How to read the latest created file ?

    Comment je peux avoir le nom du fichier le plus récent (ayant la date de modification la plus récente) ?
    How can i get the name of the latest created or modified text file ?
    Thx for help.

    (BiJay: That will not work unless both folder paths are the same. It is a bad idea to have identical diagram costants scattered all over, because any change in code would need identical changes in several places, creating a maintenance headache and potentials for error.)
    You need to wire the folder path from the outside to the inside of the loop. Then you also need to sort by modification date to get the newest file.
    This assumes you only want *.txt files. Change the pattern if needed.
    Here's a quick snippet.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    GetNewestFileInFolder.png ‏38 KB

  • How to read the tail of a large file?

    My application writes to a log file. I want to read the end (say last 100 lines) of the logfile and display it on a web page. I dont want to read the entire log file as everything apart from the last 100 lines is irrelevant. Is there a way to do this? The only thing i can think of is to do this on a linux command prompt "tail logfile.txt > storehere.txt " and then read storehere.txt. Not ideal. Is there a way i can read the last 100 lines or better still have a continous stream of the last 100 lines of the log file?

    This question has been ask here before; but, I am not sure that a good solution was found.
    Assuming the file does not have fixed length records (then it would be easy), the only thing I can think of is:
    Use RandomAccessFile to read the bytes in the file backwards and store them until you have processed 100 lines. In reality, you would probably not want to read one byte at a time but read "chucks" of the file into a buffer and process those bytes. Similar to how BufferedInputStream works only getting the bytes in reverse order.
    I.E.
    Create a class that returns a byte of the file in reverse order. This class would fill a buffer with a chuck as needed.
    One big issue with this idea is if you are reading Unicode characters - multiple bytes would need to be consumed to pass back a character and since not all Unicode characters are 2-bytes, this could get messy.

  • How to Read the "text file and csv file" through powershell Scripts

    Hi All
    i need to add a multiple users in a particular Group through powershell Script how to read the text and CSV files in powershell
    am completly new to Powershell scripts any one pls respond ASAP.with step by step process pls
    Regards:
    Rajeshreddy.k

    Hi Rajeshreddy.k,
    To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
    To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
    $Users = Get-Content -Path 'C:\ListOfUsernames.txt'
    $Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
    Add-ADGroupMember -Identity $Group -Members $Users

  • Reading a Blob (CSV file) and displaying the contents

    Hello Experts,
    I’m currently working on a system that allows the users to upload an Excel spreadsheet (.xls) in the system. The upload page is a PL/SQL cartridge. Then I’ve written a Java servlet (using Oracle Clean Content) to convert the XLS into a CSV and store it back in the database. (it is stored in the “uploaded_files” table as a blob). I’m trying to create another procedure to read the contents of the blob and display a preview of the data on the screen (using an html table (will be done using cartridge)). After the preview, the user can choose to submit the data into the database into the “detail_records” table or simply discard everything.
    Can anyone provide me any guidelines and/or code samples for reading the contents of a blob and displaying it as an html table? My data contains about 10 rows and 20 columns in the spreadsheet. I’ve been looking into using associative arrays or nested tables but I’m getting confused about how to implement them in my situation.
    Any help is greatly appreciated.

    BluShadow,
    Thanks for your response. The reason that it is a blob is that we use the same table for uploaded files for several applications. Some files are text, some excel, some other formats. Hence the table has been set up in a generic sense.
    However, in my procedure, I'm using
    DBMS_LOB.createtemporary and
    DBMS_LOB.converttoclob
    Is there any way you could possibly provide an example of how to read the contents of the file?

  • How to read the contents of attached files

    Hi,
    I am designing a Form using LiveCycle Designer 8.0
    Scenario:
    User can attach the file through "Attachments" facility provided on Adobe  Reader.
    The requirement is to attach 3 documents and post it to SAP system using Web services.
    I am using the following code(which i got from this forum only) to find the number of files user has attached.
    d = event.target.dataObjects;
    n =  d.length;
    xfa.host.messageBox("Number  of Attachments: "+n);
    //Displaying  the names of the Attached files
    for( i =  0; i < n; i++ )
    xfa.host.messageBox("Name  of the file: "+d[i].name);
    My problem: is how to read the contents of the attached files so that I post it to SAP using Web services
    Thanks in advance!!
    Taha Ahmed

    In order to read the content of the Redo Log files, you should use Logminer Utility
    Please refer to the documentation for more information:
    [Using LogMiner to Analyze Redo Log Files|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm#SUTIL019]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to read the content of a text file (by character)?

    Guys,
    Good day!
    I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
    Please help me. Thank you so much in advance.
    Jojo

    http://java.sun.com/javase/6/docs/api/index.html
    package java.io
    InputStream.read(): int
    Reads the next byte of data from the input stream.
    Implementation:
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to read the content of ms-word file use pure java???

    how to read the content of ms-word file use pure java???

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to read the CSV Files into Database Table

    Hi
    Friends i have a Table called tblstudent this has the following fields Student ID, StudentName ,Class,Father_Name, Mother_Name.
    Now i have a CSV File with 1500 records with all These Fields. Now in my Program there is a need for me to read all these Records into this Table tblstudent.
    Note: I have got already 2000 records in the Table tblstudent now i would like to read all these CSV File records into the Table tblstudent.
    Please give me some examples to do this
    Thank your for your service
    Cheers
    Jofin

    1) Read the CSV file line by line using BufferedReader.
    2) Convert each line (record) to a List and add it to a parent List. If you know the columns before, you might use a List of DTO's.
    3) Finally save the two-dimensional List or the List of DTO's into the datatable using plain JDBC or any kind of ORM (Hibernate and so on).
    This article contains some useful code snippets to parse a CSV: http://balusc.xs4all.nl/srv/dev-jep-csv.html

Maybe you are looking for