I want to put only certain fields of domain in csv being generated. how can that be done?
I have a order class which contains before update and afterInsert. I have kept them as transient. but still their names comes in the header also, I also want only 5 of the feilds to appear in the csv not all.
You can specify which fields to export. An example for this can be found in Grails Export Plugin documentation.
Related
I want to implement a flight search system in Rails 4.
And I found this resource,
My questions are:
I've downloaded the airports.dat file and it contains chunks of data, do I need to import those data into psql? If yes, how?
If I just need the airport ID and name values, how do I selectively import them?
If I want to implement ajax load airport name just like the way expedia.com did, would it be buggy(slow loading time) if I use VPSs like Digitalocean?
Please advise me.
You can write a method that read line by line, and parse every line by the comma (","). Then you have enough information to insert to database.
For example:
flight1 = '507,"Heathrow","London","United Kingdom","LHR","EGLL",51.4775,-0.461389,83,0,"E","Europe/London"'
Then you can get the ID by call flight1.split(",")[0]
The speed of your search function is affected by your search algorithm and how do you implement the logic, and isn't affected by using a VPS.
I'm relatively new to Magmi but have had to mess with EDI and csv files on many different systems over the years... I have only been importing simple products with magmi for starters and have a couple of questions/problems
At first all of my imported new products were available in every store view (we have 5) and I now realize from the docs that's because it was set to "admin", however under visibility, everything shows up visible in both catalog and search, even if it is set only to "catalog" in the csv or as "not visible individually". This is problematic for certain semi-private category products and for configurable child-products. I'm sure there is a simple explanation but I can't find it.
Also, I messed up yesterday. I copied 20 lines from a products master export, made a new worksheet and edited most of the fields to reflect a case of that product - every field except sku itself. I imported it (set to create and update because create itself skipped all 20 sku's - of course) and it updated my original product. I made a fresh csv with the original 20 lines and reimported it, the products look fine - except...
Now when I export from a master export profile in magento it does it but I get errors for the 20 skus that I can't quite decipher (referencing options_container and page_layout)- it looks like this http://tinyurl.com/mp5g27v
Any insight would be great
You simply forgot to use "Generic Mapper" plugin in your import profile.
Generic Mapper is a plugin that allows recognizing "text values" for fields that are meant to store numeric values. And has to be used to handle standard magento export format which exposes localized textual values.
see plugin documentation
When selected, this plugin will handle all standard mappings used by magento ( visibility, page_layout, options_container , aso...)
I cant seem to figure this one out.
Exporting data to Excel works OK but I do not want to use the original table field names but ones of my choice.
Right now, the original field names get exported (with the data,of course). QExport4XLS1 is linked to the data-set. I tried to use qeCustomSource41 (custom source) and changing field names - it worked OK but no data got exported. Only the field names.
Does anyone know how to accomplish this ? I never used these components before, so I am just trying them out. The documentation is horrible.
It seems the only way to do this is through QExport4Dialog1 and not through QExport4XLS1.
I am using propel orm as database abstraction layer.
I want to define different schema.xml files for diffenrent modules.
E.g. user.xml.schema for handling users and roles, or app.schema.xml for the application model.
My problem is, I want to reference to the user table of the user.schema.xml. I can handle this by the tag, but I want to use another table prefix for the user schema tables.
Running propel-gen creates two sql files (one for the user.schema and one for the app.schema), but the problem is, that the user-schema tables are generated twice. First with correct table prefix of the user schema file and the others with the prefix of the app schema file.
The foreign key also references to the wrong tables (that from the table with the prefix of the app.schema.xml).
I do not know any way to prevent this behaviour.
Any hints?
You cannot add different table prefixes to one database, and there is no way to add a tablePrefix attribute on the table tag. Let me explain a bit more, I know, you can specify a tablePrefix per XML schema even for a same database, but it leads to errors if you try to add relationship.. I don't know whether it's a bug or not, AFAIK the tablePrefix should be defined at the table level… Without relationship, you'll get a clean SQL file (or two if you don't set the propel.packageObjectModel build property to true.
You can read: http://www.propelorm.org/reference/schema.html. So I think, it's not possible to do what you would like to do unfortunately.
BTW, what you want to achieve is called multi component data model in the Propel doc.
HI,
My Question may be a simple one for you.
I have to import a csv file to my delphi application. This file contains 3 columns and I want to match the columns to one of Dataset( TQuery connected to a Firebird table) and show on a grid.
My Question is, is it possible to use the Csv file as a table, who can access by a SQL query and join to a Db table ?
I have tried with TTable with TableType property as ttASCII. It loads the file.However this loads the contents to a single fields,
ie, Fields[0].asstring gives '11,12,abc.txt'
I want this on different fields
ie,
Fields[0].asstring = '11'
Fields[1].asstring = '12'
Fields[3].asstring = 'abc.txt'
Hope you understand my requirement. Kindly take a look and let me know your thoughts
Thanks and Regards,
Vijesh V.Nair
System Analyst
Vijesh , you have to create a schema definition file to access a txt file from a TTable component, the name of the schema file must the same of the text file but with the SCH extension.
in this link you can found more information about the format of the schema file Using The ASCII Driver With Comma-delimited Files, also you can check the BDE32.HLP file.