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