How can i filter csv column with Talend - talend

I want to filter a column, so that it return only row with 'walid' values
so here what i did, but it actualy return no row inside csv
enter image description here
Thank you in advance !

Could you try this
!Relational.ISNULL(row1.Nom) && row1.Nom.trim().toLowerCase().equals("walid")

Related

Removing rows based on condition Pyspark

Let's assume I have a dataset which contains the following data :
data = [('James','Smith','M',30),('Anna','Rose','F',41),
('Robert','Smith','M',62),('Jake','Rose','M',21) ]
I now want to remove all row that contains the same last name and gender (first and third row in the above dataset) using Pyspark.
Thank you for your time 👍
with_duplicates = data.groupBy("last_name", "gender").agg(count("*").alias("count")).where(col("count") > 1)
without_duplicates = data.join(with_duplicates, ["last_name", "gender"], "left_anti")

Update data to array column Postgres

I wouldike to send some data to my column (type array)
But the syntax doesn't work...
UPDATE car
SET ctn_color = array_cat(ctn_color, '{red,blue}');
WHERE ctn_identifiant_car='CONT_ABC';
Thanks for your help !

Display a value in one column based on a value in another column

I have two columns:
Of Procs
Of Procs with a procedure time
If column 2 is blank, and column 1 has a value, then I need column 2 to display a zero. What would a formula look like for that?
Use this formula
if ({Of Procs}="") then "0"
else {Of Procs}
I tested it and it works.
Hope it helps
if (isnull({TABLE.column 2}) or {TABLE.column 2}="")
and
(not(isnull({TABLE.column 1})) or {TABLE.column 1}<>"")
then
"0"
else
{TABLE.column 2}

Selecting all record in mysqli

I want to select all record in mysqli, I am using the following syntax
$stmt->get_result();
but i am getting single data, i want to select all the data and then apply the while loop on the data.
Thanks In Advance
Wrap it in a while loop:
$stmt->get_result();
while ($row = $result->fetch_array(MYSQLI_NUM)) {
$rs[]=$row;
//Or just process it here.
}
Or use http://php.net/manual/en/mysqli-result.fetch-all.php

Delete Column from spreadsheet using OpenXML

I was wanting to delete a column using openxml, I am able to clear the contents of the cell, but have been unable to find documentation to delete the column as to shift the other cells left when the column is deleted. How may I delete the column using openxml where it will shift the cells to the left?
I discovered that OpenXml has no way to delete a column on its own. Therefor to solve my problem I wrote a function that first removed the contents of the cells in the column I was deleting and then to set the cell reference of the columns that came behind the column I was deleting up a column.
You can iterate for each row and remove the cell you need
private void RemoveCell(int rowIndex, int colIndex)
{
SheetData sheetData = _worksheetPart.Worksheet.GetFirstChild<SheetData>(); // get the sheet
Row row = sheetData.Elements<Row>().FirstOrDefault(r => r.RowIndex == rowIndex);
if (row != null && row.Count() > colIndex)
row.RemoveChild(row.ElementAt(colIndex));
}