0

Some questions arises when using MAGMI generic SQL datasource. Magmi 0.7.18 displays the following input information when using that plugin:

enter image description here

I tried several times with two approaches. -the first one as described on the image was a direct query to the mysql database containing all rows to feed magento database using magmi. (no files on genericsql/requests) -the second one using .sql file exported from my database and placing that file into (genericsql/requests).

in both cases I received the following statement: 1 warning(s) found Hide Details -> "No Records returned by datasource"

I read that some folks suggest to use input DB Initial Statement: SELECT COUNT(*) AS cnt FROM tablename but in my case it was the same.

question one: using mysql I can query mysql databse directy using the input db information (type, host, name, user, password) or I have to place the sql file in genericsql/requests too? is that my error?

question two: based on the fact that mysql cannot attach files - as MS sql can - which information do I have to place when magmi request user- pass for that sql file?

any help appreciated, I´m stuck with this issue and CSV is not suitable for my needs. brgds

1

Your SELECT has to be put in a .sql file in the directory listed in red. (name it as you want as long as it ends with .sql extension)

The "Initial Statements" is a field that is meant to hold the "connection" time statements (like SET NAMES 'UTF8').

For the "quick count" , you might also add a .sql.count file in the same dir with the same name that the request you want to achieve.

By default magmi will find the count using a

 SELECT COUNT(*) FROM (your request here)

see Generic SQL Datasource plugin documentation.

1
  • ahh ok my mistake. so in that directory I only have to place a sql file with a select statement. when that profile is called in magmi ui that select retrieve the information from the database - and thats why the UI display mysql db connection information - . its ok? thank you.
    – s_h
    Jun 10 '14 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.