|
From: Chris W. <ch...@cw...> - 2002-08-23 23:21:54
|
On Fri, 2002-08-23 at 17:14, Eric Reeves wrote: > Alright, figured it out. Apparently OI doesn't like having blank fields > in the data file, as in: > ... If a field will be defined in at least one of the records you need to include it, otherwise you can leave it out and it will be as if you didn't assign it a value when creating the object. > This data file was generated by a script which parsed a set of config > files. Not every config entry will contain every parameter, so there > -will- be undefined field values. Is there a way to make OI accept these > undefined field values, or does every field in field_order need to be > defined? Nope -- every field in field_order must have a value. I could have made the data items hashrefs instead, but most most bulk data loads it's easier to edit the values in order. If it's being auto-generated, then just stick an undef in there for those fields with no values. Who cares what the end result looks like :-) You could also write a script to do this by hand if that's easier -- instead of an intermediate step you could create a script that parsed the config and inserted the data in one fell swoop. (Let me know if you're interested in this.) > If I can't get OI to import this data I will just modify my config parsing > script and have it dump the data directly in to the OI-generated table. > No big deal. The only reason to keep this stuff with the package is if you will need to regenerate it -- you send the package to someone else who needs to start with the same data. Have fun! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |