DSL Query Schemas
We use Prisma internally to manage the relations between each of our different data models. The Aviato DSL also supports filtering across relations.
Schema
1 model School { 2 id String @id 3 fullName String 4 entityType EntityType 5 location String? 6 locationCoordinates Unsupported("GEOMETRY(Point, 4326)")? 7 locationIDList Int[] 8 country String? 9 locality String? 10 region String? 11 URLs Json? 12 educationDegreeLinks EducationDegreeLink[] 13 personEducationLinks PersonEducationLink[] 14 workExperienceLinks WorkExperienceLink[] 15 } 16 17 model CompanyFund { 18 id Int @id 19 name String? 20 date DateTime? 21 amountRaised Float? 22 fundOwner Company? @relation("fundOwner", fields: [companyID], references: [id], onDelete: Cascade) 23 personInvestorList Person[] @relation("CompanyFundToPerson") 24 companyInvestorList Company[] @relation("CompanyToCompanyFund") 25 } 26 27 model CompanyInvestmentLink { 28 totalAmountRaised Float? 29 date DateTime? 30 personID String? 31 companyInvestorID String? 32 companyID String? 33 id Int @id 34 company Company? @relation("companyInvestmentLinkTargets", fields: [companyID], references: [id], onDelete: Cascade) 35 companyInvestor Company? @relation("companyInvestmentLinkInvestors", fields: [companyInvestorID], references: [id], onDelete: Cascade) 36 person Person? @relation(fields: [personID], references: [id], onDelete: Cascade) 37 } 38 39 model FundingRound { 40 id Int @id 41 announcedOn DateTime? 42 moneyRaised Float? 43 name String? 44 stage String? 45 isHidden Boolean? 46 valuation Json? 47 valuationPostRound Json? 48 issuePrice Float? 49 outstandingShares Float? 50 companyID String? 51 company Company? @relation(fields: [companyID], references: [id], onDelete: Cascade) 52 leadPersonInvestorList Person[] @relation("leadPersonInvestor") 53 leadCompanyInvestorList Company[] @relation("leadCompanyInvestor") 54 personInvestorList Person[] @relation("personInvestor") 55 companyInvestorList Company[] @relation("companyInvestor") 56 } 57 58 model Person { 59 id String @id(map: "Person_pkey") 60 fullName String 61 headline String? 62 entityType EntityType 63 location String? 64 locationIDList Int[] 65 URLs Json? 66 gender String? 67 investedRoundList String[] 68 investedIndustries String[] 69 investorCategoryList String[] 70 investorCurrentFirmID String? 71 investorDisinterests String? 72 investorFirmPosition String? 73 investorInterests String? 74 investorMaxInvestment Float? 75 investorMinInvestment Float? 76 investorParticipatedRoundsCount Int? 77 investorPreviousFirmID String? 78 investorPreviousFirmPosition String? 79 investorTargetInvestment Float? 80 investorTitle String? 81 investorType String? 82 emailList String[] 83 researchPaperCount Int? 84 researchPapers Json[] 85 country String? 86 locality String? 87 region String? 88 computed_oneYearAtCurrentCompany Boolean? 89 computed_employeeDuringMA Boolean? 90 computed_founderDuringMA Boolean? 91 computed_employeeDuringIPO Boolean? 92 computed_likelyToExplore Boolean? 93 computed_unicornEarlyEngineer Boolean? 94 computed_employeeDuringBigMA Boolean? 95 computed_potentialToLeave Boolean? 96 computed_topUniversity Boolean? 97 computed_bigTechAlumPublic Boolean? 98 computed_bigTechAlumPrivate Boolean? 99 computed_priorBackedFounder Boolean? 100 computed_recentlyLeftCompany Boolean? 101 computed_investmentCount Int? 102 computed_totalRaised Float? 103 companiesFoundedList CompanyFoundingLink[] 104 outboundInvestmentList CompanyInvestmentLink[] 105 degreeList EducationDegreeLink[] 106 educationList PersonEducationLink[] 107 experienceList WorkExperienceLink[] 108 participatedInvestorCompanyFundList CompanyFund[] @relation("CompanyFundToPerson") 109 participatedLeadInvestorFundingRoundList FundingRound[] @relation("leadPersonInvestor") 110 participatedInvestorFundingRoundList FundingRound[] @relation("personInvestor") 111 } 112 113 model WorkExperienceLink { 114 id BigInt 115 endDate DateTime? 116 startDate DateTime? 117 seniorityScore Int? 118 entityType EntityType 119 positionList Json[] 120 investmentInfo Json? 121 companyID String 122 schoolID String? 123 personID String 124 companyName String? 125 companyIsStealth Boolean? 126 person Person @relation(fields: [personID], references: [id], onDelete: Cascade) 127 company Company? @relation(fields: [companyID], references: [id], onDelete: Cascade, map: "company_entityID") 128 school School? @relation(fields: [schoolID], references: [id], onDelete: Cascade) 129 } 130 131 model PersonEducationLink { 132 id BigInt @id 133 endDate DateTime? 134 startDate DateTime? 135 name String? 136 subject String? 137 schoolID String? 138 personID String 139 person Person @relation(fields: [personID], references: [id], onDelete: Cascade) 140 school School? @relation(fields: [schoolID], references: [id], onDelete: Cascade) 141 degree EducationDegreeLink[] 142 } 143 144 model CompanyFoundingLink { 145 id Int @id 146 companyID String 147 personID String 148 person Person @relation(fields: [personID], references: [id], onDelete: Cascade) 149 company Company @relation(fields: [companyID], references: [id], onDelete: Cascade, map: "company_entityID") 150 } 151 152 model EducationDegreeLink { 153 id BigInt @id 154 fieldOfStudy String? 155 name String? 156 schoolID String? 157 personID String 158 endDate DateTime? 159 startDate DateTime? 160 person Person @relation(fields: [personID], references: [id], onDelete: Cascade) 161 school School? @relation(fields: [schoolID], references: [id], onDelete: Cascade, map: "school_entityID") 162 personEducation PersonEducationLink? @relation(fields: [personEducationID], references: [id], onDelete: Cascade) 163 } 164 165 model Company { 166 id String @id 167 name String? 168 description String? 169 location String? 170 locationCoordinates Unsupported("GEOMETRY(Point, 4326)")? 171 locationIDList Int[] 172 tagline String? 173 founded DateTime? 174 yearFounded Int? 175 industryList String[] 176 headcount Int? 177 exitCount Int? 178 isStealth Boolean? 179 isStartup Boolean? 180 country String? 181 region String? 182 locality String? 183 URLs Json? 184 financingStatus String? 185 ownershipStatus String? 186 status String? 187 ipoDate DateTime? 188 latestDealType String? 189 latestDealDate DateTime? 190 latestDealAmount Float? 191 investmentCount Int? 192 investorCount Int? 193 legalName String? 194 leadInvestorCount Int? 195 leadInvestmentCount Int? 196 totalFunding Float? 197 acquisitionCount Int? 198 stockExchange String? 199 stockSymbol String? 200 participatedRoundList String[] 201 fundingRoundCount Int? 202 signals String[] 203 lastRoundValuation Float? 204 outstandingShares Float? 205 sharePrice Float? 206 sharePriceHistorical Json? 207 targetMarketList String[] 208 webEngagement Json? 209 webTrafficSources Json? 210 webViewerCountries Json? 211 weeklyFacebookChange Float? 212 weeklyFacebookPercent Float? 213 monthlyFacebookChange Float? 214 monthlyFacebookPercent Float? 215 triMonthlyFacebookChange Float? 216 triMonthlyFacebookPercent Float? 217 yearlyFacebookChange Float? 218 yearlyFacebookPercent Float? 219 weeklyWebTrafficChange Float? 220 weeklyWebTrafficPercent Float? 221 monthlyWebTrafficChange Float? 222 monthlyWebTrafficPercent Float? 223 triMonthlyWebTrafficChange Float? 224 triMonthlyWebTrafficPercent Float? 225 yearlyWebTrafficChange Float? 226 yearlyWebTrafficPercent Float? 227 weeklyTwitterChange Float? 228 weeklyTwitterPercent Float? 229 monthlyTwitterChange Float? 230 monthlyTwitterPercent Float? 231 triMonthlyTwitterChange Float? 232 triMonthlyTwitterPercent Float? 233 yearlyTwitterChange Float? 234 yearlyTwitterPercent Float? 235 monthlyHeadcountChange Float? 236 monthlyHeadcountPercent Float? 237 triMonthlyHeadcountChange Float? 238 triMonthlyHeadcountPercent Float? 239 yearlyHeadcountChange Float? 240 yearlyHeadcountPercent Float? 241 facebookLikes Float? 242 twitterFollowers Float? 243 linkedinFollowers Float? 244 currentWebTraffic Float? 245 facebookHistorical Json? 246 twitterHistorical Json? 247 headcountHistorical Json? 248 webTrafficHistorical Json? 249 relativeHeadcountHistorical Json? 250 producthuntFollowerCount Int? 251 producthuntAvgRating Float? 252 producthuntTotalVotes Int? 253 productList Json? 254 screenshotList String[] 255 timeline Json[] 256 CIKNumber String? 257 businessModelList String[] 258 legalEntityID String? 259 marketCap Float? 260 patentCount Int? 261 cageCode String? 262 dunsNumber String? 263 NAICSCode String? 264 equityCompensation Json? 265 monetaryCompensation Json? 266 departmentMonetaryCompensation Json? 267 jobListingList Json[] 268 video Json? 269 embeddedNews Json[] 270 isAcquired Boolean? 271 incomeSourceList String[] 272 isGovernment Boolean? 273 isNonProfit Boolean? 274 isVCFirm Boolean? 275 techStackList Json[] 276 isExited Boolean? 277 isShutDown Boolean? 278 jobFamilyList String[] 279 paySchedule String? 280 salaryBreakdownList Json[] 281 vestingDetails String? 282 vestingScheduleList Json[] 283 vestingType String? 284 generalLevelList String[] 285 customerTypes CustomerType[] 286 g2AverageStars Float? 287 g2ReviewCount Int? 288 g2UserRatings Json? 289 weeklyG2StarsChange Float? 290 weeklyG2StarsPercent Float? 291 monthlyG2StarsChange Float? 292 monthlyG2StarsPercent Float? 293 triMonthlyG2StarsChange Float? 294 triMonthlyG2StarsPercent Float? 295 yearlyG2StarsChange Float? 296 yearlyG2StarsPercent Float? 297 weeklyG2ReviewCountChange Float? 298 weeklyG2ReviewCountPercent Float? 299 monthlyG2ReviewCountChange Float? 300 monthlyG2ReviewCountPercent Float? 301 triMonthlyG2ReviewCountChange Float? 302 triMonthlyG2ReviewCountPercent Float? 303 yearlyG2ReviewCountChange Float? 304 yearlyG2ReviewCountPercent Float? 305 computed_tags String[] 306 cardTransaction Json[] 307 cardRevenue Json[] 308 cardTransactionsStability Json[] 309 cardRevenueGrowth Json[] 310 cardCustomers Json[] 311 stockPriceHistorical Json? 312 significantDevelopments Json? 313 historicalFinancials Json? 314 g2StarsHistorical Json? 315 g2ReviewCountHistorical Json? 316 theorgFollowerCount Int? 317 ownedPatents Json? 318 governmentAwards Json? 319 computed_percentChangeInDepartmentHeadcount Json? 320 computed_departmentHeadcounts Json? 321 computed_departmentHeadcountsHistorical Json? 322 computed_departmentCountryHeadcounts Json? 323 computed_departmentCountryHeadcountsHistorical Json? 324 computed_departmentCountryHeadcountsAbsolute Json? 325 computed_departmentPercentChangeCountryHeadcounts Json? 326 computed_funding Json? 327 investedIndustryList String[] 328 investedRoundList String[] 329 maxInvestment Float? 330 minInvestment Float? 331 targetInvestment Float? 332 investorType String? 333 computed_investmentCount Int? 334 computed_exitedInvestmentCount Int? 335 computed_IPOedInvestmentCount Int? 336 computed_acquiredInvestmentCount Int? 337 computed_shutdownAndExitedInvestmentCount Int? 338 computed_shutdownInvestmentCount Int? 339 computed_operatingInvestmentCount Int? 340 computed_founded DateTime? 341 acquiredBy CompanyAcquisitionLink? @relation("acquiree") 342 acquisitionList CompanyAcquisitionLink[] @relation("acquirer") 343 companyFoundingLinks CompanyFoundingLink[] 344 inboundInvestmentList CompanyInvestmentLink[] @relation("companyInvestmentLinkTargets") 345 outboundInvestmentList CompanyInvestmentLink[] @relation("companyInvestmentLinkInvestors") 346 fundingRoundList FundingRound[] 347 workExperienceLinks WorkExperienceLink[] 348 participatedLeadInvestorFundingRoundList FundingRound[] @relation("leadCompanyInvestor") 349 participatedInvestorFundingRoundList FundingRound[] @relation("companyInvestor") 350 participatedInvestorCompanyFundList CompanyFund[] @relation("CompanyToCompanyFund") 351 fundList CompanyFund[] @relation("fundOwner") 352 } 353 354 model CompanyAcquisitionLink { 355 id Int @id 356 announcedOn DateTime? 357 acquirerName String? 358 acquireeName String? 359 price Float? 360 acquireeCompanyID String? @unique 361 acquirerCompanyID String? 362 acquireeCompany Company? @relation("acquiree", fields: [acquireeCompanyID], references: [id], onDelete: Cascade) 363 acquirerCompany Company? @relation("acquirer", fields: [acquirerCompanyID], references: [id], onDelete: Cascade) 364 } 365 366 enum EntityType { 367 person 368 company 369 school 370 organization 371 372 } 373 374 enum CustomerType { 375 B2B 376 B2C 377 B2G 378 379 }
Examples
To find all people who are currently employed at Google, first make a DSL nameQuery
or call the enrich
to find the aviato ID for google. Then, make the following DSL
1 { 2 "offset": 0, 3 "limit": 100, 4 "filters": [ 5 { 6 "AND": [ 7 { 8 "experienceList.company.id": { 9 "operation": "eq", 10 "value": "H3TGFhoSrYx454dgVH6xL5EqXuW9dkb" // The ID for google 11 } 12 }, 13 { 14 "experienceList.endDate": { 15 "operation": "eq", 16 "value": null 17 } 18 } 19 ] 20 } 21 ], 22 }