Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Joe
2011-07-15 15:58:38

Thank you shong and janhess

another problem,If the project that i shall do contains  a lot of data(more than10,000,000 rows),how can i avoid the outofmemory exception? now we take the way of storing the data into files first ,and then reading data from file on disk . It seems to work fine,except a little slow.  Is there any other better ways?
there will be several jobs running parallelly,so we must take care of the memory.


joe

janhess
2011-07-15 15:09:19

There isn't a null value for files, just empty. If you want to include the value null you will have to do it in your tMap.

shong
2011-07-15 13:02:38

Hi

Don't know why you use a demited file, but you can convert empty to null on tMap after read it from demilted file, eg:
row1.columnName.equals("")?null:row1.columnName

Best regards
Shong

Joe
2011-07-15 11:58:10

Hi Shong
  Yes, I have tested that already. If I write the data into delimited file first,and then write it to database,it is still empty. If I write it into  table directly from one database to another,it is ok,with the ‘NULL’ Value. But,the table has mass data,and if i process it without delimited file ,it may lead to outofmemory exception and low efficency.

Joe

shong
2011-07-15 11:37:37

Hi Joe
Can you please test it is null or empty on column flag as 'NULL' after you read from table? For example:
tMssqlInput--main--tJavaRow

on tJavaRow:
if(Input_row.columnName==null){
System.out.println("it is null");
}

or


if(Input_row.columnName.equals(""){
System.out.println("it is empty");
}

Let me know your test result!

Best regards
Shong

Joe
2011-07-15 11:11:43

Hi all

     In the original table in sql server,column flag was 'NULL', when i extract data from this table via talend ,and write it into delimited file , it values '',blank. How can i keep the column flag the same as 'NULL'? Except using tReplace.




Best Regards!
Joe

Board footer

Powered by FluxBB