sql - Django staging and formatting data into fields -



sql - Django staging and formatting data into fields -

say have poor quality info feed represents different lengths (ex. 200ft, 50m, 8mmx60m). want convert info meters , store integer. problem won't able grab discrepancies, , i'll have convert of manually.

i want able view missed info in django admin page can go through , update it, rather having go , forth between feed.

my hack solution have info stored in charfield , have separate column sets row live or staged depending on if is.digit()=true. can go django admin, reformat info manually, , run script checks whether or not info should set live.

there multiple sets of info (diameter, weight, etc.).

other options i've considered:

have staging columns charfields , live columns integerfields.

have staging table charfields.

have entire separate database staging.

any ideas? i'm new django , sql don't know best way go this.

edit:

currently have:

data islive 60 true 70 true 70 meters false

option1:

data data_raw 60 60 70 70 null 70meters

alternate alternative number 1 sounds best me, integerfield using null represent lack of data. these advantages see:

keeping original text info around gives more flexibility. if there's bug in script? if decide want conversion have more precision? keeping original info makes easy recompute later. , if @ point decide don't need old info anymore can drop column.

representing integer info in integerfield improve info modeling, , create various things easier (not having manually convert , integers time, using f() expressions, etc.).

there's no need have separate live column, , separate step compute it. 'live' means int_data__isnull=false.

sql django

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -