Automatic groups based on table titles - csv

I have a huge csv dataset that consists of similar tables. The structure of my data is shown is like the dummy data below, where 'Weekday:XY' is an example table and all tables are square:
I would like to automatically make expandable groups based on table titles. So I need something that looks like this:
The above is done manually with Data>Group>Rows.
Would anyone have any ideas of how this can be done efficiently?
Thanks!

Related

How can I create a table that uses an equation to average data from another table?

I have a table that contains data from repeated experiments (for example, site A has one sample, and the lab processed the sample three times obtaining slightly different values). I need to average these results in a separate table, but what I have read on the Microsoft support site is that a query that pulls data into another table with a calculated field is not possible on Access.
Can I query multiple data points from one table into a single calculated field in another table? Thank you.
UPDATE
I ended up doing a lot of manual adjustments of the file format to create a calculated field in the existing table that averages each sites data, so my problem is, for my current purposes, solved. However I would still like to understand. Following up with you both, I think the problem was that I had repeated non-unique IDs between rows when I probably should have made data columns with unique variable names so that I could query each variable name for an average.
So, instead of putting each site separately on the y axis, I formatted it by putting the sample number for each site on the x-axis:
I was able to at least create a calculated field using this second format in order to create an average value for each site.
Would have there been a way to write a query using the first method? Luckily, my data set was not at all very hefty, so I could handle a reformat manually, but if the case were with thousands of data entries, I couldn't have done that.
Also, here is the link to the site I mentioned originally https://support.office.com/en-ie/article/add-a-calculated-field-to-a-table-14a60733-2580-48c2-b402-6de54fafbde3.
Thanks all.

Mysql: pivoting calculated data on itself

So I have this fairly large set of data that I'm reporting out on a predefined set of segments. I calculated the segments creating a series of sum case when statements. How do I present this data pivoted on itself? I'm trying to create a table that looks like this:
I wrote the code that generates the sums across the top based on how each color is defined. I hadn't had trouble presenting other data in column 1 because they were simple case when statements from a single field. Ultimately I want to present it as percents like the picture, but for now I'm trying to understand how to accomplish this. I can't do a select red, orange, etc etc because those fields are only calculated, not actual. How would I achieve something like this?

Excel 2010 Unpivot Data or Utilize MySQL for Unpivot

I've got a lot of data in an Excel sheet that I need reformatted. I am trying to achieve this by using Pivot Table but I'm not sure it is possible.
Here is current data set (SKU is unique currently):
I need it to look more like this (where SKU is NOT unique):
I'm willing to throw my current sheet into a MySQL database and query it if I can figure out a good query to utilize as well.
Any ideas on where to go from here would be appreciated.
It looks like you're wanting to unpivot your data (i.e. turn it from a crosstab into a flat file), although some of your desired output looks weird. Look at my answer to this question: convert cross table to list to make pivot table

A way to update data in Oracle

I have a table that I need to update each day. The data comes in a text file every time. I wrote a program that extracts the data from the text file and and writes it in the table, but now I want to modify it to just update the existing data. The data is mostly the same, it might differ only a few things.
I was thinking about MERGE but I don't know very well how I could use this in my program. All the examples that I saw used a second table.
So it would be like creating a second table in which I extract the current data, after which I make the merge into the old table to update the records. I want to avoid creating a second table, so I was wondering if there is any way to do this?
Thanks!

Define same output table across multiple transformations

I have 6 different input datasets. I want to run ETL over all 6 datasets so they all get transformed to the same output table (same columns and types).
I am using Pentaho (Spoon) to do this.
Is there a way I can define an output table schema to be used by all these transformations in Pentaho? I am using MySQL as my output database.
Thanks in advance.
Sounds like you need the Select Values step. Put one of those on the last hop of each dataset's path and make the metadata for the paths all look EXACTLY the same. Then you can connect the output from each Select Values step into a Table Output. All the rows from each set will be mixed together in no particular order.
This can be more challenging than it looks. Spoon will throw errors if any of the fields aren't just exactly identical to the corresponding field from all other datasets. You'll have to find some way to get all the metadata from the datasets to be the same.