Exact match for all fields in table with excel in Talend - excel

I have a table and an excel wherein I have to compare values for all the fields. If there is a mismatch in the fields with the excel for that row in that column then it should highlight which column is a mismatch with the table field.I m getting all the columns in the rejected instead of only a column with differed value i.e. here only my row 2, column 4 is different from the table. Here is my excel and the table structure. Also I have attached the output needed. Excel Input :
Table Input :
Job Design :
TMAP Design :
Expected Output :

Your mapping seems correct, debug your work following these stemps:
Make sure that data types are same for both inputs
Visualize each input using a tLogRow, check out if there is some whitespaces around fields.
There is a check box in the advanced settings of your input components to trim data and get rid of white spaces.
For the output, Talend cannot highlight cells or color it, think about something else, you can write in a new column the indeces of the unmached cells.

THIS IS RESOLVED. I put the data into other table and did a case query and joined the other table with the first table.

Related

Is there a way I can change a cell that holds data into a table using functions?

When converting data from PDF's into excel I have run into an issue where instead of giving me the table in a table format, it comes out in a single cell separated by spaces. I have been dealing with this issue for a while.
Here is an example of what the PDF converter will give me
The data in the left and right column are Identical in this case, but this is not the norm.
I have tried a few things. My first formula returns a single column of data, but each cell in the column has two data points.
=TRANSPOSE(TEXTSPLIT(D2,CHAR(10),,TRUE))
My second returns a single column of data, but only the first desired column.
=TEXTSPLIT(TRANSPOSE(TEXTSPLIT(D2,CHAR(10),"##0.00")),CHAR(32))
How do I turn this into a 2 column table with a formula?

Insert a table that contains values provided by a filter formula

The problem that I am facing right now is the following:
I am using the filter formula to return me a specific range of values (basically information from 5 different columns). However, I have other 7 columns on the right side that I will need to input manual data (so, 5 columns given by the filter formula and other 7 that I will need to complete).
The problem is that after filtering and manually inputting all data for the missing columns, I will need to insert a table including all 12 columns. But when I try to insert a table it gives me the #SPILL! error.
How can I insert a table that contains values provided by a filter formula?

Fetch value based on Filter values

I am working on an Excel file where This is my First Table.
Now I have another table that has exactly the same Column names
Now What I wanted is When the Value of Table1[Status] is Active or Pending it should fetch all the values in Table 2. and Don't do anything when the Status value is Pending or Empty
The Expected Output
I have tried the following query but I think I am doing it wrong.
=XLOOKUP([#GID];Table1[GID];SWITCH([#[Status]];"Active";Table1[Status];"Pending"))
Does anyone know how to solve this challenge?
Solution 1
A formula based solution cannot display the output in a Table.
Suppose your first table is called Tbl_Source, enter the following formula (in Excel 365) in a single cell and you will get the desired output:
=FILTER(Tbl_Source,(Tbl_Source[Status]="Active")+(Tbl_Source[Status]="Pending"))
Solution 2
If you want to show the filtered output in a new Table, you can try using the Power Query function which is built into Excel 2013 and all later versions.
Firstly, highlight any cell within the first table, then load the table to the Power Query editor:
Secondly, click the filter button on top of the Status column, and select the desired criteria as you would normally do in Excel:
Lastly, Close and load the output table. By default, Excel will load the output to a new table on a new worksheet. You can cut and paste the output table to the desired worksheet, or Google how to load the output to a query and then choose where exactly to load the output to.
If you want to add additional data or make changes to the first table, you need to right-click any cell within the output table and choose Refresh, then the output table will be updated with additional data.
Let me know if you have any questions.
First
Then (Choose Table)
EVALUATE
CALCULATETABLE(
Table1,
Table1[Status] ="Active" || Table1[Status] = "Pending"
)

Restructuring data in excel

I am trying to condense data in a specific way. I want any occurrences of the number 1 in each column to show up as 1 (regardless of how many times it occurs) with the corresponding site, in the corresponding column. Some sites occur multiple times in the original data, and I want to make it so that only one of each unique site shows up in the resulting data table with a 1 for the corresponding column if there any 1's in the column from the original data.
I would think it would be a vlookup function, but I have tried many different things and I am really stuck on this.
Image of original data and what I am trying to do:
Thank you
This assumes that your data set only contains 1 or blank and this approach uses a Pivot Table with MAX function. Below are details in case anyone doesn't know Pivot Tables.
Select a cell in your data and insert Pivot Table. Note, I added a title for column A, as you need that in the Pivot Table.
Click in the created Pivot Table and the PivotTable Fields dialog should pop up. If not, right click in Pivot Table and select Show Field List.
Drag the Field names (Code, a, b,& c) down to the appropriate blocks below. (Values under Columns will be created for you.)
Click on the drop down arrow next to each field name and select Max. That will rename it to "Max of ...". If that bothers you, then you can type the name you want into the Custom Name field. Note, it will not let you type the same name as the field name, eg a, but it will work if you put a space in front of it.
Given that the Pivot Table would be a lot of work for a large number of columns, here is a formula based approach. Put this formula in cell G2, then drag it down and across to fill your new table.
Note, you will have to populate all codes that you have in column F. And if any new codes are added later you will have to keep this updated. One of the advantages of a Pivot Table is that it will do this for you.
I know that you won't be putting this in these cells, so adjust accordingly. In fact, I would recommend this be in another sheet.
=IF(COUNTIFS($A:$A,$F2,B:B,1)>0,1,0)
COUNTIFS($A:$A,$F2,B:B,1)
This will count each occurrence when the value in column A matches your code $F2 AND the value in column B equals 1.
If that count is >0, then you know that at least one match was found and the IF will return 1, otherwise 0.

OR filter between table columns

Is there a way to filter Excel tables similar to how Access queries can filter fields with OR operators?
E.g. I have the following table:
I want to list all items with the Messis aspect. In Access, one would make a query with Messis OR Messis OR Messis.. each in the following line or with OR in between. I would like to do something similar in Excel...
If I understand your question correctly, you want to find the row(s) where text X appears in any one of several columns. To do this, consider adding a column that is the concatenation of each column. Then use the column filter to select rows that contain text X.
An example:
For Column 6:
Results in:
Alternate answer
If, on the other hand, you want the OR statement for a single column, you can use the OR feature of the AutoFilter. If that doesn't appeal to you, you can use add a range outside of the table that includes has the text of a column in its first cell. Put the possible text options in the cells immediately below. Here's a picture:
Then, with the cursor in your table, click on Data, Advanced and complete the dialog box as shown.
Click on OK to see:

Resources