How are you handling bulk import without csv import module in Apostrophe 2

16 views
Skip to first unread message

Ryan Watts

unread,
Aug 19, 2016, 1:37:02 PM8/19/16
to apostrophenow
Greetings 

The feature I probably used the most was the csv import feature in apostrophe 0.5.  

As previously mentioned that modulebis currently not available in 2.0 but may be available sometime in the future.  My questions is what is the alternative recommendation to bulk import content into apostrophe if we are to not use the csv import methods.  

Ryan.  

Tom Boutell

unread,
Aug 19, 2016, 1:49:10 PM8/19/16
to apostr...@googlegroups.com
Well, it's not a "not to," since it's not an if but a when (:

We are big fans of CSV as a format that's simple and interoperable and
suprisingly sufficient. We just haven't had call for it on a 2.0
client project *quite* yet and we're working very, very fast right now
(:

But, have you checked out what pieces actually look like in the
aposDocs collection? It's really simple to insert them directly into
mongo. Each one is a single mongo doc - no muss, no fuss. We're also
big believers in that, after too many experiences with needing six
joins to load a document (*cough* SQL).

You might even be able to import CSV with standard command line mongo
tools. Just make sure _id is unique.
> --
> You received this message because you are subscribed to the Google Groups
> "apostrophenow" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to apostropheno...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, SUPPORT LEAD
P'UNK AVENUE | (215) 755-1330 | punkave.com

Tom Boutell

unread,
Aug 19, 2016, 1:49:15 PM8/19/16
to apostr...@googlegroups.com
(slug must also be unique.)

Ryan Watts

unread,
Aug 19, 2016, 2:53:22 PM8/19/16
to apostrophenow
Thanks Tom this is great. I'm wondering if it might be smart to load a json file in a directory and possibly run a task to do the import. 
What do you think ? Is this something a task could handle ? If so I'd like to review the documentation on setting up a basic task. and take that approach. 

This might be a good alternative for the time being. 

Tom Boutell

unread,
Aug 23, 2016, 9:29:00 AM8/23/16
to apostr...@googlegroups.com
There are some tags in existing modules you can use for reference.
Look for apos.tasks.add
Reply all
Reply to author
Forward
0 new messages