Glad you're interested!

1. Yes you can. You can use the field or model method transformations 
<http://django-postgres-copy.californiacivicdata.org/en/latest/#transforming-data>
 
to provide any SQL you'd like. PostgreSQL has a to_timestamp 
<http://www.postgresql.org/docs/9.4/static/functions-formatting.html> 
function that I bet could do what you want.

2. There isn't a trick to exclude rules based on a test. Part of what makes 
this method fast is that it doesn't evaluate every row in the CSV. Though I 
suspect there could be some way to achieve this goal by fiddling with the 
bulk insert 
<https://github.com/california-civic-data-coalition/django-postgres-copy/blob/master/postgres_copy/__init__.py#L158>
 
from the temporary table to the model table. You could subclass that 
function and do it yourself now. And I'm open to ideas about how that 
portion of the code could be surfaced to make configuring it less work. 

On Thursday, July 23, 2015 at 5:05:18 AM UTC-7, thinkwel...@gmail.com wrote:
>
> That looks interesting - I might be able to use your module for a project 
> I'll be working on soon. Two questions I had about data transformation from 
> the temp column to model column.
>
> 1. Can you create datetime stamps from the text data?
> 2. Can you skip rows where a column == "unwanted data"?
>
> Pardon the simple questions - I'm not too much of a django guru.  Looks 
> like an interesting project!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/cc6e18ca-2013-4b60-878b-3ccb0fc456f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to