One Star

Unable to load date-time variable from CSV to Couchbase

Hi guys,
Need some help, I am using TOS for Big Data v5.3.1. Am experiencing problems loading a date time variable from a CSV file into Couchbase. (through the components tFileInputDelimited and tCouchbaseOutput)
Getting the following exception:
"Exception in component tCouchbaseOutput_2_Mid
java.lang.IllegalArgumentException
at java.util.Date.parse(Unknown Source)
at java.util.Date.<init>(Unknown Source)
at couchbase_test.test_case_0_1.Test_Case.tCouchbaseOutput_2_MidProcess(Test_Case.java:1811)
at couchbase_test.test_case_0_1.Test_Case$1ThreadXMLField_tCouchbaseOutput_2_In.run(Test_Case.java:730)
"
The datetime format is in the form "MM/dd/yyyy HH:mm:ss". Using the same tFileInputDelimited, i could load the file into PostgreSQL, so the problem seems to be at tCouchbaseOutput side.
Wondering what am I missing.

Regards,
YH
5 REPLIES
Moderator

Re: Unable to load date-time variable from CSV to Couchbase

Hi,
Is the connection for Couchbase successful? Would you mind giving us your tCouchbaseOutput component setting screenshot so that we can address your issue quickly.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Unable to load date-time variable from CSV to Couchbase

Hi,
Is the connection for Couchbase successful? Would you mind giving us your component setting screenshot so that we can address your issue quickly.
Best regards
Sabrina

Hi Sabrina,
working with YH on the same project. Connection to Couchbase is working we can import it properly as soon as we set it as a string vs a DateTime variable. I can't seem to paste a screenshot here :-(
The datetime variable is like this: 8/1/2013 16:31:06
What we've tried in the component (edit schema) is to set it to type = Date and the Date Pattern to ""MM/dd/yyyy HH:mm:ss"
May I ask why Talend doesn't offer a datetime format to choose from?

Thanks in advance,
Andreas
Moderator

Re: Unable to load date-time variable from CSV to Couchbase

Hi,
"Exception in component tCouchbaseOutput_2_Mid
java.lang.IllegalArgumentException
at java.util.Date.parse(Unknown Source)
at java.util.Date.<init>(Unknown Source)
at couchbase_test.test_case_0_1.Test_Case.tCouchbaseOutput_2_MidProcess(Test_Case.java:1811)
at couchbase_test.test_case_0_1.Test_Case$1ThreadXMLField_tCouchbaseOutput_2_In.run(Test_Case.java:730)
"

I have made a testing for date(8/1/2013 16:31:06), everything is fine. I don't think it is data type issue.
So I need your component setting screenshot to see if it is correct.
You should register and log in as a Community member first, then you'll get a Image upload box that allows to upload screen captures and images up to 200KB.(.png is preferred)
For registered users, clicking on "post reply" (not through the quick post")
See my demo job screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Unable to load date-time variable from CSV to Couchbase

Hi Sabrina,
Thanks for the spedy reply. Here are the screenshots. I notice we're using different input objects. (tfileinput vs tflowinput)
Regards,
YH
Moderator

Re: Unable to load date-time variable from CSV to Couchbase

Hi,
Thanks for the spedy reply. Here are the screenshots. I notice we're using different input objects. (tfileinput vs tflowinput)

The tfileinputdelimited or tflowinput will not affect the job. But I suspect something wrong with your input source. Could you use a simple input source for testing to see if this issue repro again?
Such as:
name;date
xxx;xxxxxxxxxxxxxx
See my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.