Talend tLogCatcher emits all fields null in tJava - talend

I want to send all Java errors of my Talend flow, to a Slack channel. Therefore I'm using a tLogCatcher as an independent component inside my flow. When an error occurs, I see all error fields in a tLogRow component like that:
.-------------------+------+--------+----------+-----------------+------------+-------+--------+--------------+----------------------+--------------------------------------------------------------------------------------------------+----.
| tLogRow_2 |
|=------------------+------+--------+----------+-----------------+------------+-------+--------+--------------+----------------------+--------------------------------------------------------------------------------------------------+---=|
|moment |pid |root_pid|father_pid|project |job |context|priority|type |origin |message |code|
|=------------------+------+--------+----------+-----------------+------------+-------+--------+--------------+----------------------+--------------------------------------------------------------------------------------------------+---=|
|2021-02-16 09:56:51|hasqZB|hasqZB |hasqZB |PREPROCESSOR_DATA|rf_dwh_kunde|Default|6 |Java Exception|tFileInputProperties_1|java.io.FileNotFoundException:\conf\config.cfg (Das System kann den angegebenen Pfad nicht finden)|1 |
'-------------------+------+--------+----------+-----------------+------------+-------+--------+--------------+----------------------+--------------------------------------------------------------------------------------------------+----'
When I add an additional tJava object after the tLogRow and simply try to print the object like this
System.out.println(row4);
I get the following result
preprocessor_data.rf_dwh_kunde_0_1.rf_dwh_kunde$row3Struct#6767c1fc[moment=null,pid=null,root_pid=null,father_pid=null,project=null,job=null,context=null,priority=null,type=null,origin=null,message=null,code=null]
.
where all fields (moment, pid, origin, etc.) are suddenly "null".
Any idea why that is the case?
I already tried appending the tJava directly to the tCatchLog, result is the same. Watched some tutorials on YouTube, supposing it should work like that.

Use tJavaRow instead of tJava and it works.

Related

grafana logql query using line_format and regexReplaceAll dynamically

I need to read my logs just like they were displayed in the application console.
My grafana LogQL query looks like this :
{job="myjob", host="myserver"}
| json
| line_format `{{ regexReplaceAll "{(.*?)}" .MessageTemplate "{{.Properties_${1}}}" }}`
It ouputs a json object, I would like to use the "MessageTemplate" property and replace all the bracketed variables back where they belong so the log is readable in grafana log dashboards.
My problem is when using regexReplaceAll("<regexp>" <String_To_search> <output>) you cannot parse the output as a variable. Is there a way to do this that I missed ? I've tried hundreds of combinations and parsed through the official documentation.
Please let me know if it's impossible !

using get-odbcdsn across all domain computers

So I need to create a report of what odbc-dsns are on computers.
The first hurdle I'm trying to do is get the csv to output correctly on MINE. Then I figure I'll just deploy a runonce group policy with the script set to append.
The problem is that get-odbcdns returns an object. That object has:
Name: the friendly name of the odbc
Attribute : {Description}
I just want to be able to formatlist with the VALUE of the {Description} value inside the Attribute property. I can't figure out how to do that.
Whenever I go | fl name, attribute
it returns 1sl-den-db01 and {description} I would like for it to actually parse out description from Attribute. No idea how. Thoughts?

Talend - How make a context of a tMap component

I have a Talend Job that currently does the following:
Input csv (tFileInputDelimited) --> tMap --> Output csv(tFileInputDelimited)
The goal of my job, is keep a value from the tMap, and use it to rename the output file.
I've tried to use a context and specify the row and the column I want to use, but it didn't work.
I'm a beginner, I use talend during an intership, I started 6 years ago, so I don't know many things ^^
Thank you for you future help !
You can use a tJavaRow to capture the value from the flow and assign it to the variable, the code will be like this :
// get the value of wanted_field of the id 40
if (input.id == 40) context.myvar = input.wanted_field
Your job will look like this:
Input csv (tFileInputDelimited) --> tJavaRow --> tMap --> Output csv(tFileInputDelimited)

Talned - How to add a THashInput to a TMap - Talend

I am new to using Talend.
The first table is fed into tHashOutput1. This part works fine.
The tHashOutput1 is fed into tHashOut2 and tHashOutput3.
From tMap_3 is fed from user . When i try to feed tHashInput3 into the tMap i am not allowed to do this. What is wrong with this.
Please make sure that tHashInput3have the schema of tHashOutput1, as you can see there is a small yellow warning on the tHashInput3 but it not exist on tHashInput2. Also, there is no output from the tMap3 to see if it works.

Matlab/Simulink: If block error

Please refer to the image at the following link attached for understanding the question.
Image is at this link: http://www5.picturepush.com/photo/a/12014483/img/12014483.jpg)
here are 2 inputs: 1.Speed_Pulse 2.PreviousSpeedPulse_1_old
The second input is nothing but the first input delayed in time by 1 time instant using the unit delay block. The 'If' block compares the 2 inputs. If the input 'u1' (Speed_Pulse) is less than 'u2'(PreviousSpeedPulse_1_old) then, in the 'if action' block, the value 64 is simply added to u1 (Speed_Pulse) value. Else, the input Speed_Pulse is directly transmitted to the output via the 'else action' block. One of the outputs is transmitted to 'Temp' (depending on the 'if-else') using the 'Merge' block.
Now, please refer to following table of inputs and outputs.
The table is at this link: http://img521.imageshack.us/img521/8684/tablewy.png
In the table, the values are wrong for instant 4 and instant 7.
I could not find a reason for this abrupt wrong output.
Any idea what is going wrong?
Sorry it was my mistake. Actually I was using a Framework below it and it was the error of the Framework. Got it resolved. Thanks for your help.