|
| 1 | +with staff_education_organization_contact_associations as ( |
| 2 | + {{ source_edfi3('staff_education_organization_contact_associations') }} |
| 3 | +), |
| 4 | +renamed as ( |
| 5 | + select |
| 6 | + tenant_code, |
| 7 | + api_year, |
| 8 | + pull_timestamp, |
| 9 | + last_modified_timestamp, |
| 10 | + file_row_number, |
| 11 | + filename, |
| 12 | + is_deleted, |
| 13 | + |
| 14 | + v:id::string as record_guid, |
| 15 | + v:contactTitle::string as contact_title, |
| 16 | + v:contactTypeDescriptor::string as contact_type_descriptor, |
| 17 | + v:electronicMailAddress::string as electronic_mail_address, |
| 18 | + |
| 19 | + v:address:addressTypeDescriptor::string as address_type_descriptor, |
| 20 | + v:address:localeDescriptor::string as address_locale_descriptor, |
| 21 | + v:address:stateAbbreviationDescriptor::string as address_state_abbreviation_descriptor, |
| 22 | + v:address:apartmentRoomSuiteNumber::string as address_apartment_room_suite_number, |
| 23 | + v:address:buildingSiteNumber::string as address_building_site_number, |
| 24 | + v:address:city::string as address_city, |
| 25 | + v:address:congressionalDistrict::string as address_congressional_district, |
| 26 | + v:address:countyFIPSCode::string as address_county_fips_code, |
| 27 | + v:address:doNotPublishIndicator::boolean as is_address_do_not_publish_indicator, |
| 28 | + v:address:latitude::string as address_latitude, |
| 29 | + v:address:longitude::string as address_longitude, |
| 30 | + v:address:nameOfCounty::string as address_name_of_county, |
| 31 | + v:address:postalCode::string as address_postal_code, |
| 32 | + v:address:streetNumberName::string as address_street_number_name, |
| 33 | + |
| 34 | + v:educationOrganizationReference:educationOrganizationId::integer as ed_org_id, |
| 35 | + v:staffReference:staffUniqueId::integer as staff_unique_id, |
| 36 | + -- lists |
| 37 | + v:telephones as v_telephones, |
| 38 | + v:address:periods as v_address_periods, |
| 39 | + |
| 40 | + -- references |
| 41 | + v:educationOrganizationReference as educationOrganizationReference, |
| 42 | + v:staffReference as staff_reference |
| 43 | + |
| 44 | + from sessions |
| 45 | +) |
| 46 | +select * from renamed |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + "address": { |
| 51 | + "addressTypeDescriptor": "string", |
| 52 | + "localeDescriptor": "string", |
| 53 | + "": "string", |
| 54 | + "": "string", |
| 55 | + "": "string", |
| 56 | + "": "string", |
| 57 | + "": "string", |
| 58 | + "": "string", |
| 59 | + "": true, |
| 60 | + "": "string", |
| 61 | + "": "string", |
| 62 | + "": "string", |
| 63 | + "": "string", |
| 64 | + "": "string", |
| 65 | + "periods": [ |
| 66 | + { |
| 67 | + "beginDate": "2024-07-23", |
| 68 | + "endDate": "2024-07-23" |
| 69 | + } |
| 70 | + ] |
| 71 | + }, |
0 commit comments