replace multiple values in the same column as transformation with SSiS - ssis

I have a data set with country column , the countries with the there codes but i need to replace this codes with the actual names , I am trying the derived column transform but it
only accept on values to replace it
any ideas ?
[1] https://i.stack.imgur.com/imv2m.png]

Related

Multiple same kind of column concatenation in another column of same table in mysql

I have one table "Mytable" and in this i have multiple columns and now in this columns i have 100 columns with same name like "type1", "type2"..,"type99" and i am importing this value from csv. so now what i want to do is i want to combined all this column value in one single column in json format.
Can any one suggest me how can i achieve?
You can create the json object as:
select json_object('type1', type1, 'type2', type2, . . . )
Alternatively, you might want an array.
You can then insert this into a new table.

MS-Access: Replace values in column based on mapping list

I got a column with 27 thousand entries. I want to replace all occurences of "a" with "a_new", all occurences of "b" with "b_whatever". And so on. I got more than 1200 of these mappings. Can I somehow put my mappings into a list and feed it to MS-Access so that it replaces the values in a specific column?
Create new table with mapping - [OldValue] and [NewValue] columns, then join this table with your existing table by [OldValue] column and update by value from '[NewValue]`

Extract XML data from Hive Table and Parse the data

I want to extract particular column values from a hive table. That column has XML data. How to parse through XML data and extract name and values from that particular XML column. Also I want to insert the extracted data into another Hive table.
Option 1 : LanguageManual XPathUDF
Example :
select xpath ('<a><b id="1"><c/></b><b id="2"><c/></b></a>','/descendant::c/ancestor::b/#id') from t1 limit 1 ;
[1","2]
Option2 : Another way of achieving this is Hive-XML-SerDe
In both option you need to have Xpath expression knowledge.
If you want to insert extracted data in to another table then use create table as select xxx from xxxxx (Create Table As Select (CTAS))

SSRS report join datasets according parameter values

I have different dataset . Each for a country (USA,FRANCE,BRITAIN etc.) .
Also i have a Report multi value parameter to select country , so the report will show data only from the selected countries.
Several questions:
1. How can i join (merge) different datasets as described below?
2. I need to have a table in the report with the Country Column .
How about a table with separate tables for each country?
Create the table you want for a country (I'll C1 from here).
Create another table (T1) with cells the same width as C1. Delete the DATA row. Add a new row for your country. Merge the cells from the new row.
Put the headers from C1 on T1 and delete the header from C1. Put C1 into T1's single merged cell.
Copy C1 to create a new country and add a new line and repeat for all countries - changing the dataset for the new country.
Use the table row's visibility to show that country of not based on your parameter.
I think I've done this once a while back.

Report Services sort column chart

I have a report containing a regular column chart that groups on product (column A) and the chart column values are the sums of the cost (column B). By default these are sorted alphabetically on the product string. I want it to sort the column values by default and then I would like to provide and option for the user to be able to switch between product name and column value. How do I do this?
Thanks
You can use a Sort By report parameter of Text type.
Set the Available Values and Default Values as follows :-
In the Column Chart, add an expression in the Sorting property of Category Group
Assuming you have the column values column as ColumnValue and Product Name column as ProductName then the expression should be :-
=iif(Parameters!SortBy.Value = "ColumnValues",Sum(Fields!ColumnValue.Value),Fields!ProductName.Value)