Importing using "Upload CSV Data"

Discussions for the HanDBase for iPad and it's conduits and desktop add-ons

Re: Importing using "Upload CSV Data"

Postby larutril » Sun Dec 15, 2013 12:07 pm

Thanks so much for all your help! For the benefit of any future readers I'd like to clarify what I came to understand about the CSV import.

You can reorder the fields in the database, so long as the fields (columns) in the CSV file are in the same order as the reordered fields and include fields (columns) for empty or relational fields.
larutril
 
Posts: 9
Joined: Mon Sep 23, 2013 3:19 pm

Re: Importing using "Upload CSV Data"

Postby Alanwestwood » Tue Apr 08, 2014 5:49 am

I came across this thread by chance, and I read it because I use csv imports a lot - its how I get virtually all my data into HanDBase from several other iOS apps.

In my view, csv importing is very flexible, but can be confusing unless you understand exactly how HanDBase handles the incoming files. I'm posting here also because this may be pertinent to any forthcoming Open-In feature for incoming csv files.

The csv import does not use the database field list - it uses the field list set in the list view for the file which is open when you start the web server. So, if you re-order a list view, you can actually import a different field order, and can even have imports from more than one source by having list views called Import1, Import2, etc. Its actually quite a powerful feature, because you don't have to have set up a database with exactly the correct field order for any future and unknown csv import (which then may no be easily configurable at the sending end).

The same applies to exports, so you can export a csv in the order set in a list view, not the order set in the database properties - again, quite a useful feature.

Of course, its always possible to import via a spreadsheet - I use Numbers for this purpose. That allows columns to be moved, and also allows you to massage the data first if you need to, eg to give a recognisable date or time format. But on the whole, I only really resort to Numbers when first setting up csv import or exports, so that I can see exactly what is being sent and received and what HanDBase does with it.

So, for me, csv import export is extremely powerful, and I have never failed to get the correct data in or out one way or another. This is also why I am so keen to see csv import Open-In added, so I don't have to use the web server and can do the whole operation - eg export, massage data, delete the db records, re-import - on one device (my iPad).

I think it would be less confusing if in some way it could be made clear the the field list being used is the List View field list, not the database field list.

Regards, Alan.
Alanwestwood
 
Posts: 62
Joined: Mon Aug 15, 2011 12:43 am

Re: Importing using "Upload CSV Data"

Postby dhaupert » Tue Apr 08, 2014 8:36 am

Hi there,

The CSV import that is coming in the next release is a very basic one on the device as I have implemented it- there aren't options like the desktop offers at this time to choose which field mapping. My suggestion would be the same as I do for the Android users who have had this feature for some time- do an Export and look at the field order being used. It's going to be the same order we expect on the import later on.

In an ideal world, I'd offer a mapping tool to help with this or some type of configuration. But the reality is that the reason I hadn't added this feature before is that only a few users have needed a CSV import from the device. I can't put too much development time into a feature if it's not going to be used all that much. Maybe now that the feature will be there, we'll see that there are lots of people using it and then I can find the justification to work on it some more in a future update!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Importing using "Upload CSV Data"

Postby Alanwestwood » Tue Apr 08, 2014 9:58 am

Thanks for that, and I take your points totally, especially regarding how much a feature is used determining development priority.

But my own point really is that, if the csv import is more or less the same as the current csv upload, then it is possible already to map in a limited way by changing the field order in the list view - as opposed to the database properties view. I'm already using the csv upload this way, and I was just trying to encourage exactly the same approach for Open-In. What I mean is, I am hoping that the imported csv file will be treated the same way whether it arrives by web server upload or Open-In.

Just to reiterate - its already possible to export in one field order and to import in another - in fact its possible to export and import in several different field orders, quite easily, with the current csv export and csv upload. Thats actually quite important with regard to your suggestion to export and see what comes out and import in the same order - because thats only true if the user uses the same list view each time, because if they export using one list view with fields in a certain order, then change to a list view where they are ordered differently, the import will causes wrong field entries.

I hope that makes sense. Its certainly what I see in actual practice, which is that the field order in the database properties isn't used if the user changes the field order in the list view.

Many thanks for all your efforts. I find HanDBase for the iPad extremely good!

Regards, Alan.
Alanwestwood
 
Posts: 62
Joined: Mon Aug 15, 2011 12:43 am

Previous

Return to HanDBase for iPad

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron