Import CSV

Hi there, I have searched but could not find the correct way to import a CSV file. First, I exported my test data from the site. Then I put in a few new records into that CSV file and saved it. Then I go to Forms>View Data>CSV>Import from CSV. It appears to start the import then brings me to a page that says ...
==========================
New headings found

The CSV data structure you chose to import does not fully match with that of 'IA-Clients'.

For any of the CSV columns you wish to add to the list 'IA-Clients' please click 'yes' under the 'Create a new element' column.

For all fields please indicate their element type and whether they are a primary key
==========================
Screen Shot 2015-12-29 at 7.11.10 PM.png

I click the Continue button and get an error...
"DateTime::__construct(): Failed to parse time string ( Jackye L.) at position 0 (J): The timezone could not be found in the database"Screen Shot 2015-12-29 at 7.11.10 PM.png

Any help would be appreciated. I would gladly pay someone to teach me how to do this correctly.

Thanks!
 

Attachments

  • Screen Shot 2015-12-29 at 7.13.08 PM.png
    Screen Shot 2015-12-29 at 7.13.08 PM.png
    29.3 KB · Views: 395
It looks like it is trying to use a row of data as headings. Are you sure you are including the first row with the headings when you re-import?

Are you sure you have the separator character (like comma) correct, and are you correctly quoting text fields?

If you want to take out a paid sub, I'd be happy to log in to your site and test / fix it for you.

-- hugh
 
The credentials you gave don't seem to work. I copied and pasted the password to make sure I wasn't mistyping.

Username and password do not match or you do not have an account yet.

-- hugh
 
I just did an import and it worked OK. I changed the element selection to "All" in the CSV publishing options (you had it set to "Selected" but hadn't selected any elements). I also set it to use the raw data. I then exported, and imported the same file. It successfully imported the four rows. Note that it didn't empty the table first, as I didn't enable the user options on import where you get to specify that. So there are now 8 rows in the list.

-- hugh
 
Hugh,
Did you get the CSV file off of the server? I was hoping you could take a look and see why it wasn't importing correctly for me. When I try to import it, I still get the same problem from my original post.
Thanks for all your help.
 
The import I mentioned in that last post was on your site.

Can you describe exactly how you are doing the import? Or better yet, get Jing and record a screencast.

-- hugh
 
There's something wrong with that CSV file, as the import seems to be interpreting it as one long line with no line breaks.

When I run exactly the same import, using the export file Fabrik generates from the same list (which opens OK in Open Office), the import works as expected.

-- hugh
 
Correct! How can I fix this? Again (as I noted originally), all I did was export the the CSV file with the 4 test records. Then I applied the headers from that to my larger client contact CSV file and tried to import it. I was hoping you could help me fix this by looking at the CSV file I was trying to import. That file is on my server and you have FTP access to it, or I can send it to you privately if you like. Thanks!!!
 
How did you create fabrik.csv?
It doesn't look like a standard CSV file with text included in "".
You can try to open it in OpenOffice and re-save it to get a standard CSV format.
 
OK, it's imported.

I loaded that fabrik.csv into Open Office (well, Libre Office), saved it as a CSV with all text quoted. That solved whatever the issue was with the overall file format. From your video it looks like you were on a Mac, so it may have been something weird about Mac file formats.

The first couple of imports I tried failed because you have some malformed dates in spouse_dob, which blows up the date formatting.

After fixing those (I just deleted those dates, about 3 all told), the next import failed because your PHP script execution time is set to 30 seconds, which wasn't quite long enough to import all rows (the import averages about 100 rows per second, you have over 4000 rows).

So I busted the file up into two separate files, which take about 20 seconds each, and they imported OK.

-- hugh
 
Hugh, thanks for all the help. I see that they are all there, however the Date of Birth is not imported. I tried exporting, then importing again, but still no luck. The DOB column looks like this...
dob_raw
11/3/52
7/18/58
4/10/51
11/14/84
8/14/28
1/9/41
10/9/17
10/10/38
7/10/46
2/9/40
11/21/41

What do I need to do to make that work?
Thanks!
 
I had a look. You have the dob set as a "birthday" element, which won't import from your data format, it uses a special JSON format. You'll have to set it up as a dat element, and set your 'form format' to match your import data.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top