lsd insert statement

9 views
Skip to first unread message

Pedro Rodriguez

unread,
May 15, 2012, 4:04:34 PM5/15/12
to lsd-...@googlegroups.com
Is there a doc somewhere with information on lsd insert statement. I tried the code below but it didn't work. I would like to be able to use lsd-query to insert, but moreover take a python list and use that to insert into an lsd table. I could parse the data out of the list into a string to run as a query, but that seems overkill if there is already a function that does the same thing.


pedro@anathem:~/Data$ lsd-admin --db CrossMatchDB desc table NullROSATData
Path:          CrossMatchDB/NullROSATData
Partitioning:  level=6
(t0, dt):      54335.000000, 1.000000
Rows:          0
Columns:       3
Primary key:   id
Spatial keys:  (ra, dec)
Aliases:       []
Column groups: ['default']
-------------------------------
Column group 'default':
              Column       Type
-------------------------------
                  id         u8
                  ra         f8
                 dec         f8
-------------------------------

pedro@anathem:~/Data$ lsd-query --db CrossMatchDB 'insert into NullROSATData  values (1,1)'
Traceback (most recent call last):
  File "/home/bsesar/opt/lsd/src/lsd-query", line 86, in <module>
    q = db.query(query)
  File "/home/bsesar/opt/lsd/src/lsd/join_ops.py", line 1886, in query
    return Query(self, query, locals=locals)
  File "/home/bsesar/opt/lsd/src/lsd/join_ops.py", line 1316, in __init__
    self.qengine = QueryEngine(db, query, locals=locals)
  File "/home/bsesar/opt/lsd/src/lsd/join_ops.py", line 1259, in __init__
    self.root, self.tables = db.construct_join_tree(from_clause);
  File "/home/bsesar/opt/lsd/src/lsd/join_ops.py", line 2194, in construct_join_tree
    assert root is not None            # Can't have zero roots



Thanks,
--
Pedro Rodriguez
UCBerkeley 2014 | Physics/AstroPhysics
SnowGeek.org Founder
ski.ro...@gmail.com
208-340-1703
Reply all
Reply to author
Forward
0 new messages