Class BigQueryExtractor

java.lang.Object
com.maplander.backend.utils.migration.extractor.BigQueryExtractor

public class BigQueryExtractor extends Object
  • Constructor Details

    • BigQueryExtractor

      public BigQueryExtractor()
  • Method Details

    • extractColonies

      public List<Colony> extractColonies(int limit)
    • extractColonyCenters

      public List<ColonyCenter> extractColonyCenters(int limit)
    • extractColonyLocationsPolygons

      public List<ColonyLocationsPolygon> extractColonyLocationsPolygons(int limit)
    • extractLocationPreview

      public List<LocationPreview> extractLocationPreview()
    • extractSearchLocationsT

      public List<SearchLocationT> extractSearchLocationsT(int limit)
    • extractSearchLocationsOffice

      public List<SearchLocationOffice> extractSearchLocationsOffice(int limit)
    • extractSearchLocationsTPolygon

      public List<SearchLocationTPolygon> extractSearchLocationsTPolygon(int limit)
    • extractSearchLocationTPolygonId

      public List<SearchLocationTPolygonId> extractSearchLocationTPolygonId(int limit)
    • extractSearchLocationTPolygonIdBrand

      public List<SearchLocationTPolygonIdBrand> extractSearchLocationTPolygonIdBrand(int limit)
    • extractLeadTotalInfo

      public List<LeadTotalInfo> extractLeadTotalInfo(int limit)
    • extractSearchLocations

      public List<SearchLocation> extractSearchLocations(int limit)
    • extractSearchOfficeUrl

      public List<SearchOfficeUrl> extractSearchOfficeUrl()
    • extractSearchUsers

      public List<SearchUser> extractSearchUsers()
    • extractSearchOffices

      public List<SearchOffice> extractSearchOffices()
    • extractEstadosTest

      public List<EstadoTest> extractEstadosTest(int limit)
    • extractEstadoMunicipios

      public List<EstadoMunicipio> extractEstadoMunicipios(int limit)
    • extractFullPolygons

      public List<FullPolygon> extractFullPolygons(int limit)
    • extractPostalCodePolygons

      public List<PostalCodePolygon> extractPostalCodePolygons(int limit)
    • extractAuxLocationRelevance

      public List<AuxLocationRelevance> extractAuxLocationRelevance(int limit)
    • extractClassificationProperties

      public List<ClassificationProperties> extractClassificationProperties(int limit)
    • extractColonyUnique

      public List<ColonyUnique> extractColonyUnique(int limit)
    • extractOfficesAsMap

      public Map<Long,Office> extractOfficesAsMap()
    • extractOfficesAsMap

      public Map<Long,Office> extractOfficesAsMap(List<Long> officeIds)
    • extractOffices

      public List<Office> extractOffices()
    • extractOffices

      public List<Office> extractOffices(List<Long> officeIds)
    • extractUsersAsMap

      public Map<Long,User> extractUsersAsMap()
    • extractUsersAsMap

      public Map<Long,User> extractUsersAsMap(List<Long> officeIds)
    • extractUsers

      public List<User> extractUsers()
    • extractUsers

      public List<User> extractUsers(List<Long> officeIds)
    • extractPropertiesAsMap

      public Map<Long,Property> extractPropertiesAsMap()
    • extractPropertiesAsMap

      public Map<Long,Property> extractPropertiesAsMap(List<Long> officeIds)
    • extractProperties

      public List<Property> extractProperties()
    • extractProperties

      public List<Property> extractProperties(List<Long> officeIds)
    • extractLeadsAsMap

      public Map<Long,Lead> extractLeadsAsMap()
    • extractLeadsAsMap

      public Map<Long,Lead> extractLeadsAsMap(List<Long> officeIds)
    • extractLeads

      public List<Lead> extractLeads()
    • extractLeads

      public List<Lead> extractLeads(List<Long> officeIds)
    • extractTasksAsMap

      public Map<Long,Task> extractTasksAsMap()
    • extractTasksAsMap

      public Map<Long,Task> extractTasksAsMap(List<Long> officeIds)
    • extractTasks

      public List<Task> extractTasks()
    • extractTasks

      public List<Task> extractTasks(List<Long> officeIds)
    • extractTaskEntriesAsMap

      public Map<Long,TaskEntry> extractTaskEntriesAsMap()
    • extractTaskEntries

      public List<TaskEntry> extractTaskEntries()
    • getBigQuery

      public com.google.cloud.bigquery.BigQuery getBigQuery()
    • extractInteractions

      public List<Interaction> extractInteractions(Long[] propertyIds)
    • extractPropertyRequests

      public List<PropertyRequest> extractPropertyRequests(Long[] propertyIds)
    • extractDevices

      public List<Device> extractDevices(Long[] userIds)
    • extractNotifications

      public List<Notification> extractNotifications(Long[] userIds)
    • extractPFiles

      public List<PFile> extractPFiles(Long[] propertyIds)
    • extractSharedProperties

      public List<SharedProperty> extractSharedProperties(Long[] propertyIds)
    • extractAuthUsers

      public List<AuthUser> extractAuthUsers(Long[] propertyIds)
    • extractSharedCommissions

      public List<SharedCommission> extractSharedCommissions(Long[] propertyIds)
    • extractLeadInfos

      public List<LeadInfo> extractLeadInfos(Long[] officeIds)
    • extractAds

      public List<Ad> extractAds(Long[] officeIds)
    • extractClients

      public List<Client> extractClients(Long[] officeIds)
    • extractInteresteds

      public List<Interested> extractInteresteds(Long[] propertyIds)
    • extractUserMLs

      public List<UserML> extractUserMLs()
    • extractPropertyReferences

      public List<PropertyReference> extractPropertyReferences(Long[] officeIds)
    • extractColonyLocations

      public List<ColonyLocation> extractColonyLocations()
    • extractEmailCanceled

      public List<EmailCanceled> extractEmailCanceled()
    • extractInfoLogs

      public List<InfoLog> extractInfoLogs()
    • extractDeviceFilters

      public List<DeviceFilter> extractDeviceFilters()
    • extractDeviceFilterBackUps

      public List<DeviceFilterBackUp> extractDeviceFilterBackUps()
    • extractDeviceFilterXs

      public List<DeviceFilterX> extractDeviceFilterXs()
    • extractInteractionLastMonth

      public List<InteractionLastMonth> extractInteractionLastMonth()
    • extractInteractionLastTwoWeeks

      public List<InteractionLastTwoWeeks> extractInteractionLastTwoWeeks()
    • extractInteractionLastWeek

      public List<InteractionLastWeek> extractInteractionLastWeek()
    • extractInteractionReportMonth

      public List<InteractionReportMonth> extractInteractionReportMonth()
    • extractInteractionReportMonthUsers

      public List<InteractionReportMonthUser> extractInteractionReportMonthUsers()
    • extractInteractionReportMonthV2s

      public List<InteractionReportMonthV2> extractInteractionReportMonthV2s()
    • extractInteractionReportMonthV3s

      public List<InteractionReportMonthV3> extractInteractionReportMonthV3s()
    • extractLogWhatsApp

      public List<LogWhatsApp> extractLogWhatsApp(int limit)
    • extractMessageWhatsBots

      public List<MessageWhatsBot> extractMessageWhatsBots()
    • extractOfficeRespaldo

      public List<OfficeRespaldo> extractOfficeRespaldo(int limit)
    • extractOfficeTotals

      public List<OfficeTotal> extractOfficeTotals(int limit)
    • extractSendWhatsApp

      public List<SendWhatApp> extractSendWhatsApp(int limit)
    • extractStadisticsOfSegmentationPropertyPrices

      public List<StadisticsOfSegmentationPropertyPrice> extractStadisticsOfSegmentationPropertyPrices()
    • extractBarrioPA

      public List<BarrioPA> extractBarrioPA(int limit)
    • extractCorregimientoPA

      public List<CorregimientoPA> extractCorregimientoPA(int limit)
      VERIFY AUXILIAR public List extractBarriosAux() { log.info("Extracting barrios Aux from BigQuery"); List list = new ArrayListinvalid input: '<'>(); try { String query = String.format("SELECT * FROM `%s.geopolitical.barriosAux`", PROJECT_ID); TableResult result = executeQuery(query); for (FieldValueList row : result.iterateAll()) { BarriosAux b = new BarriosAux(); b.setId(getIntOrNull(row, "id")); b.setProvincia(getStringOrNull(row, "provincia")); b.setDistrito(getStringOrNull(row, "distrito")); b.setCorregimiento(getStringOrNull(row, "corregimiento")); b.setLocalidad(getStringOrNull(row, "localidad")); b.setBarrio(getStringOrNull(row, "barrio")); list.add(b); } log.info("Extracted {} barrios Aux", list.size()); } catch (Exception e) { System.err.println("Error extracting barrios Aux: " + e.getMessage()); } return list; }
    • extractDistritoPA

      public List<DistritoPA> extractDistritoPA(int limit)
      VERIFY AUXILIAR public List extractCorregimientoPAaux() { log.info("Extracting CorregimientoPAaux from BigQuery"); List list = new ArrayListinvalid input: '<'>(); try { String query = String.format("SELECT * FROM `%s.geopolitical.CorregimientoPAaux`", PROJECT_ID); TableResult result = executeQuery(query); for (FieldValueList row : result.iterateAll()) { CorregimientoPAaux c = new CorregimientoPAaux(); c.setId(getIntOrNull(row, "id")); c.setName(getStringOrNull(row, "name")); c.setDistrictId(getIntOrNull(row, "district_id")); c.setLatitude(getStringOrNull(row, "latitude")); c.setLongitude(getStringOrNull(row, "longitude")); list.add(c); } log.info("Extracted {} CorregimientoPAaux", list.size()); } catch (Exception e) { System.err.println("Error extracting CorregimientoPAaux: " + e.getMessage()); } return list; }
    • extractLocalidadPA

      public List<LocalidadPA> extractLocalidadPA(int limit)
    • extractProvinciaPA

      public List<ProvinciaPA> extractProvinciaPA(int limit)
    • extractSearchBarrioPA

      public List<SearchBarrioPA> extractSearchBarrioPA(int limit)
    • extractGeopoliticPALocations

      public List<GeopoliticPALocation> extractGeopoliticPALocations(int limit)
    • extractSessions

      public List<Sessions> extractSessions()
    • extractLonasHit

      public List<LonasHit> extractLonasHit(int limit)
    • extractAdminDashBoards

      public List<AdminDashBoard> extractAdminDashBoards(int limit)
    • extractBanners

      public List<Banner> extractBanners(int limit)
    • extractBCards

      public List<BCard> extractBCards(int limit)
    • extractCERs

      public List<CER> extractCERs(int limit)
    • extractClientProperties

      public List<ClientProperty> extractClientProperties(int limit)
    • extractDeviceMLs

      public List<DeviceML> extractDeviceMLs(int limit)
    • extractLimitPrices

      public List<LimitPrice> extractLimitPrices(int limit)
    • extractNotes

      public List<Notes> extractNotes(int limit)
    • extractOffers

      public List<Offer> extractOffers(int limit)
    • extractOrderBanners

      public List<OrderBanner> extractOrderBanners(int limit)
    • extractPropertyExpireds

      public List<PropertyExpired> extractPropertyExpireds(int limit)
    • extractPropertyLiteSuggests

      public List<PropertyLiteSuggest> extractPropertyLiteSuggests(int limit)
    • extractExplorationAuxs

      public List<ExplorationAux> extractExplorationAuxs(int limit)
    • extractMunicipalyLocations

      public List<MunicipalyLocations> extractMunicipalyLocations(int limit)
    • extractSearchLocationTBrands

      public List<SearchLocationTBrand> extractSearchLocationTBrands(int limit)
    • extractSearchLocationTCompacts

      public List<SearchLocationTCompact> extractSearchLocationTCompacts(int limit)
    • extractSearchLocationTPolygonBrands

      public List<SearchLocationTPolygonBrand> extractSearchLocationTPolygonBrands(int limit)
    • extractStateLocations

      public List<StateLocations> extractStateLocations(int limit)
    • extractFilterAuxs

      public List<FilterAux> extractFilterAuxs(int limit)
    • extractFilters

      public List<Filter> extractFilters(int limit)
    • extractNotificationEvents

      public List<NotificationEvent> extractNotificationEvents(int limit)
    • extractTests

      public List<Test> extractTests(int limit)
    • extractErroresRvs

      public List<ErroresRv> extractErroresRvs(int limit)
    • extractEstados

      public List<Estados> extractEstados(int limit)
    • extractExternalAgents

      public List<ExternalAgent> extractExternalAgents(int limit)
    • extractFullPolygonCloseds

      public List<FullPolygonClosed> extractFullPolygonCloseds(int limit)
    • extractMunicipiosCorregidosPolygons

      public List<MunicipiosCorregidosPolygon> extractMunicipiosCorregidosPolygons(int limit)
    • extractPolygons

      public List<Polygons> extractPolygons(int limit)
    • extractPolygonsIds

      public List<PolygonsId> extractPolygonsIds(int limit)
    • extractPolygonTests

      public List<PolygonTest> extractPolygonTests(int limit)
    • extractTestDashboardFunnels

      public List<TestDashboardFunnel> extractTestDashboardFunnels(int limit)
    • extractTestSheets

      public List<TestSheets> extractTestSheets(int limit)
    • extractTestSheetsNativas

      public List<TestSheetsNativa> extractTestSheetsNativas(int limit)
    • extractPropertyTypes

      public List<PropertyType> extractPropertyTypes(int limit)
    • extractSearchesMLs

      public List<SearchesML> extractSearchesMLs(int limit)
    • extractSignInLinkMLs

      public List<SignInLinkML> extractSignInLinkMLs(int limit)
    • extractProvinciaPAs

      public List<provinciaPA> extractProvinciaPAs(int limit)
    • extractInteraction20240531s

      public List<Interaction20240531> extractInteraction20240531s(int limit)
    • extractExternalAgentCopies

      public List<ExternalAgentCopy> extractExternalAgentCopies(int limit)
    • extractValuatorPredictions

      public List<ValuatorPrediction> extractValuatorPredictions(int limit)
    • extractSitemaps

      public List<Sitemap> extractSitemaps(int limit)
    • extractMoreSearchedLastMonths

      public List<MoreSearchedLastMonth> extractMoreSearchedLastMonths(int limit)
    • extractGeopoliticPAs

      public List<GeopoliticPA> extractGeopoliticPAs(int limit)
    • extractErrorServices

      public List<ErrorService> extractErrorServices(int limit)
    • extractInsightsTotals

      public List<InsightsTotal> extractInsightsTotals(int limit)
    • extractAdPackages

      public List<AdPackages> extractAdPackages(int limit)
    • extractInsights

      public List<Insights> extractInsights(int limit)
    • extractOfficeRespaldoAlimentados

      public List<OfficeRespaldoAlimentado> extractOfficeRespaldoAlimentados(int limit)
    • extractUserRespaldos

      public List<UserRespaldo> extractUserRespaldos(int limit)
    • extractDistritoPAAuxs

      public List<DistritoPAAux> extractDistritoPAAuxs(int limit)
    • extractOfficeAuxs

      public List<OfficeAux> extractOfficeAuxs(int limit)
    • extractClientAuxs

      public List<ClientAux> extractClientAuxs(int limit)
    • extractClientRespPas

      public List<ClientRespPa> extractClientRespPas(int limit)
    • extractClientKWs

      public List<ClientKW> extractClientKWs(int limit)
    • extractClientKW2s

      public List<ClientKW2> extractClientKW2s(int limit)
    • extractErrorServiceAuxs

      public List<ErrorServiceAux> extractErrorServiceAuxs(int limit)
    • extractCERAuxs

      public List<CERAux> extractCERAuxs(int limit)
    • extractLeadAuxs

      public List<LeadAux> extractLeadAuxs(int limit)
    • extractLeadKWs

      public List<LeadKW> extractLeadKWs(int limit)
    • extractLeadKW2s

      public List<LeadKW2> extractLeadKW2s(int limit)
    • extractLeadRespPas

      public List<LeadRespPa> extractLeadRespPas(int limit)
    • extractColonyLocationsPolygon2s

      public List<ColonyLocationsPolygon2> extractColonyLocationsPolygon2s(int limit)
    • extractLocationsPreview2s

      public List<LocationsPreview2> extractLocationsPreview2s(int limit)
    • extractLocationsPreview2Polygons

      public List<LocationsPreview2Polygon> extractLocationsPreview2Polygons(int limit)
    • extractLogs

      public List<Log> extractLogs(int limit)
    • dumpAllSchemasToJson

      public void dumpAllSchemasToJson(String outputPath)
    • main

      public static void main(String[] args)