New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre and post update hooks #93

Closed
maxogden opened this Issue Apr 28, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@maxogden
Member

maxogden commented Apr 28, 2014

we need to define an API for running transformations/generic functions automatically. they should be able to be run either before insert of after insert.

check out couchdb validation functions for potential inspiration http://docs.couchdb.org/en/latest/couchapp/ddocs.html#vdufun (though they arent exactly what this issue is talking about)

via @jbenet:

if i have some silly thing that POSTs some ugly format that i don't have control, would be nice to run the transformation right in dat, rather than write another server to glue it
@jbenet

This comment has been minimized.

Show comment
Hide comment
@jbenet

jbenet Apr 28, 2014

Contributor

could use transformer for this. I'll play around with it and report back.

Contributor

jbenet commented Apr 28, 2014

could use transformer for this. I'll play around with it and report back.

@maxogden

This comment has been minimized.

Show comment
Hide comment
@maxogden

maxogden Apr 28, 2014

Member

was thinking that we could use dat.json (once it gets surfaced to the root of the dat repo and not in the hidden .dat folder) to store the transformations... e.g.

'before': [
  'geocode.py',
  'format-addresses.rb'
]
Member

maxogden commented Apr 28, 2014

was thinking that we could use dat.json (once it gets surfaced to the root of the dat repo and not in the hidden .dat folder) to store the transformations... e.g.

'before': [
  'geocode.py',
  'format-addresses.rb'
]

@maxogden maxogden referenced this issue May 19, 2014

Closed

TODO for dat alpha (first stable version) #29

34 of 34 tasks complete
@maxogden

This comment has been minimized.

Show comment
Hide comment
@maxogden

maxogden Jun 17, 2014

Member

@mafintosh another idea, what about a one-time transformation specified during dat import ? e.g. --transform "awk '{print toupper($0)}'". would also be cool to be able to do them on dat cat on the way out

Member

maxogden commented Jun 17, 2014

@mafintosh another idea, what about a one-time transformation specified during dat import ? e.g. --transform "awk '{print toupper($0)}'". would also be cool to be able to do them on dat cat on the way out

@maxogden

This comment has been minimized.

Show comment
Hide comment
@maxogden

maxogden Jun 17, 2014

Member

Oh yea we should also add a --dry-run option to all cli operations with side effects

Member

maxogden commented Jun 17, 2014

Oh yea we should also add a --dry-run option to all cli operations with side effects

@maxogden maxogden closed this Jun 17, 2014

@maxogden maxogden reopened this Jun 17, 2014

@mafintosh

This comment has been minimized.

Show comment
Hide comment
@mafintosh

mafintosh Jun 17, 2014

Member

@maxogden that's pretty trivial to add (i think). will look into it

Member

mafintosh commented Jun 17, 2014

@maxogden that's pretty trivial to add (i think). will look into it

@mafintosh

This comment has been minimized.

Show comment
Hide comment
@mafintosh

mafintosh Jun 23, 2014

Member

@maxogden dat import --transform cmd and dat cat --transform cmd works in master now. you can even specify multiple transforms dat cat --transform cmd1 --transform cmd2

Member

mafintosh commented Jun 23, 2014

@maxogden dat import --transform cmd and dat cat --transform cmd works in master now. you can even specify multiple transforms dat cat --transform cmd1 --transform cmd2

@maxogden

This comment has been minimized.

Show comment
Hide comment
@maxogden

maxogden Jun 24, 2014

Member

ok i'm declaring this done!

Member

maxogden commented Jun 24, 2014

ok i'm declaring this done!

@maxogden maxogden closed this Jun 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment