-- DBMS: snowflake
CREATE TABLE US_REAL_ESTATE.CYBERSYN.HOME_MORTGAGE_DISCLOSURE_ATTRIBUTES (
    TOTAL_POINTS_AND_FEES NUMBER,
    OCCUPANCY_TYPE TEXT,
    CENSUSTRACT_MEDIAN_AGE_OF_HOUSING_UNITS NUMBER,
    INTEREST_ONLY_PAYMENT TEXT,
    APPLICANT_ETHNICITY TEXT,
    PRIMARY_DENIAL_REASON TEXT,
    MSA_NAME TEXT,
    GSE_CONFORMING_LOAN_LIMIT TEXT,
    COUNTY_NAME TEXT,
    ORIGINATION_CHARGES NUMBER,
    CO_APPLICANT_AGE TEXT,
    CO_APPLICANT_SEX TEXT,
    INITIALLY_PAYABLE_TO_INSTITUTION TEXT,
    MANUFACTURED_HOME_SECURED_PROPERTY_TYPE TEXT,
    HOME_CONSTRUCTION_METHOD TEXT,
    MSA_GEO_ID TEXT,
    STATE_GEO_ID TEXT,
    APPLICANT_RACE TEXT,
    APPLICANT_INCOME NUMBER,
    FOR_BUSINESS_OR_COMMERCIAL_PURPOSE TEXT,
    LIEN_STATUS TEXT,
    TOTAL_LOAN_COSTS NUMBER,
    STATE_NAME TEXT,
    PERCENT_MULTIFAMILY_AFFORDABLE_UNITS FLOAT,
    CENSUSTRACT_MINORITY_POPULATION_PERCENT FLOAT,
    MANUFACTURED_HOME_LAND_PROPERTY_INTEREST TEXT,
    RATE_SPREAD FLOAT,
    ACTION_TAKEN TEXT,
    NEGATIVE_AMORTIZATION TEXT,
    CO_APPLICANT_RACE TEXT,
    CO_APPLICANT_CREDIT_SCORE_SERVICE TEXT,
    APPLICATION_SUBMISSION_DESTINATION TEXT,
    TOTAL_HOUSING_UNITS TEXT,
    CENSUSTRACT_POPULATION NUMBER,
    LOAN_TERM NUMBER,
    HOEPA_HIGH_COST_MORTGAGE TEXT,
    APPLICANT_AGE TEXT,
    MSA_MEDIAN_FAMILY_INCOME NUMBER,
    COMBINED_LOAN_TO_VALUE_RATIO NUMBER,
    INTRO_RATE_PERIOD NUMBER,
    PURCHASER_TYPE TEXT,
    OTHER_NONAMORTIZING_FEATURES TEXT,
    INTEREST_RATE FLOAT,
    LOAN_AMOUNT NUMBER,
    APPLICANT_AGE_ABOVE_62 BOOLEAN,
    PREPAYMENT_PENALTY_TERM NUMBER,
    COUNTY_GEO_ID TEXT,
    OPEN_END_LINE_OF_CREDIT TEXT,
    CO_APPLICANT_ETHNICITY TEXT,
    REVERSE_MORTGAGE TEXT,
    LOAN_TYPE TEXT,
    INTEREST_RATE_DISCOUNT_POINTS_PAID NUMBER,
    CO_APPLICANT_AGE_ABOVE_62 BOOLEAN,
    BALLOON_PAYMENT TEXT,
    AUTOMATED_UNDERWRITING_SYSTEM TEXT,
    CENSUSTRACT_GEO_ID TEXT,
    CENSUSTRACT_OWNER_OCCUPIED_UNIT_COUNT NUMBER,
    LENDER_CREDITS NUMBER,
    CENSUSTRACT_TO_MSA_INCOME_RATIO FLOAT,
    PROPERTY_VALUE NUMBER,
    YEAR TEXT,
    PREAPPROVAL TEXT,
    DEBT_TO_INCOME_RATIO TEXT,
    FINANCIAL_INSTITUTION_NAME TEXT,
    ALL_DENIAL_REASONS ARRAY,
    LOAN_PURPOSE TEXT,
    APPLICANT_SEX TEXT,
    CENSUSTRACT_ONE_TO_FOUR_FAMILY_HOME_COUNT NUMBER,
    LEGAL_ENTITY_IDENTIFIER TEXT,
    APPLICANT_CREDIT_SCORE_SERVICE TEXT
);

INSERT INTO "US_REAL_ESTATE"."CYBERSYN"."HOME_MORTGAGE_DISCLOSURE_ATTRIBUTES" (TOTAL_POINTS_AND_FEES, OCCUPANCY_TYPE, CENSUSTRACT_MEDIAN_AGE_OF_HOUSING_UNITS, INTEREST_ONLY_PAYMENT, APPLICANT_ETHNICITY, PRIMARY_DENIAL_REASON, MSA_NAME, GSE_CONFORMING_LOAN_LIMIT, COUNTY_NAME, ORIGINATION_CHARGES, CO_APPLICANT_AGE, CO_APPLICANT_SEX, INITIALLY_PAYABLE_TO_INSTITUTION, MANUFACTURED_HOME_SECURED_PROPERTY_TYPE, HOME_CONSTRUCTION_METHOD, MSA_GEO_ID, STATE_GEO_ID, APPLICANT_RACE, APPLICANT_INCOME, FOR_BUSINESS_OR_COMMERCIAL_PURPOSE, LIEN_STATUS, TOTAL_LOAN_COSTS, STATE_NAME, PERCENT_MULTIFAMILY_AFFORDABLE_UNITS, CENSUSTRACT_MINORITY_POPULATION_PERCENT, MANUFACTURED_HOME_LAND_PROPERTY_INTEREST, RATE_SPREAD, ACTION_TAKEN, NEGATIVE_AMORTIZATION, CO_APPLICANT_RACE, CO_APPLICANT_CREDIT_SCORE_SERVICE, APPLICATION_SUBMISSION_DESTINATION, TOTAL_HOUSING_UNITS, CENSUSTRACT_POPULATION, LOAN_TERM, HOEPA_HIGH_COST_MORTGAGE, APPLICANT_AGE, MSA_MEDIAN_FAMILY_INCOME, COMBINED_LOAN_TO_VALUE_RATIO, INTRO_RATE_PERIOD, PURCHASER_TYPE, OTHER_NONAMORTIZING_FEATURES, INTEREST_RATE, LOAN_AMOUNT, APPLICANT_AGE_ABOVE_62, PREPAYMENT_PENALTY_TERM, COUNTY_GEO_ID, OPEN_END_LINE_OF_CREDIT, CO_APPLICANT_ETHNICITY, REVERSE_MORTGAGE, LOAN_TYPE, INTEREST_RATE_DISCOUNT_POINTS_PAID, CO_APPLICANT_AGE_ABOVE_62, BALLOON_PAYMENT, AUTOMATED_UNDERWRITING_SYSTEM, CENSUSTRACT_GEO_ID, CENSUSTRACT_OWNER_OCCUPIED_UNIT_COUNT, LENDER_CREDITS, CENSUSTRACT_TO_MSA_INCOME_RATIO, PROPERTY_VALUE, YEAR, PREAPPROVAL, DEBT_TO_INCOME_RATIO, FINANCIAL_INSTITUTION_NAME, ALL_DENIAL_REASONS, LOAN_PURPOSE, APPLICANT_SEX, CENSUSTRACT_ONE_TO_FOUR_FAMILY_HOME_COUNT, LEGAL_ENTITY_IDENTIFIER, APPLICANT_CREDIT_SCORE_SERVICE) VALUES (NULL, 'Principal residence', nan, 'Interest-only payments', 'Not Hispanic or Latino', 'Debt-to-income ratio', NULL, 'Conforming', NULL, nan, NULL, NULL, 'Initially payable to your institution', NULL, 'Site-built', NULL, 'geoId/42', 'White', 89000, 'Not primarily for a business or commercial purpose', 'Secured by a subordinate lien', nan, 'Pennsylvania', NULL, 0.0, NULL, nan, 'Application denied', 'No negative amortization', NULL, NULL, 'Submitted directly to institution', '1', nan, 240.0, NULL, '55-64', nan, 67.0, 3.0, NULL, 'No other non-fully amortizing features', nan, 165000, False, NULL, NULL, 'Open-end line of credit', NULL, 'Not a reverse mortgage', 'Conventional', nan, NULL, 'No balloon payment', NULL, NULL, nan, NULL, 0.0, 405000.0, '2023', 'Preapproval not requested', '>60%', 'BELCO COMMUNITY CREDIT UNION', '[
  "Debt-to-income ratio"
]', 'Other purpose', 'Male', nan, '549300JBMMNIOX7XU115', 'Other credit scoring model'), (NULL, 'Principal residence', 22.0, 'No interest-only payments', 'Not Hispanic or Latino', NULL, 'Las Vegas-Henderson-Paradise, NV Metro Area', 'Conforming', 'Clark County', nan, NULL, NULL, 'Initially payable to your institution', NULL, 'Site-built', 'geoId/C29820', 'geoId/32', 'White', 120000, 'Not primarily for a business or commercial purpose', 'Secured by a first lien', nan, 'Nevada', NULL, 0.2641, NULL, nan, 'Application withdrawn by applicant', 'No negative amortization', NULL, NULL, 'Submitted directly to institution', '1', 5623.0, 360.0, NULL, '55-64', 70800.0, nan, nan, NULL, 'No other non-fully amortizing features', nan, 375000, True, NULL, 'geoId/32003', 'Not an open-end line of credit', NULL, 'Not a reverse mortgage', 'Conventional', nan, NULL, 'No balloon payment', NULL, 'geoId/32003003204', 2045.0, NULL, 1.5006, nan, '2020', 'Preapproval not requested', NULL, 'FBC MORTGAGE, LLC', '[]', 'Refinancing', 'Female', 2642.0, '5493005JPZ3LXXMB0S24', NULL), (NULL, 'Principal residence', 20.0, 'No interest-only payments', 'Not Hispanic or Latino', NULL, 'Indianapolis-Carmel-Anderson, IN Metro Area', 'Conforming', 'Hamilton County', 0.0, NULL, NULL, 'Initially payable to your institution', NULL, 'Site-built', 'geoId/C26900', 'geoId/18', 'White', 74000, 'Not primarily for a business or commercial purpose', 'Secured by a first lien', 1392.0, 'Indiana', NULL, 0.10339999999999999, NULL, -0.0049499999999999995, 'Loan originated', 'No negative amortization', NULL, NULL, 'Submitted directly to institution', '1', 8083.0, 360.0, 'Not a high-cost mortgage', '25-34', 79600.0, 96.0, nan, 'Credit union, mortgage company, or finance company', 'No other non-fully amortizing features', 0.0325, 255000, False, NULL, 'geoId/18057', 'Not an open-end line of credit', NULL, 'Not a reverse mortgage', 'Veterans Affairs guaranteed', nan, NULL, 'No balloon payment', 'Desktop Underwriter', 'geoId/18057110805', 2455.0, NULL, 1.9213, 265000.0, '2020', 'Preapproval not requested', '20%-<30%', 'GUARANTEED RATE, INC.', '[]', 'Home purchase', 'Male', 2781.0, '549300U3721PJGQZYY68', 'Equifax Beacon 5.0'), (NULL, 'Principal residence', 37.0, 'No interest-only payments', 'Not Hispanic or Latino', NULL, NULL, 'Conforming', 'Scotland County', 2195.0, NULL, NULL, 'Initially payable to your institution', NULL, 'Site-built', NULL, 'geoId/37', 'Black or African American', 38000, 'Not primarily for a business or commercial purpose', 'Secured by a first lien', 3755.0, 'North Carolina', NULL, 0.3636, NULL, 0.01772, 'Loan originated', 'No negative amortization', NULL, NULL, 'Submitted directly to institution', '1', 3694.0, 180.0, 'Not a high-cost mortgage', '45-54', 52300.0, 60.0, nan, 'Freddie Mac', 'No other non-fully amortizing features', 0.05125, 65000, False, NULL, 'geoId/37165', 'Not an open-end line of credit', NULL, 'Not a reverse mortgage', 'Conventional', 1575.0, NULL, 'No balloon payment', 'Desktop Underwriter', 'geoId/37165010101', 969.0, NULL, 1.14, 105000.0, '2018', 'Preapproval not requested', '20%-<30%', 'LOANDEPOT.COM, LLC', '[]', 'Cash-out refinancing', 'Male', 1344.0, '549300AG64NHILB7ZP05', 'Experian Fair Isaac'), (NULL, 'Principal residence', nan, NULL, 'Not Hispanic or Latino', NULL, NULL, NULL, NULL, nan, NULL, 'Male', NULL, NULL, 'Manufactured home', NULL, NULL, 'White', 90000, NULL, 'Secured by a first lien', nan, NULL, NULL, nan, NULL, nan, 'Loan originated', NULL, 'White', NULL, NULL, NULL, nan, nan, 'Not a high-cost mortgage', NULL, nan, nan, nan, NULL, NULL, nan, 80000, NULL, NULL, NULL, NULL, 'Not Hispanic or Latino', NULL, 'Conventional', nan, NULL, NULL, NULL, NULL, nan, NULL, nan, nan, '2017', NULL, NULL, NULL, '[]', 'Refinancing', 'Female', nan, NULL, NULL);