Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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()
Hello,
You can create the jsonDoc manually by using the tWriteJSONField component.
Best regards
Sabrina
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
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
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()
Hello,
Many thanks for your feedback and contribution to the Community!
Best regards
Sabrina
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
Please find the screenshot on how I setup the component in Talend 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
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