How to split one row in different rows in TALEND - data-migration

I need help to migrate one row from old DB to multiple rows in my New DB.
I have a data like:
OID CUSTOMER_NAME DOB ADDRESS
1 XYZ 03/04/1987 ABC
In my new DB i am storing data in KEY VALUE pair like:
OID KEY VALUE
1 CUSTOMER_NAME XYZ
1 DOB 03/04/1987
1 ADDRESS ABC
Someone please help me how to do this using TALEND tool.

you can use tMap multiple output linked to same output as one possible solution here. But it is not dynamic. why can you split the single row into multiple rows in source select query itself?
if you want to use this tmap option see below
tOracleInput(anyotherinput)-->tMap-->toutput/tlogrow
Take this row as input to tmap component and in tmap create one output group say out_1.
Now in this out_1 drag and link OID and CUSTOMER_NAME columns from input.
Now create another output group out_02 in this tmap and when "add a output" dialog comes
select "create join table from" and in the dropdown select out_1 group, so that our output rows from this out_02 group will also go to out_01 group.
So our tmap will have only one output group out_01 containing rows from both out_01 and out_02. now in out_02 drag and link OID and DBO columns.
similarly repeat it for out_03 and link OID and ADDRESS column..

Use tSplitRow to do it. Please see below.
Talend job:
output:

After spending hour or two I found a solution using Talend and without writing single line of Java Code.
if you follow all my steps then you will get desire result.
Note: I took your Inputs as a source for this development, so actuals may be differed.
Add tMap after your Input Source.
concatenate source columns with coma in single column.
at end of concatenated columns add semicolon. see the image for more details.
After tMap add tNormalize component and do setting as in image.
add tDenormalize component and and do the setting as in image.
Add tExtractDelimitedFields component and configured shown in image.
Add another tMap and do the setting as shown in image.
Now you have two output flows so add another tNormalize component for each output.
Configure first tNormalize component as shon in Image.
configure second tNormalize component with below setting, shown in image.
Our Final Job will be look like below image.
After doing all these things you will have this output
Now you can create another sub job to process these output to join and create new one as per your requirement.

tOracleInput(anyotherinput)-->tSplitRow-->toutput/tlogrow
Snap1
Snap2

you can use tPivotToColumnsDelimited.
Read More about it on talend Help Center.
This component will rotate your table on the basis of a row specified.
Thanks .

Related

Aligning vertically a series of tables with text

Hi I need the text to be in a specific format in a spreadsheet to be able to upload it on a translation tool.
I have already used the text split function to separate the text in a cell with bullet points, moving each bullet point to a separate cell.
enter image description here
Then I used the transpose function to separate each set of data. For context, you are looking at fashion products.
The name of the product is on the first row, followed by a list of features (e.g. "Bracciale" means bracelet and it is followed by the list of materials)
enter image description here
Now for the last step, I need these sets to be vertical, not horizontal. Like this:
enter image description here
I would like to set up an automatic system so that every time we receive a list with hundreds of these products we do not need to copy-paste them one below the other.
With pivot tables maybe? Keep in mind that if it is too complex it might be hard to train the translators to do it each time. Please let me know your suggestions. Thank you!
I am not a programmer. I tried pivot tables but the data was in the wrong order and I am not sure how to get the data out from the pivot table with values only without the sub-menus.
My suggestion would be to use the 'Unpivot Columns' feature in the Power Query Editor - it would be really simple.
Steps:
Select the whole range
Go to Data // Get & Transform Data // From Table/Range
Uncheck 'My Table has headers' (unless it does - but doesn't look like it?)
Press OK. This will open Power Query Editor and will have actually given you column names Col1/2/3 etc, but ignore that.
Go to Add Column // Index column
Select all columns EXCEPT the new index column by Shift+clicking on those headers
Go to Transform // Unpivot Columns
Assuming the order is important, click in the Attribute column and Sort Ascending
Click in the Index column and Sort Ascending
Remove the Attribute and Index columns if you want (right click header)
Go to File // Close & Load
You will get a new table - dynamically linked to the first (ie. can be updated/refreshed) - in the unpivoted format.
Let me know if you need more details / screenshot?
Based of this trick, maybe the following is helpfull:
Formula in A5:
=DROP(REDUCE(0,A1:A3,LAMBDA(a,b,VSTACK(a,TEXTSPLIT(b,,HSTACK(CHAR(10),"^"),1)))),1)
TEXTSPLIT() will use a combination of newline chars and the circumflex to split the input directly into a vertical array;
Iteration in REDUCE() will allow for stacked results;
DROP() the initial value from results.

Highlight the updated values when file data or version gets updated in Azure Data Factory

I have created a dataflow in Azure Data Factory to find the differences between the two files, both the files have the same columns and structure. I would like to find/highlight the changes to each value rather than get the updated rows as the output which I am currently getting.
Example:
Current output -
No.
Name
Email
1
Jack
jack#email.com
Desired output -
No.
Name
Email
Jack
I wish to either get the unchanged data in the row as NA or a blank or the changed data as highlighted in some way.
Dataflow -
Thank you for the assistance
I think you should be use the CRC function ( something like crc32(columns()) and get the hash of each row for both the files and the join on the hash1=hash2 and it should give you all the rows which has not been updated and have an exact match .
For the row with some changes , you can use also you can use join hash1!=hash2 clause bnut you will need one unique identfier .

Create a search option in Power BI dashboard based on keywords table

I have two tables
With complete data, including a keywords columns. where keywords are comma separated (around 25 keywords)
Unique keywords extracted from the keywords column. (single column with each keyword in each observation)
Task is, based on the keyword in the second table, search the observations that have similar keywords and display on the report.
Looks something like this:
This is a filter, which is not fulfilling my task.
(or)
I am back of https://ideas.powerbi.com/ideas/idea/?ideaid=a586deac-c465-48da-978b-30ac2a4a3245 this activity. if someone can provide any solution related to this, will be helpful :).
I'm not sure what do you try to achieve. If you want just filter some visualization by selecting one of the keywords then create a measure (returning 0 /1, and this we can use for the filter in visualization) using SELECTEDVALUE -> for grabbing selected slicer and pathcontains (you need to replace comas ", " to pipe "|"
https://dax.guide/pathcontains/

Pentaho, how to pull data from cells

I'm a new user to Pentaho AND a fairly weak user of Excel sheets, what I need Pentaho to do is what is described in the image. At the step right before conclusion I have several cells with different data.
I need to sort of merge them together into 1 cell with all the right data. I tried Normaliser/De-Normaliser and I couldn't get it to work properly.
In excel what I do is basically pull the data UP the columns to the cell I want based on a key which is common to those lines.
Let me know if someone needs further information.
In the transformation i receive a formated text file input, up until step 25 (obs) i'm reading only the first line of the text, which is where most of the information i need is located, by the pattern there are other possible 9 lines in each entry, some entries have up to 23 line,others have 6 only. Most of the data i can extract from line 1, but i also need data from 2 other lines, which the step "obs" exctracts with formulas by comparing the 2 initial digits, and then cutting the string i need from those lines, the thing is before doing the "filter rows" step, those information cells are not agregated in the same line, i need them all to be in the same line, as i posted the first image, but i cannot find the step that does so, or i don't have the knowledge to make said step function properly.
If you need more information please let me know.
I'm using this many steps because at some point i'll add triggers and validations for most of them to ensure data integrity.
Found the answer myself, first i had to use a Group by with a key that is present in all lines of the same "block" of cells, then another problem surfaced where the top line of the block contained information i needed,but it didnt have the group by key, therefore i had to use the Get Previous Row Field step to have those rows present BEFORE the Group by step. Hope i helped.

how to display sum of field in axgridview

I'm working with Microsoft Dynamics AX R3,2012 and i want to add a group by field in an dynamics:AxGridView then a sum for a certain field by the group field indicated then the total sum without the group by .Please help me .i didn't find a solution.like what described in this page http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm
You can create a display method to compute your sum on each row. If you do so, don't forget the 'cacheAddMethod' in order not to compute it each time. This is the "historical" way.
More info on display methods.
Or you can create a view and use computed column in it. It will depends on your current datamodel and query you want to run.
More info on computed column in views.
Thanks for your reply,My Problem is not to create display method but the Problem is how to display the sum of subtotal by this display field.So my solution is to add GroupField in the AxGridView with designed field like GoalId in my case.then in the AxGridView i create template field with footer containing label not visible in default. So in rowdatabound i do the total by the new group that known with a test in rowcreated in GoalId 's value changes .Then when i get a new group i put the value of cumul of the previous value of a the previous group and in the footer template i display the total of all rows.this is the solution and thanks so much for your help. but now the problem that i noticed that axgridview have problems after updating data with a groupby fields and with template field.it display noting in this fields

Resources