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

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model School {
id String @id
fullName String
entityType EntityType
location String?
locationCoordinates Unsupported("GEOMETRY(Point, 4326)")?
locationIDList Int[]
country String?
locality String?
region String?
URLs Json?
educationDegreeLinks EducationDegreeLink[]
personEducationLinks PersonEducationLink[]
workExperienceLinks WorkExperienceLink[]
}
model CompanyFund {
id Int @id
name String?
date DateTime?
amountRaised Float?
companyID String?
fundOwner Company? @relation("fundOwner", fields: [companyID], references: [id], onDelete: Cascade)
personInvestorList Person[] @relation("CompanyFundToPerson")
companyInvestorList Company[] @relation("CompanyToCompanyFund")
}
model CompanyInvestmentLink {
totalAmountRaised Float?
date DateTime?
personID String?
companyInvestorID String?
companyID String?
id Int @id
company Company? @relation("companyInvestmentLinkTargets", fields: [companyID], references: [id], onDelete: Cascade)
companyInvestor Company? @relation("companyInvestmentLinkInvestors", fields: [companyInvestorID], references: [id], onDelete: Cascade)
person Person? @relation(fields: [personID], references: [id], onDelete: Cascade)
}
model FundingRound {
id Int @id
announcedOn DateTime?
moneyRaised Float?
name String?
stage String?
isHidden Boolean?
valuation Json?
valuationPostRound Json?
issuePrice Float?
outstandingShares Float?
companyID String?
company Company? @relation(fields: [companyID], references: [id], onDelete: Cascade)
leadPersonInvestorList Person[] @relation("leadPersonInvestor")
leadCompanyInvestorList Company[] @relation("leadCompanyInvestor")
personInvestorList Person[] @relation("personInvestor")
companyInvestorList Company[] @relation("companyInvestor")
}
model Person {
id String @id(map: "Person_pkey")
linkedinID String?
linkedinNumID Int?
fullName String
firstName String?
lastName String?
about String?
headline String?
entityType EntityType?
location String?
locationIDList Int[]
URLs Json?
gender String?
investedRoundList String[]
investedIndustries String[]
investorCategoryList String[]
investorCurrentFirmID String?
investorDisinterests String?
investorFirmPosition String?
investorInterests String?
investorMaxInvestment Float?
investorMinInvestment Float?
investorParticipatedRoundsCount Int?
investorPreviousFirmID String?
investorPreviousFirmPosition String?
investorTargetInvestment Float?
investorTitle String?
investorType String?
linkedinFollowers Int?
linkedinConnections Int?
emailList String[]
skills String[]
certifications Json[]
researchPaperCount Int?
researchPapers Json[]
country String?
locality String?
region String?
computed_oneYearAtCurrentCompany Boolean?
computed_employeeDuringMA Boolean?
computed_founderDuringMA Boolean?
computed_employeeDuringIPO Boolean?
computed_likelyToExplore Boolean?
computed_unicornEarlyEngineer Boolean?
computed_employeeDuringBigMA Boolean?
computed_potentialToLeave Boolean?
computed_topUniversity Boolean?
computed_bigTechAlumPublic Boolean?
computed_bigTechAlumPrivate Boolean?
computed_priorBackedFounder Boolean?
computed_recentlyLeftCompany Boolean?
computed_investmentCount Int?
computed_totalRaised Float?
computed_highlightList String[]
companiesFoundedList CompanyFoundingLink[]
outboundInvestmentList CompanyInvestmentLink[]
degreeList EducationDegreeLink[]
educationList PersonEducationLink[]
experienceList WorkExperienceLink[]
participatedInvestorCompanyFundList CompanyFund[] @relation("CompanyFundToPerson")
participatedLeadInvestorFundingRoundList FundingRound[] @relation("leadPersonInvestor")
participatedInvestorFundingRoundList FundingRound[] @relation("personInvestor")
}
model WorkExperienceLink {
id BigInt
endDate DateTime?
startDate DateTime?
seniorityScore Int?
description String?
entityType EntityType
positionList Json[]
investmentInfo Json?
companyID String
schoolID String?
personID String
companyName String?
companyIsStealth Boolean?
person Person @relation(fields: [personID], references: [id], onDelete: Cascade)
company Company? @relation(fields: [companyID], references: [id], onDelete: Cascade, map: "company_entityID")
school School? @relation(fields: [schoolID], references: [id], onDelete: Cascade)
@@id([id, companyID])
}
model PersonEducationLink {
id BigInt @id
endDate DateTime?
startDate DateTime?
name String?
subject String?
activities String?
grade String?
fieldOfStudy String?
description String?
schoolID String?
personID String
person Person @relation(fields: [personID], references: [id], onDelete: Cascade)
school School? @relation(fields: [schoolID], references: [id], onDelete: Cascade)
degree EducationDegreeLink[]
}
model PersonLanguageLink {
id BigInt @id
personID String
languageName String
person Person @relation(fields: [personID], references: [id], onDelete: Cascade)
proficiency LanguageProficiency?
}
model PersonFollowingLink {
id BigInt @id
followerID String
follower Person @relation(fields: [followerID], references: [id], onDelete: Cascade, name: "Follower")
followeeCompanyID String?
followeeSchoolID String?
followeePersonID String?
person Person? @relation(fields: [followeePersonID], references: [id], onDelete: Cascade, name: "Followee")
company Company? @relation(fields: [followeeCompanyID], references: [id], onDelete: Cascade)
school School? @relation(fields: [followeeSchoolID], references: [id], onDelete: Cascade)
entityType EntityType
}
model CompanyFoundingLink {
id Int @id
companyID String
personID String
person Person @relation(fields: [personID], references: [id], onDelete: Cascade)
company Company @relation(fields: [companyID], references: [id], onDelete: Cascade, map: "company_entityID")
}
model EducationDegreeLink {
id BigInt @id
fieldOfStudy String?
name String?
schoolID String?
personID String
endDate DateTime?
startDate DateTime?
person Person @relation(fields: [personID], references: [id], onDelete: Cascade)
school School? @relation(fields: [schoolID], references: [id], onDelete: Cascade, map: "school_entityID")
personEducationID BigInt?
personEducation PersonEducationLink? @relation(fields: [personEducationID], references: [id], onDelete: Cascade)
}
model Company {
id String @id
name String?
description String?
location String?
locationCoordinates Unsupported("GEOMETRY(Point, 4326)")?
locationIDList Int[]
tagline String?
founded DateTime?
yearFounded Int?
industryList String[]
headcount Int?
exitCount Int?
isStealth Boolean?
isStartup Boolean?
country String?
region String?
locality String?
URLs Json?
financingStatus String?
ownershipStatus String?
status String?
ipoDate DateTime?
latestDealType String?
latestDealDate DateTime?
latestDealAmount Float?
investmentCount Int?
investorCount Int?
legalName String?
leadInvestorCount Int?
leadInvestmentCount Int?
totalFunding Float?
acquisitionCount Int?
stockExchange String?
stockSymbol String?
participatedRoundList String[]
fundingRoundCount Int?
signals String[]
lastRoundValuation Float?
outstandingShares Float?
sharePrice Float?
sharePriceHistorical Json?
targetMarketList String[]
webEngagement Json?
webTrafficSources Json?
webViewerCountries Json?
weeklyFacebookChange Float?
weeklyFacebookPercent Float?
monthlyFacebookChange Float?
monthlyFacebookPercent Float?
triMonthlyFacebookChange Float?
triMonthlyFacebookPercent Float?
yearlyFacebookChange Float?
yearlyFacebookPercent Float?
weeklyWebTrafficChange Float?
weeklyWebTrafficPercent Float?
monthlyWebTrafficChange Float?
monthlyWebTrafficPercent Float?
triMonthlyWebTrafficChange Float?
triMonthlyWebTrafficPercent Float?
yearlyWebTrafficChange Float?
yearlyWebTrafficPercent Float?
weeklyTwitterChange Float?
weeklyTwitterPercent Float?
monthlyTwitterChange Float?
monthlyTwitterPercent Float?
triMonthlyTwitterChange Float?
triMonthlyTwitterPercent Float?
yearlyTwitterChange Float?
yearlyTwitterPercent Float?
monthlyHeadcountChange Float?
monthlyHeadcountPercent Float?
triMonthlyHeadcountChange Float?
triMonthlyHeadcountPercent Float?
yearlyHeadcountChange Float?
yearlyHeadcountPercent Float?
facebookLikes Float?
twitterFollowers Float?
linkedinFollowers Float?
currentWebTraffic Float?
facebookHistorical Json?
twitterHistorical Json?
headcountHistorical Json?
webTrafficHistorical Json?
relativeHeadcountHistorical Json?
producthuntFollowerCount Int?
producthuntAvgRating Float?
producthuntTotalVotes Int?
productList Json?
screenshotList String[]
timeline Json[]
CIKNumber String?
businessModelList String[]
legalEntityID String?
marketCap Float?
patentCount Int?
cageCode String?
dunsNumber String?
NAICSCode String?
equityCompensation Json?
monetaryCompensation Json?
departmentMonetaryCompensation Json?
jobListingList Json[]
video Json?
embeddedNews Json[]
isAcquired Boolean?
incomeSourceList String[]
isGovernment Boolean?
isNonProfit Boolean?
isVCFirm Boolean?
techStackList Json[]
isExited Boolean?
isShutDown Boolean?
jobFamilyList String[]
paySchedule String?
salaryBreakdownList Json[]
vestingDetails String?
vestingScheduleList Json[]
vestingType String?
generalLevelList String[]
customerTypes CustomerType[]
g2AverageStars Float?
g2ReviewCount Int?
g2UserRatings Json?
weeklyG2StarsChange Float?
weeklyG2StarsPercent Float?
monthlyG2StarsChange Float?
monthlyG2StarsPercent Float?
triMonthlyG2StarsChange Float?
triMonthlyG2StarsPercent Float?
yearlyG2StarsChange Float?
yearlyG2StarsPercent Float?
weeklyG2ReviewCountChange Float?
weeklyG2ReviewCountPercent Float?
monthlyG2ReviewCountChange Float?
monthlyG2ReviewCountPercent Float?
triMonthlyG2ReviewCountChange Float?
triMonthlyG2ReviewCountPercent Float?
yearlyG2ReviewCountChange Float?
yearlyG2ReviewCountPercent Float?
computed_tags String[]
cardTransaction Json[]
cardRevenue Json[]
cardTransactionsStability Json[]
cardRevenueGrowth Json[]
cardCustomers Json[]
stockPriceHistorical Json?
significantDevelopments Json?
historicalFinancials Json?
g2StarsHistorical Json?
g2ReviewCountHistorical Json?
theorgFollowerCount Int?
ownedPatents Json?
governmentAwards Json?
computed_percentChangeInDepartmentHeadcount Json?
computed_departmentHeadcounts Json?
computed_departmentHeadcountsHistorical Json?
computed_departmentCountryHeadcounts Json?
computed_departmentCountryHeadcountsHistorical Json?
computed_departmentCountryHeadcountsAbsolute Json?
computed_departmentPercentChangeCountryHeadcounts Json?
computed_funding Json?
investedIndustryList String[]
investedRoundList String[]
maxInvestment Float?
minInvestment Float?
targetInvestment Float?
investorType String?
computed_investmentCount Int?
computed_exitedInvestmentCount Int?
computed_IPOedInvestmentCount Int?
computed_acquiredInvestmentCount Int?
computed_shutdownAndExitedInvestmentCount Int?
computed_shutdownInvestmentCount Int?
computed_operatingInvestmentCount Int?
computed_founded DateTime?
acquiredBy CompanyAcquisitionLink? @relation("acquiree")
acquisitionList CompanyAcquisitionLink[] @relation("acquirer")
companyFoundingLinks CompanyFoundingLink[]
inboundInvestmentList CompanyInvestmentLink[] @relation("companyInvestmentLinkTargets")
outboundInvestmentList CompanyInvestmentLink[] @relation("companyInvestmentLinkInvestors")
fundingRoundList FundingRound[]
workExperienceLinks WorkExperienceLink[]
participatedLeadInvestorFundingRoundList FundingRound[] @relation("leadCompanyInvestor")
participatedInvestorFundingRoundList FundingRound[] @relation("companyInvestor")
participatedInvestorCompanyFundList CompanyFund[] @relation("CompanyToCompanyFund")
fundList CompanyFund[] @relation("fundOwner")
}
model CompanyAcquisitionLink {
id Int @id
announcedOn DateTime?
acquirerName String?
acquireeName String?
price Float?
acquireeCompanyID String? @unique
acquirerCompanyID String?
acquireeCompany Company? @relation("acquiree", fields: [acquireeCompanyID], references: [id], onDelete: Cascade)
acquirerCompany Company? @relation("acquirer", fields: [acquirerCompanyID], references: [id], onDelete: Cascade)
}
enum EntityType {
person
company
school
organization
}
enum CustomerType {
B2B
B2C
B2G
}
enum LanguageProficiency {
ELEMENTARY
LIMITED_WORKING
PROFESSIONAL_WORKING
FULL_PROFESSIONAL
NATIVE_OR_BILINGUAL
}

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

{
"offset": 0,
"limit": 100,
"filters": [
{
"AND": [
{
"experienceList.company.id": {
"operation": "eq",
"value": "H3TGFhoSrYx454dgVH6xL5EqXuW9dkb" // The ID for google
}
},
{
"experienceList.endDate": {
"operation": "eq",
"value": null
}
}
]
}
],
}