Ejemplo n.º 1
0
from helpers import nullable_float, splitCode, transformFlag, nullable, \
        nullable_int, agency_name_lookup, recovery_act, datestamp, \
        first_char

from dcdata.contracts.models import Contract

FIELDS = [
    ('unique_transaction_id', None),
    ('transaction_status', None),
    ('obligatedamount', nullable_float),
    ('baseandexercisedoptionsvalue', nullable_float),
    ('baseandalloptionsvalue', nullable_float),
    ('maj_agency_cat', lambda x: splitCode(x)[:Contract._meta.get_field(
        'maj_agency_cat').max_length]),
    ('mod_agency', splitCode),
    ('maj_fund_agency_cat', lambda x: splitCode(x)[:Contract._meta.get_field(
        'maj_fund_agency_cat').max_length]),
    ('contractingofficeagencyid', splitCode),
    ('contractingofficeid', splitCode),
    ('fundingrequestingagencyid', splitCode),
    ('fundingrequestingofficeid', splitCode),
    ('fundedbyforeignentity', splitCode),
    ('signeddate', nullable),
    ('effectivedate', nullable),
    ('currentcompletiondate', nullable),
    ('ultimatecompletiondate', nullable),
    ('lastdatetoorder', None),
    ('contractactiontype', lambda x: x.split()[0].strip()),
    ('reasonformodification', splitCode),
    ('typeofcontractpricing', splitCode),
    ('priceevaluationpercentdifference', None),
Ejemplo n.º 2
0
from helpers import nullable_float, splitCode, transformFlag, nullable, \
        nullable_int, agency_name_lookup, recovery_act, datestamp, \
        first_char

from dcdata.contracts.models import Contract

FIELDS = [
('unique_transaction_id', None),
('transaction_status', None),
('obligatedamount', nullable_float),
('baseandexercisedoptionsvalue', nullable_float),
('baseandalloptionsvalue', nullable_float),
('maj_agency_cat', lambda x: splitCode(x)[:Contract._meta.get_field('maj_agency_cat').max_length]),
('mod_agency', splitCode),
('maj_fund_agency_cat', lambda x: splitCode(x)[:Contract._meta.get_field('maj_fund_agency_cat').max_length]),
('contractingofficeagencyid', splitCode),
('contractingofficeid', splitCode),
('fundingrequestingagencyid', splitCode),
('fundingrequestingofficeid', splitCode),
('fundedbyforeignentity', splitCode),
('signeddate', nullable),
('effectivedate', nullable),
('currentcompletiondate', nullable),
('ultimatecompletiondate', nullable),
('lastdatetoorder', None),
('contractactiontype', lambda x: x.split()[0].strip()),
('reasonformodification', splitCode),
('typeofcontractpricing', splitCode),
('priceevaluationpercentdifference', None),
('subcontractplan', splitCode),
('lettercontract', splitCode),
Ejemplo n.º 3
0
          ('recipient_city_code', None), ('recipient_city_name', None),
          ('recipient_county_name', None), ('recipient_county_code', None),
          ('recipient_zip', None), ('recipient_country_code', splitCode),
          ('recipient_type', splitCode), ('action_type', splitCode),
          ('agency_code', splitCode), ('federal_award_id', None),
          ('federal_award_mod', None), ('fed_funding_amount', splitInt),
          ('non_fed_funding_amount', splitInt),
          ('total_funding_amount', splitInt),
          ('obligation_action_date', nullable), ('starting_date', nullable),
          ('ending_date', nullable), ('assistance_type', splitCode),
          ('record_type', splitCode),
          ('correction_late_ind', correctionLateIndicator),
          ('fyq_correction', None), ('principal_place_code', None),
          ('principal_place_state', None), ('principal_place_cc', None),
          ('principal_place_zip', None), ('principal_place_cd', None),
          ('cfda_program_title', None), ('agency_name', None),
          ('project_description', None), ('duns_no', None),
          ('duns_conf_code', None), ('progsrc_agen_code', None),
          ('progsrc_acnt_code', None), ('progsrc_subacnt_code', None),
          ('receip_addr1', None), ('receip_addr2', None),
          ('receip_addr3', None), ('face_loan_guran', splitInt),
          ('orig_sub_guran', splitInt), ('fiscal_year', splitInt),
          ('principal_place_state_code', splitCode),
          ('recip_cat_type', splitCode), ('asst_cat_type', splitCode),
          ('recipient_cd', splitCode),
          ('maj_agency_cat', lambda x: splitCode(x)[:Grant._meta.get_field(
              'maj_agency_cat').max_length]), ('rec_flag', recovery_act),
          ('uri', None), ('recipient_state_code', splitCode)]

CALCULATED_FIELDS = [('imported_on', None, datestamp)]
Ejemplo n.º 4
0
    ("principal_place_code", None),
    ("principal_place_state", None),
    ("principal_place_cc", None),
    ("principal_place_zip", None),
    ("principal_place_cd", None),
    ("cfda_program_title", None),
    ("agency_name", None),
    ("project_description", None),
    ("duns_no", None),
    ("duns_conf_code", None),
    ("progsrc_agen_code", None),
    ("progsrc_acnt_code", None),
    ("progsrc_subacnt_code", None),
    ("receip_addr1", None),
    ("receip_addr2", None),
    ("receip_addr3", None),
    ("face_loan_guran", splitInt),
    ("orig_sub_guran", splitInt),
    ("fiscal_year", splitInt),
    ("principal_place_state_code", splitCode),
    ("recip_cat_type", splitCode),
    ("asst_cat_type", splitCode),
    ("recipient_cd", splitCode),
    ("maj_agency_cat", lambda x: splitCode(x)[: Grant._meta.get_field("maj_agency_cat").max_length]),
    ("rec_flag", recovery_act),
    ("uri", None),
    ("recipient_state_code", splitCode),
]

CALCULATED_FIELDS = [("imported_on", None, datestamp)]
Ejemplo n.º 5
0
                ('principal_place_state', None),
                ('principal_place_cc', None),
                ('principal_place_zip', None),
                ('principal_place_cd', None),
                ('cfda_program_title', None),
                ('agency_name', None),
                ('project_description', None),
                ('duns_no', None),
                ('duns_conf_code', None),
                ('progsrc_agen_code', None),
                ('progsrc_acnt_code', None),
                ('progsrc_subacnt_code', None),
                ('receip_addr1', None),
                ('receip_addr2', None),
                ('receip_addr3', None),
                ('face_loan_guran', splitInt),
                ('orig_sub_guran', splitInt),
                ('fiscal_year', splitInt),
                ('principal_place_state_code', splitCode),
                ('recip_cat_type', splitCode),
                ('asst_cat_type', splitCode),
                ('recipient_cd', splitCode),
                ('maj_agency_cat', lambda x: splitCode(x)[:Grant._meta.get_field('maj_agency_cat').max_length]),
                ('rec_flag', recovery_act),
                ('uri', None),
                ('recipient_state_code', splitCode)]

CALCULATED_FIELDS = [
    ('imported_on', None, datestamp)
]