DMS - Show column Value only if another field equal specific Value - amazon-web-services

I'm trying to update my DMS script (JSON) with the role:
if column 'type' in table X =1 then show column 'name' in table Y value,
Else, show column 'name' in table Y as null;
Example:
Table X:
x_id
type
1
0
2
1
Table Y:
y_id
name
x_id
1
Yossi
2
2
Dan
1
Result for table Y after DMS process:
y_id
name
x_id
1
Yossi
2
2
null
1
Im using DMS to transform data from MySQL to Redshift.
Thanks

Related

PowerBI - calculated field to check for dissimilar items in a semi-colon separated list in a row cell

I am using PowerBI desktop to create visualization from data source (a table in excel sheet) and I need to create a calculated field from one of the columns from the data. One of the columns in my data table is as follows:
Technology
A
A;A
B;B;B
C;D;C
A;A;B
B;B;B
D;D
A;
;
;;
I want to create a new column of type Boolean that outputs 1 when only one unique item is in a row of column and 0 when items in the semi-colon separated list are not unique. Like this:
Technology
New Column
A
1
A;A
1
B;B;B
1
C;D;C
0
A;A;B
0
B;D;B
0
D;D
1
A;
1
;
0
;;
0
How can I do this in PowerBI desktop?
EDIT: Updated requirements to test three more cases. (last three rows)
Add a new column and type in the following:
if List.Count( List.RemoveItems( List.Distinct( Text.Split([Technology],";")), {""})) = 1 then 1 else 0

Informatica Cloud Data Integration - find non matching rows

I am working on Informatica Cloud Data
Integraion.I have 2 tables- Tab1 and Tab2.The joining column is id.I want to find all records in Tab1 that do not exist in Tab2.What transformations can I use to achieve this?
Tab1
id name
1 n1
2 n2
3 n3
Tab2
id
1
5
6
I want to get records with id 2 and 3 from tab1 as they do not exist in tab2
You can use database source qualifier overwrite sql
Select * from table1 where id not in ( select id from table2)
Or else you can use informatica like below.
Do a lookup on table2, on join condition on id.
In exp transformation, create a flag
out_flag= iif(isnull (:lkp(id)),'pass','fail')
Put a filter next and keep the condition as out_flag= 'pass'
Whole map should be like this
Lkp
|
Sq --exp|-----> fil---tgt

Create an indicator variable for a table relationship after an outer join

I am working with data from a data cube, meaning I cannot easily control the structures of my underlying data. My underlying data looks like the below. As a Cube datasource, each one of these columns also is its own table with define join relationships between one another. For example, to select the Group1 column on its own would look like 'Group1'[Group1].
Group 1
Group2
Group3
Desired Column
1
a
x
1
2
a
y
1
3
a
y
1
4
b
y
1
5
b
y
1
6
c
z
0
I am trying to create a variable that reflects what is shown in "Desired Column" so that I can include results for any value of Group2 that matches to the "y" value of Group3.
I am not very fluent with DAX, but my preliminary thoughts on an approach are to run a FILTER on Group3 for "y", select values of Group2, and then somehow use those Group2 values in a CONTAINS statement in a further FILTER. Here is my current, non-functional attempt:
Is_Y = CONTAINS(NATURALLEFTOUTERJOIN('Group2','Group3'), 'Group3'[Group3], "Y")

Power BI pivot column with no aggregation errors

I have a simple table that I want to pivot by the 'COLUMN_NAME' column:
When I pivot and aggregate by count it works fine:
When I try to pivot without aggregation, it gives this error:
Expression.Error: There were too many elements in the enumeration to
complete the operation. Details:
[List]
Here is what I expected to happen:
thx in adavnce
You need to pivot against a specific column, otherwise the powerbi engine can't determine how to keep the data in rows consistently.
Your input needs to be in a format similar to this:
RecordID
COLUMN_NAME
COLUMN_VALUE
1
PRODUCT_SUB_FAMILY
MYPRODUCT
1
MFG_STEP_NAME
FT1
1
QTY_IN
678
1
QTY_OUT
480
1
AGG_YIELD
0.70796
2
PRODUCT_SUB_FAMILY
MYPRODUCT
2
MFG_STEP_NAME
SLT1
2
QTY_IN
66
2
QTY_OUT
0
2
AGG_YIELD
0
And then when you pivot, you select the RecordID as the column you pivot against.

data model in Power BI with multiple tables each has an FK

Assume I have the following tables:
Table 1:
Prj_id, name
1 , prj1
2 , prj2
3 , prj3
Table 2
prj_id, cost, year
1 ,100 ,1999
1 ,200 ,2000
1 ,300 ,3000
2 ,150 ,1998
Table 3
Prj_id, manager
1 , xxx
1 , yyy
2 , xxx
3 , zzz
Now my question is:
Shall I connect all tables together in the model (relation tab) of BI, if I have all the attributes as filters on the page
i.e.
Table 1 to 2 ->Both direction
Table 1 to 3 ->Both direction
Table 2 to 3 ->Both direction
or shall I need to only join tables as follows:
Table 1 to 2->Both direction
Table 1 to 3->Both direction
That highly depends on what your final goal is.
However I would create a relationship between this tables. As I looks, these data coming from a database with a good structure, so why joining every together again.