cancel
Showing results for 
Search instead for 
Did you mean: 

Loading CSV files in HANA streaming

vinaya_hg
Participant
0 Kudos

Hi Folks,

I am encountering the following error when I am trying to load CSV data into HANA target in HANA Streaming

I want to load CSV data in runtime when I execute Streaming Project.Please help me

Thanks in advance,

Vinaya

Accepted Solutions (1)

Accepted Solutions (1)

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you trying to input this data through the Streaming Run-test perspective in HANA Studio? If so, are you using the Playback tool or the File Upload tool?

Specifically, the error indicates that the input file contained an invalid opcode. For an example of the expected record format, you can take a look the machine_data.csv file that is used in the Run and Test a Project in SAP HANA Smart Data Streaming part of the Get started with SAP HANA Smart Data Streaming tutorial. The expected file format includes the opcode in the 2nd column of each record.

vinaya_hg
Participant
0 Kudos

Thank you for answering Robert.

As you suggested ,I tried both the options of loading data ,

  1. File Upload : I appended extra column for opcode ,Please find the attached screenshot to check the format of the data.Even after I am facing following error :

  2. Playback : Even in this I am facing issue: Error

    Error: rec (5,506) - while trying to invoke the method com.sybase.esp.sdk.Stream.getStreamId() of a null object loaded from local variable 'stream'

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

One thing that sticks out is that format of your timestamp data doesn't match the required input format. A date time value needs to include a "T" between the date and the time values like "2014-06-03T12:00:00.000".

vinaya_hg
Participant
0 Kudos

I tried appending T to the timestamp data but still facing the same error.Can you please tell me why I am getting the error in playback option??Is it also because of the time related data.

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

The image attachment with the error message isn't showing for me, can you post it again?

vinaya_hg
Participant
0 Kudos

For playback option :

Error: rec (5,506) - while trying to invoke the method com.sybase.esp.sdk.Stream.getStreamId() of a null object loaded from local variable 'stream'.

For file upload:

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

That error is stating that there is no input stream or input window called pump_data in your streaming project. Can you share the CCL for the project or at least for the input streams and windows?

vinaya_hg
Participant
0 Kudos

I tried changing data as your suggestion .Now I am getting different error .

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

Unfortunately you're not giving me enough information to properly help. The previous error specifically indicated that the stream name provided in the CSV file didn't match any stream name in the project. I understand you made some change, but you haven't really told me what that was.

If you could provide a sample of the CSV file, say 5-10 lines, plus the CCL for at least the input stream/window, then I should be able to help you out.

vinaya_hg
Participant
0 Kudos

Sorry for not actually conveying properly.Please find the attached file .

pump-data.txt

RobertWaywell
Product and Topic Expert
Product and Topic Expert

We might be getting closer. One of the earlier errors that you posted stated that an input stream called "pump_data". Looking at the CCL that you provided, the actual name of the input stream in the project is "Pump_data". Note the difference in case between the 2 values with the input data using a lower case "p" while the project uses an upper case "P". Those values are case sensitive and need to match.

vinaya_hg
Participant
0 Kudos

Hi Robert,

Sorry for responding late.

Playback option is working for me but CSV loading still shows some data mismatch error.

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

It is good that you are making progress. If you look at the diagnosis files from the server and in particular the project trace file (.trc) you should be able to get a detailed error message that can help you identify where the issue is with reading in the .csv file. One common issue is with the file path.

Answers (0)