The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[SOLVED] Unwanted column after Transpose and Rename by Example operators
ryijynshui
Member Posts: 4 Contributor I
Hi everyone,
Firstly thank you to the developers for this great product. I am very new to Rapid Miner and my back ground is more on hardware and database side.
My issue is more of an irritation than a problem. I am using a MySQL database which, has two tables. Both have two columns that monitors a web application. The tables are similar to information_schema.global_status and information_schema.global_variables. I will refer to the global_status table here.
I use the transpose operator on table to transpose VARIABLE_NAME data into column names and VARIABLE_VALUE data as data. The output, goes into a csv file, after the transpose operator:
row 1: attri_1,attri_2, etc
row 2: "aborted_clients","aborted_connects",...,"VARIABLE_NAME"
row 3: "0","0",...,"VARIABLE_VALUE"
Now I use the Rename by Example operator to remove row 1. However, notice that, VARIABLE_NAME is added creating an unwanted extra column in the output with VARIABLE_VALUE as the data. Is there anyway of stopping or removing the use of both these columns within the two processes? Is there another process I have to use before pushing the output to a csv file? I am currently dumping the output to a csv file but the idea is to write the result to a database.
Thanks for your help.
Ryi-Jyn
Firstly thank you to the developers for this great product. I am very new to Rapid Miner and my back ground is more on hardware and database side.
My issue is more of an irritation than a problem. I am using a MySQL database which, has two tables. Both have two columns that monitors a web application. The tables are similar to information_schema.global_status and information_schema.global_variables. I will refer to the global_status table here.
I use the transpose operator on table to transpose VARIABLE_NAME data into column names and VARIABLE_VALUE data as data. The output, goes into a csv file, after the transpose operator:
row 1: attri_1,attri_2, etc
row 2: "aborted_clients","aborted_connects",...,"VARIABLE_NAME"
row 3: "0","0",...,"VARIABLE_VALUE"
Now I use the Rename by Example operator to remove row 1. However, notice that, VARIABLE_NAME is added creating an unwanted extra column in the output with VARIABLE_VALUE as the data. Is there anyway of stopping or removing the use of both these columns within the two processes? Is there another process I have to use before pushing the output to a csv file? I am currently dumping the output to a csv file but the idea is to write the result to a database.
Thanks for your help.
Ryi-Jyn
0
Answers
Anyway the way I got around it was to...
1. Add the Select Attribute operator
2. In the Parameters window
a. Change attribute filter type to single
b. Set the attribute field to VARIABLE_NAME (see 1st post)
c. tick both invert selection and include special attributes
Job's a good'un.
Happy that you figured out how to get your job done!
Best regards,
Marius
Our import operators of course allow to select the column you want to retrieve. In case of Read Database you have to compose your own query in the form Best regards,
Marius