Can lettuce supply a list of the columns used in a data table ?

25 views
Skip to first unread message

Jason Braid

unread,
Jun 29, 2015, 7:16:40 AM6/29/15
to lettuce-d...@googlegroups.com
When using data tables, the data is stored as a list of dictionaries, one per row.
The key is the column name, however key order in a dictionary is basically random.
Is it possible for Lettuce to supply a list of the column headers used ?

There is already some useful built in functions for data tables, e.g. hashes functionality allows you to iterate through the rows,.

I require the correct column  in order to facilitate a custom database load operation.

This would be incredibly useful, and cannot see how to access this currently.

I've coded round it for now, by sending the column order as an argument in a subsequent feature step, but its duplicated and inelegant and not Pythonic.

Any ideas

TIA

Michel

unread,
Jul 3, 2015, 5:22:03 PM7/3/15
to lettuce-d...@googlegroups.com
Hi Jason,

I would suggest you to inspect if you really need the data in the given
order. I think this is too much specific.

I see the features files as a client specifications and it must be
explicit, does the client/user must follow this specific order?

Best regards,
> --
> You received this message because you are subscribed to the Google
> Groups "Lettuce Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lettuce-develop...@googlegroups.com
> <mailto:lettuce-develop...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Michel Sabchuk
(41) 3227-1638
http://turbosys.com.br/
Reply all
Reply to author
Forward
0 new messages