tCouchbaseInput in Talend Bigdata 7.0.1

Highlighted
Six Stars

tCouchbaseInput in Talend Bigdata 7.0.1

Hi, 

 

tCouchbaseInput component has predefined schema and data comes in the field "content" (See attached screenshot for the screenshot)

 

Does anyone have any idea on how to get into individual fields inside the "content".

 

My requirement is to perform some transformation on few of the fields of couchbase records.

I tried to put the content field using tFileOutputJSON component but it does not seem to create the correct JSON document.


Accepted Solutions
Six Stars

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Attached is the code routine to convert JSON String to Java Object.

It has two parts:

1. JSONData  - Define the JSON structure of your data.

2. JSONParser  - Fetch the data

 

Individual fields can be fetched using get methods in tMap (E.g.)

(JSONParser.convertJsonToJava(valid.content, JSONData.class)).getName() 


All Replies
Moderator

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hello,

You can create the jsonDoc manually by using the tWriteJSONField component.

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.
Six Stars

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hi Sabrina,

 

I believe tWriteJSONField works with the case where we have individual fields as input, However  tCouchbaseInput component does not fetch the fields from Couchbase Document, it gets entire JSON String. (See my original Screen Shot). Due to this reason i was not able to build JSON using tWriteJSONField.

 

Solution:

I have created a custom code routine using Jackson jar to parse the individual fields from JSON String.

 

Thanks,

Sanjay

Moderator

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hello Sanjay,

Thanks for your feedback.

Would you mind sharing your custom code routine using Jackson jar with us? We will appreciate it.

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.
Six Stars

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Attached is the code routine to convert JSON String to Java Object.

It has two parts:

1. JSONData  - Define the JSON structure of your data.

2. JSONParser  - Fetch the data

 

Individual fields can be fetched using get methods in tMap (E.g.)

(JSONParser.convertJsonToJava(valid.content, JSONData.class)).getName() 

Moderator

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hello,

Many thanks for your feedback and contribution to the Community!

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.
Two Stars

Re: tCouchbaseInput in Talend Bigdata 7.0.1

I am not able to connect to my couchbase 6.0 with tCouchbaseInput in Talend Bigdata 7.0.1.

Can you please show me how to configure the component with an example please. 

I would like to query and insert data in and from a couchbase.

Thank you

Six Stars

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Please find the screenshot on how I setup the component in Talend 7.0.1

Couchbase.jpg

 

Moderator

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hello @manon

 

Couchbase 6.0 is not list on the supported database table by talend component.

For more information, please refer to this online installation guide about:TalendHelpCenter: Supported Third-Party System/Database/Business Application Versions

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.
Moderator

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hello @stamrake

Are you using couchbase 6.0 in talend bigdata v 7.0.1? What's the error message are you getting when connect to couchbase?

Here is online installation guide about:TalendHelpCenter: Supported systems, databases and business applications by Talend components

In the documentation we provide a list of databases that are supported, in the sense that we do provide an SLA and technical support for them. This doesn't mean other (non-listed) databases will not work but simply we won't necessarily be equipped to help you with any issue you may face with them.
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.
Six Stars

Re: tCouchbaseInput in Talend Bigdata 7.0.1

Hi Sabrina,

 

I am successfully able to connect to couchbase 5.x version.

Only issue i see is that you must pass Bucket name same as Username.

If I try to connect using different Username, connection would fail.

In my case my Bucket name is "Couchbase_Bucket" and I am able to connect to it successfully only If username is "Couchbase_Bucket".

If i pass any other username it would not work.

 

Thanks,

Sanjay

IF

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now