Magmi few rows with same SKU error - translation

I´m using magmi to import products with different names (depending on the language selected in store)
Watching the CSV file exported by magento, I had founded that in the first row all product data is stored and in the following one, there is only the fields you wish to add to the "store view" to the desired language (French, in this case ---> fr).
If I empty the database and imported from the CSV magento own, I successfully created the products and the different names and descriptions for each store view.
The problem is that Magmi tells me I need the SKU on the 3rd line, because logically not find the SKU. Using the same SKU in the second and third line, the last line always prevails introduced, crushing the previous.
Any idea how I could intruducir with Magmi, the names and descriptions in other languages without smash the previus data? .... I begin to be a bit desperate!
CSV example rows:
sku;_store;_attribute_set;_type;_category......... name .......short_description ..etc
09110-296555;fr;Default;simple;books;products...name_english ..description_english
;fr;;;;;;;;;;;;;;;;;;;;;;;;;;;;;name_french......... description_french

Related

Duplicates developer metadata when using cut + paste

I create Developer Metadata for each of the columns in the sheet.
If a new column gets created, I track it and create another developer metadata for it.
The process above works great until the user starts to move columns using Cut (cmd+x) and Paste (cmd+v).
When you cut and paste, the developer metadata is transferred to the destination column and as a result, you're ending with 2 metadata on the same column.
It gets more complicated when you do that process multiple times.
Eventually, I collect the changes and I see more than 1 metadata on a given column and I don't know which of them to choose.
Do you have an Idea how can I deal with that scenario?
The flow explained:
The user connect his google sheet document.
I go over his sheet and create metadata on the columns.
Name [444]
id [689]
Country [997]
Du
10
US
Re
30
US
The user is doing multiple changes on the sheet. One of the changes is cutting and pasting the column country over id. As a result, the column id gets removed but the metadata id we created stays on (Google Sheet API implementation)
Here is the new state:
Name [444]
Country [689, 997]
Du
US
Re
US
As you can see now, we have 2 metadata ids on the same column (Country). Why it is a problem for me? when I periodically collect the changes I recollect the metadata changes from the column. When I encounter two metadata ids on the same column I don't know which of them to choose.
So why can't I just select randomly? because I already have an existing mapping on my end and I don't know which of them to choose now. Take into account that the user may have changed the column name also so I can count on the column label.

When using QUERY, how can I make it so that data moves together when using filter?

I am creating a tool for a video game I play.
Link to the example spreadsheet (Please make a copy to edit so that this copy stays intact for additional helpers).
Sheet 1 is “Choose Owned”. It contains a list of all of the champions available in the game and includes their attributes.
Column A contains checkboxes. Checking a checkbox indicates that the user owns that champion, and brings it to Sheet 2.
Sheet 2 is called “Owned”. It contains a list of the champions checked off in “Choose Owned” (aka the champions the user owns). “Owned” includes the champion attributes too, as first seen in “Choose Owned”.
Beyond those same attributes, “Owned” contains 8 additional columns.
These columns are from Columns G:N and are labeled ‘Level’, ‘Rank’,
‘Ascension Lvl’, and ‘Team Label(s)’ (‘Team Label(s)’ takes up
columns J:N). This data is all unique information and requires the
user to input the information themselves depending on their
champions.
Because there are so many champions, I want the user to be able to use the Filter function in “Owned” so they can easily locate the champion they need or sort the table however they wish.
However, because I use the QUERY function to get the data from “Choose Owned”, the Filter function tends to break. The most obvious error comes when you try to sort A-Z or Z-A; this simply cannot be done. I was fine with this, and have even included a note at the top telling the user to avoid sorting alphabetically.
Everything else works correctly until the user tries to add a new champion from “Choose Owned”. When the champion is added to “Owned”, the additional, unique data in columns G:N go out of order because they don’t move with their original champions.
Example:
I choose my champions. These champions are copied to “Owned”.
I pick their relative data in columns G:N.
A few days later, I obtain new champions and check them off in “Choose Owned” so they are added to “Owned”. However, when I do this, the champions stay in the same order as they are in “Choose Owned”, and columns G:N do not move with their champions so now, that information is with the wrong champion.
I want the additional data (G:N) to move with their champions when the table is edited due to champions being added. Or, in other words, I want those columns to stay linked to the first columns.
If there is a different way to achieve all of this like if I have to use a function other than QUERY, that is fine!
Please share any solutions you may have. I would prefer to not use a script but will consider the idea if it works.
this is a common issue within Google Sheets and it's solvable in 2 ways:
either by introducing a common value (unique ID) and then linking the manual input to query and aligning it by ID
or easier approach in your case - using timestamp/linear ID so every new entry would be added to the bottom and then the query would be sorted based on this order.

Storing CSV files to a database?

I'm trying to create an app that will store multiple csv files to a database. I have a working app going, and it will store csv files of a particular format. It looks through the header of the csv and stores each row of the csv with the column of the csv corresponding to the property of that row. For example, maybe the columns are date, school, major
if the following row is like this: 05/16/16 | Arizona State | English
then we'll store an object with the date, school, and major corresponding to above.
However, I need to deal with csv files that have different names. Some csv files might have the major column be named "Undergraduate major" and others might have it named "Field of study." Nevertheless, I want to be able to store all the csv files into my database even though the csv might have different names for the columns. What's the best way to approach this?

how to normalize the records? e.g. several similar columns into rows

I am using Pentaho Kettle and thinking on way to normalize my flat file (csv) data. Eventually store it to database.
csv structure: item name, store1 sold quantity, store2 sold quantity, store...
expected result: item name, store name, sold quantity
Any guidance is appreciated.
You can do this with the Row Normalizer step as long as the number of stores is fixed or at least has a maximum. If it's variable, you'll have to use a JavaScript step, or a UDJC. See the docs for how to use these steps:
PDI Transform Steps
If it's variable, I'd consider preprocessing the file before loading. I've done this with Python and it works pretty well.

User selected rows when importing CSV to Rails

Is there an accepted best practice to allow users to select the rows associated with columns when importing a CSV file in Ruby on Rails?
Such that they upload the file -> are given a confirmation screen with the list of column headers, and select inputs for each one (populated with the writeable attributes of the model) -> save each CSV row to the model, with the columns selected in the previous step.
Basically, I want the functionality shown here:
http://youtu.be/5Ddnu_NK_-o?t=50s
The way I would go about this, were there not a better way, would be something like this:
User uploads file
Parse CSV
Display first several rows
Display a form with select inputs for each column, populated by the writeable attributes, and cached file
For each of the POST column name parameters, match them to the column (while verifying that no column name is used twice)
Create a new record for each row
I confess that steps 4 and 5 are pretty daunting to me as a newbie to RoR, and it seems like this must be encountered a fair amount, but I haven't found any luck finding gems or tutorials on the subject.

Resources