orangeslice 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apify.d.ts +57 -0
- package/dist/apify.js +126 -0
- package/dist/cli.js +18 -7
- package/dist/generateObject.d.ts +34 -0
- package/dist/generateObject.js +85 -0
- package/dist/geo.d.ts +50 -0
- package/dist/geo.js +91 -0
- package/dist/index.d.ts +32 -3
- package/dist/index.js +24 -3
- package/docs/AGENTS.md +94 -384
- package/docs/apify.md +133 -0
- package/docs/b2b.md +178 -0
- package/docs/browser.md +173 -0
- package/docs/serp.md +167 -0
- package/docs/strategies.md +250 -0
- package/package.json +2 -2
- package/docs/B2B_CROSS_TABLE_TEST_FINDINGS.md +0 -255
- package/docs/B2B_DATABASE.md +0 -314
- package/docs/B2B_DATABASE_TEST_FINDINGS.md +0 -476
- package/docs/B2B_EMPLOYEE_SEARCH.md +0 -697
- package/docs/B2B_GENERALIZATION_RULES.md +0 -220
- package/docs/B2B_NLP_QUERY_MAPPINGS.md +0 -240
- package/docs/B2B_NORMALIZED_VS_DENORMALIZED.md +0 -952
- package/docs/B2B_SCHEMA.md +0 -1042
- package/docs/B2B_SQL_COMPREHENSIVE_TEST_FINDINGS.md +0 -301
- package/docs/B2B_TABLE_INDICES.ts +0 -496
package/docs/B2B_SCHEMA.md
DELETED
|
@@ -1,1042 +0,0 @@
|
|
|
1
|
-
# B2B Database Schema Reference
|
|
2
|
-
|
|
3
|
-
Complete schema documentation for all 48 accessible tables.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Access Summary
|
|
8
|
-
|
|
9
|
-
**User:** `jzt2be9botwq`
|
|
10
|
-
**Accessible Tables:** 48
|
|
11
|
-
**Restricted Tables:** 84 (permission denied)
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Core Tables
|
|
16
|
-
|
|
17
|
-
### linkedin_company
|
|
18
|
-
|
|
19
|
-
LinkedIn company pages. **~millions of records**
|
|
20
|
-
|
|
21
|
-
| Column | Type | Nullable | Description |
|
|
22
|
-
| ------------------------ | --------- | -------- | --------------------------------- |
|
|
23
|
-
| `id` | integer | NO | Primary key (LinkedIn company ID) |
|
|
24
|
-
| `company_name` | varchar | YES | Display name |
|
|
25
|
-
| `universal_name` | varchar | YES | URL slug (e.g., "stripe") |
|
|
26
|
-
| `domain` | varchar | YES | Website domain |
|
|
27
|
-
| `website` | varchar | YES | Full website URL |
|
|
28
|
-
| `description` | varchar | YES | Company description |
|
|
29
|
-
| `industry` | varchar | YES | Industry name (legacy) |
|
|
30
|
-
| `industry_code` | integer | YES | FK to linkedin_industry |
|
|
31
|
-
| `industry_codes` | integer[] | YES | Multiple industry IDs |
|
|
32
|
-
| `founded` | integer | YES | Year founded |
|
|
33
|
-
| `employee_count` | integer | YES | Headcount |
|
|
34
|
-
| `follower_count` | integer | YES | LinkedIn followers |
|
|
35
|
-
| `company_size_code` | varchar | YES | Size range code (A-I) |
|
|
36
|
-
| `company_size` | varchar | YES | Size range label |
|
|
37
|
-
| `company_type_code` | varchar | YES | Company type code |
|
|
38
|
-
| `company_type` | varchar | YES | Company type label |
|
|
39
|
-
| `locality` | varchar | YES | Location string |
|
|
40
|
-
| `region` | varchar | YES | State/region |
|
|
41
|
-
| `country_code` | varchar | YES | Country code |
|
|
42
|
-
| `country_iso` | text | YES | ISO country code |
|
|
43
|
-
| `country_name` | varchar | YES | Country name |
|
|
44
|
-
| `postal_code` | varchar | YES | Postal code |
|
|
45
|
-
| `street_address` | varchar | YES | Street address |
|
|
46
|
-
| `street_address2` | varchar | YES | Address line 2 |
|
|
47
|
-
| `ticker` | varchar | YES | Stock ticker |
|
|
48
|
-
| `stock_exchange_code` | varchar | YES | Exchange code |
|
|
49
|
-
| `stock_exchange_name` | varchar | YES | Exchange name |
|
|
50
|
-
| `twitter_id` | varchar | YES | Twitter handle |
|
|
51
|
-
| `square_logo_url` | text | YES | Logo URL |
|
|
52
|
-
| `hero_url` | varchar | YES | Banner image URL |
|
|
53
|
-
| `specialty_ids` | integer[] | YES | Specialty IDs |
|
|
54
|
-
| `specialties` | text[] | YES | Specialty labels |
|
|
55
|
-
| `similar_company_ids` | integer[] | YES | Similar companies |
|
|
56
|
-
| `affiliated_company_ids` | integer[] | YES | Affiliated companies |
|
|
57
|
-
| `employee_profile_ids` | integer[] | YES | Sample employee IDs |
|
|
58
|
-
| `parent_id` | integer | YES | Parent company ID |
|
|
59
|
-
| `linkedin_org_id` | integer | YES | LinkedIn org ID |
|
|
60
|
-
| `company_id` | integer | YES | FK to company table |
|
|
61
|
-
| `is_company` | boolean | YES | Is company (vs school) |
|
|
62
|
-
| `is_showcase` | boolean | YES | Is showcase page |
|
|
63
|
-
| `has_careers` | boolean | YES | Has careers page |
|
|
64
|
-
| `created_at` | timestamp | YES | Created timestamp |
|
|
65
|
-
| `updated_at` | timestamp | YES | Updated timestamp |
|
|
66
|
-
|
|
67
|
-
**Indexes:**
|
|
68
|
-
| Index | Type | Columns | Notes |
|
|
69
|
-
|-------|------|---------|-------|
|
|
70
|
-
| `linkedin_company_pkey` | UNIQUE btree | `id` | Primary key |
|
|
71
|
-
| `linkedin_company_universal_name_ix` | btree | `universal_name` | **Fast lookup** |
|
|
72
|
-
| `ix_linkedin_company_domain` | btree | `domain` | **Fast lookup** |
|
|
73
|
-
| `ix_linkedin_company_company_id` | btree | `company_id` | FK lookup |
|
|
74
|
-
| `ix_linkedin_company_ticker` | btree | `ticker` | Stock lookup |
|
|
75
|
-
| `ix_linkedin_company_tsv` | GIN | `company_name`, `universal_name` | Full-text search |
|
|
76
|
-
| `ix_linkedin_company_linkedin_org_id` | btree | `linkedin_org_id` | Partial (NOT NULL) |
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
### linkedin_profile
|
|
81
|
-
|
|
82
|
-
Individual LinkedIn profiles. **~1.15 billion records**
|
|
83
|
-
|
|
84
|
-
| Column | Type | Nullable | Description |
|
|
85
|
-
| ----------------------- | --------- | -------- | ---------------------- |
|
|
86
|
-
| `id` | integer | NO | Primary key |
|
|
87
|
-
| `first_name` | varchar | YES | First name |
|
|
88
|
-
| `last_name` | varchar | YES | Last name |
|
|
89
|
-
| `formatted_name` | varchar | YES | Full name |
|
|
90
|
-
| `headline` | varchar | YES | LinkedIn headline |
|
|
91
|
-
| `summary` | varchar | YES | Profile summary |
|
|
92
|
-
| `location_name` | varchar | YES | Location string |
|
|
93
|
-
| `location_city` | text | YES | City |
|
|
94
|
-
| `location_region` | text | YES | State/region |
|
|
95
|
-
| `location_country` | text | YES | Country |
|
|
96
|
-
| `location_country_code` | varchar | YES | Country code |
|
|
97
|
-
| `linkedin_industry_id` | integer | YES | Industry ID |
|
|
98
|
-
| `skills` | varchar[] | YES | Array of skills |
|
|
99
|
-
| `connections` | integer | YES | Connection count |
|
|
100
|
-
| `num_followers` | integer | YES | Follower count |
|
|
101
|
-
| `num_recommenders` | integer | YES | Recommendation count |
|
|
102
|
-
| `org` | text | YES | Current organization |
|
|
103
|
-
| `title` | text | YES | Current title |
|
|
104
|
-
| `jobs_count` | integer | YES | Number of positions |
|
|
105
|
-
| `linkedin_user_id` | integer | YES | LinkedIn user ID |
|
|
106
|
-
| `linkedin_company_id` | integer | YES | Current company ID |
|
|
107
|
-
| `public_profile_url` | varchar | YES | Public URL |
|
|
108
|
-
| `picture_url` | varchar | YES | Profile picture |
|
|
109
|
-
| `photo_url` | text | YES | Photo URL |
|
|
110
|
-
| `twitter_handle` | text | YES | Twitter handle |
|
|
111
|
-
| `influencer` | boolean | YES | Is LinkedIn influencer |
|
|
112
|
-
| `interests` | varchar | YES | Interests |
|
|
113
|
-
| `specialties` | varchar | YES | Specialties |
|
|
114
|
-
| `associations` | varchar | YES | Associations |
|
|
115
|
-
| `edu_school_name` | text | YES | Latest school |
|
|
116
|
-
| `edu_degree` | text | YES | Latest degree |
|
|
117
|
-
| `pos_start_date` | date | YES | Current position start |
|
|
118
|
-
| `pos_end_date` | date | YES | Current position end |
|
|
119
|
-
| `edu_start_date` | date | YES | Education start |
|
|
120
|
-
| `edu_end_date` | date | YES | Education end |
|
|
121
|
-
| `activity_at` | timestamp | YES | Last activity |
|
|
122
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
123
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
124
|
-
|
|
125
|
-
**Indexes:**
|
|
126
|
-
| Index | Type | Columns | Notes |
|
|
127
|
-
|-------|------|---------|-------|
|
|
128
|
-
| `linkedin_profile_pkey` | UNIQUE btree | `id` | Primary key |
|
|
129
|
-
| `ix_linkedin_profile_linkedin_user_id` | btree | `linkedin_user_id` | Partial (NOT NULL) |
|
|
130
|
-
| `linkedin_profile_updated_at_idx` | btree | `updated_at` | Recency queries |
|
|
131
|
-
| `ix_linkedin_profile_org_tsv` | GIN | `org` | Full-text on org |
|
|
132
|
-
| `ix_linkedin_profile_random` | btree | `immutable_random(id)` | Random sampling |
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
### linkedin_profile_position3
|
|
137
|
-
|
|
138
|
-
Work experience records. **~2.6 billion records**
|
|
139
|
-
|
|
140
|
-
| Column | Type | Nullable | Description |
|
|
141
|
-
| ----------------------- | --------- | -------- | --------------------------- |
|
|
142
|
-
| `id` | bigint | NO | Primary key |
|
|
143
|
-
| `linkedin_profile_id` | integer | NO | FK to linkedin_profile |
|
|
144
|
-
| `linkedin_company_id` | integer | YES | FK to linkedin_company |
|
|
145
|
-
| `title` | text | YES | Job title |
|
|
146
|
-
| `company_name` | text | YES | Company name (denormalized) |
|
|
147
|
-
| `locality` | text | YES | Location |
|
|
148
|
-
| `summary` | text | YES | Role description |
|
|
149
|
-
| `start_date` | date | YES | Generated from year/month |
|
|
150
|
-
| `end_date` | date | YES | NULL = current position |
|
|
151
|
-
| `start_date_year` | smallint | YES | Start year |
|
|
152
|
-
| `start_date_month` | smallint | YES | Start month |
|
|
153
|
-
| `end_date_year` | smallint | YES | End year |
|
|
154
|
-
| `end_date_month` | smallint | YES | End month |
|
|
155
|
-
| `is_current` | boolean | YES | Is current position |
|
|
156
|
-
| `sort_order` | smallint | YES | Display order |
|
|
157
|
-
| `group_sort_order` | smallint | YES | Group order |
|
|
158
|
-
| `obsolete` | boolean | NO | Is obsolete (default false) |
|
|
159
|
-
| `incomplete_experience` | boolean | YES | Incomplete data |
|
|
160
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
161
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
162
|
-
|
|
163
|
-
**Indexes:**
|
|
164
|
-
| Index | Type | Columns | Notes |
|
|
165
|
-
|-------|------|---------|-------|
|
|
166
|
-
| `linkedin_profile_position3_pkey` | UNIQUE btree | `id` | Primary key |
|
|
167
|
-
| `ix_linkedin_profile_position3_linkedin_profile_id` | btree | `linkedin_profile_id` | **Fast lookup by profile** |
|
|
168
|
-
| `ix_linkedin_profile_position3_linkedin_company_id` | btree | `linkedin_company_id` | **Fast lookup by company** |
|
|
169
|
-
| `ix_linkedin_profile_position3_key64` | UNIQUE btree | `key64(...)` | Deduplication |
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
### linkedin_job
|
|
174
|
-
|
|
175
|
-
Job postings. **~1.48 billion records**
|
|
176
|
-
|
|
177
|
-
| Column | Type | Nullable | Description |
|
|
178
|
-
| ------------------------------------ | --------- | -------- | ----------------------- |
|
|
179
|
-
| `id` | bigint | NO | Primary key |
|
|
180
|
-
| `job_id` | bigint | NO | LinkedIn job ID |
|
|
181
|
-
| `job_slug` | text | NO | URL slug |
|
|
182
|
-
| `title` | text | YES | Job title |
|
|
183
|
-
| `title_id` | integer | YES | FK to job_title |
|
|
184
|
-
| `linkedin_company_id` | integer | YES | FK to linkedin_company |
|
|
185
|
-
| `company_name` | text | YES | Company name |
|
|
186
|
-
| `company_universal_name` | text | YES | Company slug |
|
|
187
|
-
| `description` | text | YES | Job description |
|
|
188
|
-
| `location` | text | YES | Location string |
|
|
189
|
-
| `address_locality` | text | YES | City |
|
|
190
|
-
| `address_region` | text | YES | State/region |
|
|
191
|
-
| `address_country` | text | YES | Country |
|
|
192
|
-
| `postal_code` | text | YES | Postal code |
|
|
193
|
-
| `street_address` | text | YES | Street address |
|
|
194
|
-
| `latitude` | numeric | YES | Latitude |
|
|
195
|
-
| `longitude` | numeric | YES | Longitude |
|
|
196
|
-
| `salary_range` | text | YES | Formatted salary string |
|
|
197
|
-
| `salary_min` | numeric | YES | Minimum salary |
|
|
198
|
-
| `salary_max` | numeric | YES | Maximum salary |
|
|
199
|
-
| `salary_unit` | text | YES | Salary unit (yr, hr) |
|
|
200
|
-
| `salary_currency_id` | integer | YES | FK to currency |
|
|
201
|
-
| `applicants` | integer | YES | Applicant count |
|
|
202
|
-
| `applicant_range_id` | text | YES | Applicant range |
|
|
203
|
-
| `linkedin_seniority_level_id` | integer | YES | Seniority level |
|
|
204
|
-
| `linkedin_employment_type_id` | integer | YES | Employment type |
|
|
205
|
-
| `linkedin_academic_qualification_id` | smallint | YES | Education requirement |
|
|
206
|
-
| `job_functions` | integer[] | YES | Job function IDs |
|
|
207
|
-
| `industries` | integer[] | YES | Industry IDs |
|
|
208
|
-
| `benefit_ids` | integer[] | YES | Benefit IDs |
|
|
209
|
-
| `required_months_of_experience` | integer | YES | Experience required |
|
|
210
|
-
| `academic_qualification` | text | YES | Degree requirement |
|
|
211
|
-
| `recruiter_profile_id` | integer | YES | Recruiter profile |
|
|
212
|
-
| `apply_external_url` | text | YES | External apply URL |
|
|
213
|
-
| `external_job_id` | text | YES | External job ID |
|
|
214
|
-
| `posted_date` | date | YES | Post date |
|
|
215
|
-
| `posted_time` | time | YES | Post time |
|
|
216
|
-
| `posted_timestamp` | timestamp | YES | Generated timestamp |
|
|
217
|
-
| `valid_until` | timestamp | YES | Expiration date |
|
|
218
|
-
| `closed_since` | timestamp | YES | Closed date |
|
|
219
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
220
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
221
|
-
|
|
222
|
-
**Indexes:**
|
|
223
|
-
| Index | Type | Columns | Notes |
|
|
224
|
-
|-------|------|---------|-------|
|
|
225
|
-
| `linkedin_job_pkey` | UNIQUE btree | `id` | Primary key |
|
|
226
|
-
| `ix_linkedin_job_job_id_uniq` | UNIQUE btree | `job_id` | LinkedIn job ID |
|
|
227
|
-
| `ix_linkedin_job_company_id_ix` | btree | `linkedin_company_id` | **Fast lookup by company** |
|
|
228
|
-
| `ix_linkedin_job_title_id_ix` | btree | `title_id` | Title lookup |
|
|
229
|
-
| `ix_linkedin_job_updated_at` | btree | `updated_at` | Recency queries |
|
|
230
|
-
| `ix_linkedin_job_recruiter_profile_id_ix` | btree | `recruiter_profile_id` | Recruiter lookup |
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### linkedin_profile_education2
|
|
235
|
-
|
|
236
|
-
Education records. **~965 million records**
|
|
237
|
-
|
|
238
|
-
| Column | Type | Nullable | Description |
|
|
239
|
-
| ---------------------------- | --------- | -------- | ---------------------- |
|
|
240
|
-
| `id` | bigint | NO | Primary key |
|
|
241
|
-
| `linkedin_profile_id` | integer | NO | FK to linkedin_profile |
|
|
242
|
-
| `linkedin_school_id` | integer | YES | FK to linkedin_school |
|
|
243
|
-
| `linkedin_field_of_study_id` | integer | YES | FK to field of study |
|
|
244
|
-
| `school_name` | text | YES | School name |
|
|
245
|
-
| `degree` | text | YES | Degree name |
|
|
246
|
-
| `field_of_study` | text | YES | Field of study |
|
|
247
|
-
| `grade` | text | YES | GPA/grade |
|
|
248
|
-
| `activities` | text | YES | Activities |
|
|
249
|
-
| `notes` | text | YES | Notes |
|
|
250
|
-
| `start_date` | date | YES | Start date |
|
|
251
|
-
| `end_date` | date | YES | End date |
|
|
252
|
-
| `start_date_year` | smallint | YES | Start year |
|
|
253
|
-
| `start_date_month` | smallint | YES | Start month |
|
|
254
|
-
| `end_date_year` | smallint | YES | End year |
|
|
255
|
-
| `end_date_month` | smallint | YES | End month |
|
|
256
|
-
| `sort_order` | smallint | YES | Display order |
|
|
257
|
-
| `incomplete_education` | boolean | YES | Incomplete data |
|
|
258
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
259
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
260
|
-
|
|
261
|
-
**Indexes:**
|
|
262
|
-
| Index | Type | Columns | Notes |
|
|
263
|
-
|-------|------|---------|-------|
|
|
264
|
-
| `linkedin_profile_education2_pkey` | UNIQUE btree | `id` | Primary key |
|
|
265
|
-
| `ix_linkedin_profile_education2_linkedin_profile_id` | btree | `linkedin_profile_id` | **Fast lookup by profile** |
|
|
266
|
-
| `ix_linkedin_profile_education2_linkedin_school_id` | btree | `linkedin_school_id` | Partial (NOT NULL) |
|
|
267
|
-
| `linkedin_profile_education2_md5_bigint_key` | UNIQUE btree | `md5_bigint` | Deduplication |
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
### linkedin_crunchbase_funding
|
|
272
|
-
|
|
273
|
-
Funding round data.
|
|
274
|
-
|
|
275
|
-
| Column | Type | Nullable | Description |
|
|
276
|
-
| ------------------------------ | --------- | -------- | --------------------------------- |
|
|
277
|
-
| `id` | integer | NO | Primary key |
|
|
278
|
-
| `linkedin_company_id` | integer | NO | FK to linkedin_company |
|
|
279
|
-
| `round_name` | text | YES | Round type (Seed, Series A, etc.) |
|
|
280
|
-
| `round_date` | date | YES | Funding date |
|
|
281
|
-
| `round_amount` | text | YES | Formatted amount |
|
|
282
|
-
| `parsed_round_amount_number` | bigint | YES | Amount in cents |
|
|
283
|
-
| `parsed_round_amount_currency` | text | YES | Currency code |
|
|
284
|
-
| `funding_round_count` | smallint | YES | Total rounds |
|
|
285
|
-
| `investor_names` | text[] | YES | Investor names |
|
|
286
|
-
| `investor_count` | smallint | YES | Number of investors |
|
|
287
|
-
| `crunchbase_company_name` | text | YES | Crunchbase company name |
|
|
288
|
-
| `crunchbase_company_slug` | text | YES | Crunchbase slug |
|
|
289
|
-
| `crunchbase_funding_slug` | text | YES | Funding round slug |
|
|
290
|
-
| `crunchbase_investor_slugs` | text[] | YES | Investor slugs |
|
|
291
|
-
| `people_investors_slugs` | text[] | YES | Individual investor slugs |
|
|
292
|
-
| `organization_investors_slugs` | text[] | YES | Org investor slugs |
|
|
293
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
294
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
295
|
-
|
|
296
|
-
**Indexes:**
|
|
297
|
-
| Index | Type | Columns | Notes |
|
|
298
|
-
|-------|------|---------|-------|
|
|
299
|
-
| `linkedin_crunchbase_funding_pkey` | UNIQUE btree | `id` | Primary key |
|
|
300
|
-
| `ix_linkedin_crunchbase_funding_linkedin_company_id` | btree | `linkedin_company_id` | **Fast lookup by company** |
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
### linkedin_company_slug
|
|
305
|
-
|
|
306
|
-
Company URL slugs for lookup.
|
|
307
|
-
|
|
308
|
-
| Column | Type | Nullable | Description |
|
|
309
|
-
| --------------------- | --------- | -------- | ---------------------- |
|
|
310
|
-
| `id` | bigint | NO | Primary key |
|
|
311
|
-
| `slug` | text | NO | URL slug |
|
|
312
|
-
| `slug_key64` | bigint | YES | Hash for fast lookup |
|
|
313
|
-
| `linkedin_company_id` | integer | YES | FK to linkedin_company |
|
|
314
|
-
| `linkedin_org_id` | integer | YES | FK to linkedin_org |
|
|
315
|
-
| `status` | char(1) | NO | Status (default 'N') |
|
|
316
|
-
| `type` | char(1) | YES | Type (default 'C') |
|
|
317
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
318
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
319
|
-
|
|
320
|
-
**Indexes:**
|
|
321
|
-
| Index | Type | Columns | Notes |
|
|
322
|
-
|-------|------|---------|-------|
|
|
323
|
-
| `linkedin_company_slug_pk` | UNIQUE btree | `id` | Primary key |
|
|
324
|
-
| `linkedin_company_slug_slug_key64_uniq` | UNIQUE btree | `slug_key64` | **Fast lookup via key64()** |
|
|
325
|
-
| `linkedin_company_slug_linkedin_company_id_ix` | btree | `linkedin_company_id` | Company lookup |
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
### linkedin_profile_slug
|
|
330
|
-
|
|
331
|
-
Profile URL slugs for lookup. **~1.14 billion records**
|
|
332
|
-
|
|
333
|
-
| Column | Type | Nullable | Description |
|
|
334
|
-
| --------------------- | --------- | -------- | ---------------------- |
|
|
335
|
-
| `id` | bigint | NO | Primary key |
|
|
336
|
-
| `slug` | text | NO | URL slug |
|
|
337
|
-
| `slug_key64` | bigint | YES | Hash for fast lookup |
|
|
338
|
-
| `linkedin_profile_id` | integer | YES | FK to linkedin_profile |
|
|
339
|
-
| `linkedin_user_id` | integer | YES | LinkedIn user ID |
|
|
340
|
-
| `status` | char(1) | NO | Status (default 'N') |
|
|
341
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
342
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
343
|
-
|
|
344
|
-
**Indexes:**
|
|
345
|
-
| Index | Type | Columns | Notes |
|
|
346
|
-
|-------|------|---------|-------|
|
|
347
|
-
| `linkedin_profile_slug_pk` | UNIQUE btree | `id` | Primary key |
|
|
348
|
-
| `linkedin_profile_slug_slug_key64_idx` | btree | `slug_key64` | **Fast lookup via key64()** |
|
|
349
|
-
| `linkedin_profile_slug_linkedin_profile_id_ix` | btree | `linkedin_profile_id` | Profile lookup |
|
|
350
|
-
| `linkedin_profile_slug_linkedin_user_id_ix` | btree | `linkedin_user_id` | User ID lookup |
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
### linkedin_industry
|
|
355
|
-
|
|
356
|
-
Industry classifications.
|
|
357
|
-
|
|
358
|
-
| Column | Type | Nullable | Description |
|
|
359
|
-
| --------------- | --------- | -------- | ------------------- |
|
|
360
|
-
| `id` | integer | NO | Primary key |
|
|
361
|
-
| `name` | varchar | NO | Industry name |
|
|
362
|
-
| `group` | varchar | NO | Industry group |
|
|
363
|
-
| `description` | text | YES | Description |
|
|
364
|
-
| `alt_names` | text[] | NO | Alternative names |
|
|
365
|
-
| `company_count` | integer | NO | Number of companies |
|
|
366
|
-
| `hierarchy` | integer[] | YES | Parent industry IDs |
|
|
367
|
-
| `created_at` | timestamp | YES | Created timestamp |
|
|
368
|
-
| `updated_at` | timestamp | YES | Updated timestamp |
|
|
369
|
-
|
|
370
|
-
**Indexes:**
|
|
371
|
-
| Index | Type | Columns | Notes |
|
|
372
|
-
|-------|------|---------|-------|
|
|
373
|
-
| `linkedin_industry_pkey` | UNIQUE btree | `id` | Primary key |
|
|
374
|
-
| `linkedin_industry_alt_names_uniq` | GiST | `alt_names` | Name matching |
|
|
375
|
-
|
|
376
|
-
---
|
|
377
|
-
|
|
378
|
-
### person
|
|
379
|
-
|
|
380
|
-
Person records linking profiles. **~1.32 billion records**
|
|
381
|
-
|
|
382
|
-
| Column | Type | Nullable | Description |
|
|
383
|
-
| --------------------- | --------- | -------- | ---------------------- |
|
|
384
|
-
| `id` | integer | NO | Primary key |
|
|
385
|
-
| `first_name` | varchar | YES | First name |
|
|
386
|
-
| `last_name` | varchar | YES | Last name |
|
|
387
|
-
| `formatted_name` | varchar | YES | Full name |
|
|
388
|
-
| `linkedin_profile_id` | integer | YES | FK to linkedin_profile |
|
|
389
|
-
| `gplus_profile_id` | varchar | YES | Google+ profile ID |
|
|
390
|
-
| `indeed_profile_id` | integer | YES | Indeed profile ID |
|
|
391
|
-
| `successor` | integer | YES | Successor person ID |
|
|
392
|
-
| `predecessors` | integer[] | YES | Predecessor IDs |
|
|
393
|
-
| `privacy_redact` | boolean | YES | Privacy redacted |
|
|
394
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
395
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
396
|
-
|
|
397
|
-
**Indexes:**
|
|
398
|
-
| Index | Type | Columns | Notes |
|
|
399
|
-
|-------|------|---------|-------|
|
|
400
|
-
| `person_pkey` | UNIQUE btree | `id` | Primary key |
|
|
401
|
-
| `ix_person_linkedin_profile_id` | btree | `linkedin_profile_id` | **Fast lookup by profile** |
|
|
402
|
-
| `ix_person_first_last_name_tsv` | GIN | `first_name`, `last_name`, `formatted_name` | Full-text name search |
|
|
403
|
-
|
|
404
|
-
---
|
|
405
|
-
|
|
406
|
-
### company
|
|
407
|
-
|
|
408
|
-
Master company records (separate from LinkedIn). Links to linkedin_company via `linkedin_id`.
|
|
409
|
-
|
|
410
|
-
| Column | Type | Nullable | Description |
|
|
411
|
-
| ----------------------- | ------- | -------- | ---------------------- |
|
|
412
|
-
| `id` | integer | NO | Primary key |
|
|
413
|
-
| `name` | varchar | YES | Company name |
|
|
414
|
-
| `slug` | varchar | YES | URL slug |
|
|
415
|
-
| `linkedin_id` | integer | YES | FK to linkedin_company |
|
|
416
|
-
| `employee_count` | integer | YES | Headcount |
|
|
417
|
-
| `employee_growth_01mo` | real | YES | 1-month growth |
|
|
418
|
-
| `employee_growth_03mo` | real | YES | 3-month growth |
|
|
419
|
-
| `employee_growth_06mo` | real | YES | 6-month growth |
|
|
420
|
-
| `employee_growth_12mo` | real | YES | 12-month growth |
|
|
421
|
-
| `employee_growth_24mo` | real | YES | 24-month growth |
|
|
422
|
-
| `naics_codes` | int[] | YES | NAICS industry codes |
|
|
423
|
-
| `sic_codes` | int[] | YES | SIC industry codes |
|
|
424
|
-
| `address` | varchar | YES | Address |
|
|
425
|
-
| `locality` | varchar | YES | City |
|
|
426
|
-
| `region` | varchar | YES | State/region |
|
|
427
|
-
| `country_name` | varchar | YES | Country |
|
|
428
|
-
| `postal_code` | varchar | YES | Postal code |
|
|
429
|
-
| `contact_count` | integer | YES | Number of contacts |
|
|
430
|
-
| `property_count` | integer | YES | Number of properties |
|
|
431
|
-
| `location_count` | integer | YES | Number of locations |
|
|
432
|
-
| `rank_fortune` | integer | YES | Fortune ranking |
|
|
433
|
-
| `rank_incmagazine` | integer | YES | Inc. Magazine ranking |
|
|
434
|
-
| `rank_internetretailer` | integer | YES | Internet Retailer rank |
|
|
435
|
-
| `parent_id` | integer | YES | Parent company ID |
|
|
436
|
-
| `successor_id` | integer | YES | Successor company ID |
|
|
437
|
-
| `is_deleted` | boolean | YES | Is deleted |
|
|
438
|
-
|
|
439
|
-
**Indexes:**
|
|
440
|
-
| Index | Type | Columns | Notes |
|
|
441
|
-
|-------|------|---------|-------|
|
|
442
|
-
| `company_pkey` | UNIQUE btree | `id` | Primary key |
|
|
443
|
-
| `company_slug_key` | UNIQUE btree | `slug` | Slug lookup |
|
|
444
|
-
| `ix_company_linkedin_id` | UNIQUE btree | `linkedin_id` | LinkedIn lookup |
|
|
445
|
-
| `ix_company_employee_count` | btree | `employee_count` | Size queries |
|
|
446
|
-
|
|
447
|
-
---
|
|
448
|
-
|
|
449
|
-
### company_type
|
|
450
|
-
|
|
451
|
-
Company type classifications.
|
|
452
|
-
|
|
453
|
-
| Column | Type | Nullable | Description |
|
|
454
|
-
| ------------ | ------- | -------- | ------------------ |
|
|
455
|
-
| `id` | text | NO | Primary key (code) |
|
|
456
|
-
| `label` | text | NO | Display label |
|
|
457
|
-
| `numeric_id` | integer | NO | Numeric identifier |
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
### linkedin_article
|
|
462
|
-
|
|
463
|
-
LinkedIn articles/posts.
|
|
464
|
-
|
|
465
|
-
| Column | Type | Nullable | Description |
|
|
466
|
-
| --------------------- | --------- | -------- | ---------------------- |
|
|
467
|
-
| `id` | integer | NO | Primary key |
|
|
468
|
-
| `linkedin_profile_id` | integer | YES | FK to linkedin_profile |
|
|
469
|
-
| `permalink` | text | NO | Article URL |
|
|
470
|
-
| `title` | text | YES | Article title |
|
|
471
|
-
| `description` | text | YES | Description |
|
|
472
|
-
| `content` | text | NO | Full content |
|
|
473
|
-
| `date_published` | date | YES | Publish date |
|
|
474
|
-
| `num_likes` | integer | YES | Like count |
|
|
475
|
-
| `num_comments` | integer | YES | Comment count |
|
|
476
|
-
| `num_shares` | integer | YES | Share count |
|
|
477
|
-
| `hashtags` | text[] | YES | Hashtags |
|
|
478
|
-
| `image_url` | text | YES | Image URL |
|
|
479
|
-
| `url` | text | YES | Article URL |
|
|
480
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
481
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
482
|
-
|
|
483
|
-
**Index:** `linkedin_article_linkedin_profile_id_ix` on `linkedin_profile_id`
|
|
484
|
-
|
|
485
|
-
---
|
|
486
|
-
|
|
487
|
-
### linkedin_patent
|
|
488
|
-
|
|
489
|
-
Patent records.
|
|
490
|
-
|
|
491
|
-
| Column | Type | Nullable | Description |
|
|
492
|
-
| ------------- | --------- | -------- | ----------------- |
|
|
493
|
-
| `id` | integer | NO | Primary key |
|
|
494
|
-
| `title` | text | NO | Patent title |
|
|
495
|
-
| `country` | text | YES | Country |
|
|
496
|
-
| `number` | text | YES | Patent number |
|
|
497
|
-
| `description` | text | YES | Description |
|
|
498
|
-
| `url` | text | YES | Patent URL |
|
|
499
|
-
| `date` | date | YES | Patent date |
|
|
500
|
-
| `date_year` | smallint | YES | Year |
|
|
501
|
-
| `date_month` | smallint | YES | Month |
|
|
502
|
-
| `date_day` | smallint | YES | Day |
|
|
503
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
504
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
505
|
-
|
|
506
|
-
---
|
|
507
|
-
|
|
508
|
-
### linkedin_project
|
|
509
|
-
|
|
510
|
-
Project records.
|
|
511
|
-
|
|
512
|
-
| Column | Type | Nullable | Description |
|
|
513
|
-
| ------------ | --------- | -------- | ----------------- |
|
|
514
|
-
| `id` | integer | NO | Primary key |
|
|
515
|
-
| `title` | text | NO | Project title |
|
|
516
|
-
| `summary` | text | YES | Description |
|
|
517
|
-
| `url` | text | YES | Project URL |
|
|
518
|
-
| `duplicates` | smallint | NO | Duplicate count |
|
|
519
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
520
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
521
|
-
|
|
522
|
-
**Index:** `ix_linkedin_project_title` on `title`
|
|
523
|
-
|
|
524
|
-
---
|
|
525
|
-
|
|
526
|
-
### linkedin_publication2
|
|
527
|
-
|
|
528
|
-
Publication records.
|
|
529
|
-
|
|
530
|
-
| Column | Type | Nullable | Description |
|
|
531
|
-
| ------------ | --------- | -------- | ----------------- |
|
|
532
|
-
| `id` | integer | NO | Primary key |
|
|
533
|
-
| `title` | text | NO | Publication title |
|
|
534
|
-
| `publisher` | text | YES | Publisher |
|
|
535
|
-
| `date` | date | YES | Publish date |
|
|
536
|
-
| `summary` | text | YES | Summary |
|
|
537
|
-
| `url` | text | YES | Publication URL |
|
|
538
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
539
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
540
|
-
|
|
541
|
-
---
|
|
542
|
-
|
|
543
|
-
### linkedin_proserve_service
|
|
544
|
-
|
|
545
|
-
Professional services offered.
|
|
546
|
-
|
|
547
|
-
| Column | Type | Nullable | Description |
|
|
548
|
-
| ------------ | --------- | -------- | ----------------- |
|
|
549
|
-
| `id` | integer | NO | Primary key |
|
|
550
|
-
| `service` | text | NO | Service name |
|
|
551
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
552
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
553
|
-
|
|
554
|
-
---
|
|
555
|
-
|
|
556
|
-
### linkedin_industry_naics_code_mapping
|
|
557
|
-
|
|
558
|
-
Maps LinkedIn industries to NAICS codes.
|
|
559
|
-
|
|
560
|
-
| Column | Type | Nullable | Description |
|
|
561
|
-
| ---------- | --------- | -------- | ----------------------- |
|
|
562
|
-
| `id` | integer | NO | Primary key |
|
|
563
|
-
| `industry` | integer | YES | FK to linkedin_industry |
|
|
564
|
-
| `naics` | text | YES | NAICS code |
|
|
565
|
-
| `date` | timestamp | NO | Mapping date |
|
|
566
|
-
|
|
567
|
-
---
|
|
568
|
-
|
|
569
|
-
## Reference Tables
|
|
570
|
-
|
|
571
|
-
### linkedin_school
|
|
572
|
-
|
|
573
|
-
| Column | Type | Description |
|
|
574
|
-
| ---------- | ------- | ----------- |
|
|
575
|
-
| `id` | integer | Primary key |
|
|
576
|
-
| `name` | varchar | School name |
|
|
577
|
-
| `logo_url` | varchar | Logo URL |
|
|
578
|
-
|
|
579
|
-
### linkedin_language
|
|
580
|
-
|
|
581
|
-
| Column | Type | Description |
|
|
582
|
-
| ------ | ------- | ------------- |
|
|
583
|
-
| `id` | integer | Primary key |
|
|
584
|
-
| `name` | text | Language name |
|
|
585
|
-
|
|
586
|
-
### language_proficiency
|
|
587
|
-
|
|
588
|
-
Language proficiency levels.
|
|
589
|
-
|
|
590
|
-
| Column | Type | Description |
|
|
591
|
-
| ------ | -------- | ----------------- |
|
|
592
|
-
| `id` | smallint | Primary key |
|
|
593
|
-
| `name` | text | Proficiency level |
|
|
594
|
-
|
|
595
|
-
### linkedin_specialty
|
|
596
|
-
|
|
597
|
-
| Column | Type | Description |
|
|
598
|
-
| ------- | ------- | --------------- |
|
|
599
|
-
| `id` | integer | Primary key |
|
|
600
|
-
| `label` | text | Specialty label |
|
|
601
|
-
|
|
602
|
-
### linkedin_work_modality
|
|
603
|
-
|
|
604
|
-
| Column | Type | Description |
|
|
605
|
-
| ---------- | -------- | -------------------------------------- |
|
|
606
|
-
| `id` | smallint | Primary key |
|
|
607
|
-
| `modality` | text | Work modality (remote, hybrid, onsite) |
|
|
608
|
-
|
|
609
|
-
### country
|
|
610
|
-
|
|
611
|
-
| Column | Type | Description |
|
|
612
|
-
| --------------- | ------- | ---------------------- |
|
|
613
|
-
| `iso` | text | ISO 2-letter code (PK) |
|
|
614
|
-
| `iso3` | text | ISO 3-letter code |
|
|
615
|
-
| `country` | text | Country name |
|
|
616
|
-
| `capital` | text | Capital city |
|
|
617
|
-
| `population` | integer | Population |
|
|
618
|
-
| `continent` | text | Continent |
|
|
619
|
-
| `currency_code` | text | Currency code |
|
|
620
|
-
|
|
621
|
-
### locality
|
|
622
|
-
|
|
623
|
-
| Column | Type | Description |
|
|
624
|
-
| ---------------- | ------- | --------------- |
|
|
625
|
-
| `id` | integer | Primary key |
|
|
626
|
-
| `locationstr` | text | Location string |
|
|
627
|
-
| `latitude` | double | Latitude |
|
|
628
|
-
| `longitude` | double | Longitude |
|
|
629
|
-
| `country_iso` | text | Country code |
|
|
630
|
-
| `locality` | text | City name |
|
|
631
|
-
| `admin_district` | text | State/province |
|
|
632
|
-
|
|
633
|
-
### naics_code
|
|
634
|
-
|
|
635
|
-
| Column | Type | Description |
|
|
636
|
-
| ------- | ---- | --------------- |
|
|
637
|
-
| `code` | text | NAICS code (PK) |
|
|
638
|
-
| `title` | text | Industry title |
|
|
639
|
-
|
|
640
|
-
---
|
|
641
|
-
|
|
642
|
-
## Job Taxonomy Tables
|
|
643
|
-
|
|
644
|
-
### job_title
|
|
645
|
-
|
|
646
|
-
| Column | Type | Description |
|
|
647
|
-
| ------------------- | ------- | ------------------- |
|
|
648
|
-
| `id` | integer | Primary key |
|
|
649
|
-
| `title` | text | Job title |
|
|
650
|
-
| `title_key64` | bigint | Hash for dedup |
|
|
651
|
-
| `linkedin_title_id` | integer | LinkedIn title ID |
|
|
652
|
-
| `norm_title_id` | integer | Normalized title ID |
|
|
653
|
-
|
|
654
|
-
### job_function
|
|
655
|
-
|
|
656
|
-
| Column | Type | Description |
|
|
657
|
-
| -------------------------- | ------- | -------------- |
|
|
658
|
-
| `id` | integer | Primary key |
|
|
659
|
-
| `label` | text | Function label |
|
|
660
|
-
| `linkedin_job_function_id` | integer | LinkedIn ID |
|
|
661
|
-
| `linkedin_job_count` | bigint | Job count |
|
|
662
|
-
|
|
663
|
-
### job_seniority
|
|
664
|
-
|
|
665
|
-
| Column | Type | Description |
|
|
666
|
-
| ----------------------- | ------- | --------------- |
|
|
667
|
-
| `id` | integer | Primary key |
|
|
668
|
-
| `label` | text | Seniority label |
|
|
669
|
-
| `linkedin_seniority_id` | integer | LinkedIn ID |
|
|
670
|
-
|
|
671
|
-
### job_employment_type
|
|
672
|
-
|
|
673
|
-
| Column | Type | Description |
|
|
674
|
-
| ----------------------------- | ------- | --------------- |
|
|
675
|
-
| `id` | integer | Primary key |
|
|
676
|
-
| `label` | text | Employment type |
|
|
677
|
-
| `linkedin_employment_type_id` | integer | LinkedIn ID |
|
|
678
|
-
|
|
679
|
-
### job_academic_qualification
|
|
680
|
-
|
|
681
|
-
| Column | Type | Description |
|
|
682
|
-
| ------------------------------------ | -------- | ------------------- |
|
|
683
|
-
| `id` | smallint | Primary key |
|
|
684
|
-
| `label` | text | Qualification label |
|
|
685
|
-
| `linkedin_academic_qualification_id` | smallint | LinkedIn ID |
|
|
686
|
-
|
|
687
|
-
---
|
|
688
|
-
|
|
689
|
-
## Profile Detail Tables
|
|
690
|
-
|
|
691
|
-
### linkedin_profile_certification
|
|
692
|
-
|
|
693
|
-
| Column | Type | Description |
|
|
694
|
-
| ---------------------------------------- | -------- | -------------------- |
|
|
695
|
-
| `id` | bigint | Primary key |
|
|
696
|
-
| `linkedin_profile_id` | integer | FK to profile |
|
|
697
|
-
| `title` | text | Certification name |
|
|
698
|
-
| `company_name` | text | Issuing organization |
|
|
699
|
-
| `linkedin_company_id` | integer | FK to company |
|
|
700
|
-
| `credential_id` | text | Credential ID |
|
|
701
|
-
| `verify_url` | text | Verification URL |
|
|
702
|
-
| `date_year` / `date_month` | smallint | Issue date |
|
|
703
|
-
| `expire_date_year` / `expire_date_month` | smallint | Expiration date |
|
|
704
|
-
|
|
705
|
-
**Index:** `ix_linkedin_profile_certification_linkedin_profile_id` on `linkedin_profile_id`
|
|
706
|
-
|
|
707
|
-
### linkedin_profile_award
|
|
708
|
-
|
|
709
|
-
| Column | Type | Description |
|
|
710
|
-
| --------------------------------------- | -------- | -------------------- |
|
|
711
|
-
| `id` | bigint | Primary key |
|
|
712
|
-
| `linkedin_profile_id` | integer | FK to profile |
|
|
713
|
-
| `title` | text | Award name |
|
|
714
|
-
| `summary` | text | Description |
|
|
715
|
-
| `company_name` | text | Issuing organization |
|
|
716
|
-
| `date_year` / `date_month` / `date_day` | smallint | Award date |
|
|
717
|
-
|
|
718
|
-
**Index:** `ix_linkedin_profile_award_linkedin_profile_id` on `linkedin_profile_id`
|
|
719
|
-
|
|
720
|
-
### linkedin_profile_project
|
|
721
|
-
|
|
722
|
-
| Column | Type | Description |
|
|
723
|
-
| -------------------------------------- | -------- | ---------------- |
|
|
724
|
-
| `id` | integer | Primary key |
|
|
725
|
-
| `linkedin_profile_id` | integer | FK to profile |
|
|
726
|
-
| `linkedin_project_id` | integer | FK to project |
|
|
727
|
-
| `association` | text | Association type |
|
|
728
|
-
| `start_date_year` / `start_date_month` | smallint | Start date |
|
|
729
|
-
| `end_date_year` / `end_date_month` | smallint | End date |
|
|
730
|
-
| `is_current` | boolean | Is ongoing |
|
|
731
|
-
|
|
732
|
-
**Indexes:** On `linkedin_profile_id` and `linkedin_project_id`
|
|
733
|
-
|
|
734
|
-
### linkedin_profile_volunteer_experience
|
|
735
|
-
|
|
736
|
-
| Column | Type | Description |
|
|
737
|
-
| --------------------- | ------- | -------------- |
|
|
738
|
-
| `id` | bigint | Primary key |
|
|
739
|
-
| `linkedin_profile_id` | integer | FK to profile |
|
|
740
|
-
| `role` | text | Volunteer role |
|
|
741
|
-
| `company_name` | text | Organization |
|
|
742
|
-
| `linkedin_company_id` | integer | FK to company |
|
|
743
|
-
| `cause` | text | Cause/category |
|
|
744
|
-
| `summary` | text | Description |
|
|
745
|
-
| `is_current` | boolean | Is ongoing |
|
|
746
|
-
|
|
747
|
-
**Index:** `ix_linkedin_profile_volunteer_experience_linkedin_profile_id` on `linkedin_profile_id`
|
|
748
|
-
|
|
749
|
-
### linkedin_profile_recommendation2
|
|
750
|
-
|
|
751
|
-
| Column | Type | Description |
|
|
752
|
-
| --------------------------------- | ------- | ------------------------- |
|
|
753
|
-
| `id` | integer | Primary key |
|
|
754
|
-
| `linkedin_profile_id` | integer | FK to profile (recipient) |
|
|
755
|
-
| `recommender_linkedin_profile_id` | integer | FK to profile (author) |
|
|
756
|
-
| `recommendation` | text | Recommendation text |
|
|
757
|
-
|
|
758
|
-
**Indexes:** On both `linkedin_profile_id` and `recommender_linkedin_profile_id`
|
|
759
|
-
|
|
760
|
-
### linkedin_profile_test_scores
|
|
761
|
-
|
|
762
|
-
| Column | Type | Description |
|
|
763
|
-
| --------------------- | --------- | ------------- |
|
|
764
|
-
| `id` | integer | Primary key |
|
|
765
|
-
| `linkedin_profile_id` | integer | FK to profile |
|
|
766
|
-
| `test_name` | text | Test name |
|
|
767
|
-
| `test_score` | text | Score |
|
|
768
|
-
| `test_date` | timestamp | Test date |
|
|
769
|
-
| `test_description` | text | Description |
|
|
770
|
-
|
|
771
|
-
### linkedin_profile_language_proficiency
|
|
772
|
-
|
|
773
|
-
| Column | Type | Description |
|
|
774
|
-
| ---------------------- | -------- | ----------------- |
|
|
775
|
-
| `id` | bigint | Primary key |
|
|
776
|
-
| `linkedin_profile_id` | bigint | FK to profile |
|
|
777
|
-
| `linkedin_language_id` | integer | FK to language |
|
|
778
|
-
| `proficiency_id` | smallint | Proficiency level |
|
|
779
|
-
|
|
780
|
-
### linkedin_profile_course
|
|
781
|
-
|
|
782
|
-
Courses taken by a profile.
|
|
783
|
-
|
|
784
|
-
| Column | Type | Nullable | Description |
|
|
785
|
-
| --------------------- | --------- | -------- | ---------------------- |
|
|
786
|
-
| `id` | bigint | NO | Primary key |
|
|
787
|
-
| `linkedin_profile_id` | integer | NO | FK to linkedin_profile |
|
|
788
|
-
| `title` | text | YES | Course title |
|
|
789
|
-
| `course_number` | text | YES | Course number |
|
|
790
|
-
| `association` | text | YES | Association |
|
|
791
|
-
| `sort_order` | smallint | YES | Display order |
|
|
792
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
793
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
794
|
-
|
|
795
|
-
**Index:** `ix_linkedin_profile_course_linkedin_profile_id` on `linkedin_profile_id`
|
|
796
|
-
|
|
797
|
-
### linkedin_profile_patent
|
|
798
|
-
|
|
799
|
-
Profile-to-patent associations.
|
|
800
|
-
|
|
801
|
-
| Column | Type | Nullable | Description |
|
|
802
|
-
| ---------------------------- | --------- | -------- | ---------------------- |
|
|
803
|
-
| `id` | integer | NO | Primary key |
|
|
804
|
-
| `linkedin_patent_id` | integer | NO | FK to linkedin_patent |
|
|
805
|
-
| `linkedin_profile_id` | integer | YES | FK to linkedin_profile |
|
|
806
|
-
| `linkedin_profile_full_name` | text | YES | Profile name |
|
|
807
|
-
| `linkedin_profile_url` | text | YES | Profile URL |
|
|
808
|
-
| `sort_order` | smallint | YES | Display order |
|
|
809
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
810
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
811
|
-
|
|
812
|
-
**Index:** `ix_linkedin_profile_patent_linkedin_profile_id` on `linkedin_profile_id`
|
|
813
|
-
|
|
814
|
-
### linkedin_profile_publication2
|
|
815
|
-
|
|
816
|
-
Profile-to-publication associations.
|
|
817
|
-
|
|
818
|
-
| Column | Type | Nullable | Description |
|
|
819
|
-
| ---------------------------- | --------- | -------- | --------------------------- |
|
|
820
|
-
| `id` | integer | NO | Primary key |
|
|
821
|
-
| `linkedin_publication_id` | integer | NO | FK to linkedin_publication2 |
|
|
822
|
-
| `linkedin_profile_id` | integer | YES | FK to linkedin_profile |
|
|
823
|
-
| `linkedin_profile_full_name` | text | YES | Profile name |
|
|
824
|
-
| `linkedin_profile_url` | text | YES | Profile URL |
|
|
825
|
-
| `sort_order` | smallint | YES | Display order |
|
|
826
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
827
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
828
|
-
|
|
829
|
-
**Index:** `ix_linkedin_profile_publication2_linkedin_profile_id` on `linkedin_profile_id`
|
|
830
|
-
|
|
831
|
-
### linkedin_profile_url_resource
|
|
832
|
-
|
|
833
|
-
External URLs/links on profiles.
|
|
834
|
-
|
|
835
|
-
| Column | Type | Nullable | Description |
|
|
836
|
-
| --------------------- | --------- | -------- | ----------------------- |
|
|
837
|
-
| `id` | integer | NO | Primary key |
|
|
838
|
-
| `linkedin_profile_id` | integer | NO | FK to linkedin_profile |
|
|
839
|
-
| `name_id` | integer | YES | FK to url_resource_name |
|
|
840
|
-
| `domain_id` | integer | YES | FK to domain |
|
|
841
|
-
| `url` | varchar | NO | URL |
|
|
842
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
843
|
-
| `updated_at` | timestamp | NO | Updated timestamp |
|
|
844
|
-
|
|
845
|
-
### linkedin_profile_url_resource_name
|
|
846
|
-
|
|
847
|
-
URL resource type names.
|
|
848
|
-
|
|
849
|
-
| Column | Type | Nullable | Description |
|
|
850
|
-
| -------------- | --------- | -------- | ------------------ |
|
|
851
|
-
| `id` | integer | NO | Primary key |
|
|
852
|
-
| `name` | varchar | NO | Resource name |
|
|
853
|
-
| `norm_name_id` | integer | YES | Normalized name ID |
|
|
854
|
-
| `created_at` | timestamp | NO | Created timestamp |
|
|
855
|
-
|
|
856
|
-
### linkedin_profile_priority_queue
|
|
857
|
-
|
|
858
|
-
Profile refresh priority queue (internal).
|
|
859
|
-
|
|
860
|
-
| Column | Type | Nullable | Description |
|
|
861
|
-
| ---------------------- | --------- | -------- | ------------------ |
|
|
862
|
-
| `id` | integer | NO | Primary key |
|
|
863
|
-
| `interval` | interval | NO | Refresh interval |
|
|
864
|
-
| `trailing_error_count` | smallint | NO | Error count |
|
|
865
|
-
| `bump_count` | smallint | NO | Bump count |
|
|
866
|
-
| `change_count` | smallint | NO | Change count |
|
|
867
|
-
| `linkedin_subdomain` | text | NO | LinkedIn subdomain |
|
|
868
|
-
| `score` | real | YES | Priority score |
|
|
869
|
-
| `touched_at` | timestamp | YES | Last touched |
|
|
870
|
-
| `last_seen` | timestamp | YES | Last seen |
|
|
871
|
-
|
|
872
|
-
---
|
|
873
|
-
|
|
874
|
-
## Company Detail Tables
|
|
875
|
-
|
|
876
|
-
### linkedin_company_address2
|
|
877
|
-
|
|
878
|
-
| Column | Type | Description |
|
|
879
|
-
| --------------------- | -------- | ------------------ |
|
|
880
|
-
| `id` | integer | Primary key |
|
|
881
|
-
| `linkedin_company_id` | integer | FK to company |
|
|
882
|
-
| `address` | text | Full address |
|
|
883
|
-
| `is_primary` | boolean | Is primary address |
|
|
884
|
-
| `sort_order` | smallint | Display order |
|
|
885
|
-
|
|
886
|
-
**Index:** `linkedin_company_address2_linkedin_company_idx` on `linkedin_company_id`
|
|
887
|
-
|
|
888
|
-
### linkedin_company_post
|
|
889
|
-
|
|
890
|
-
| Column | Type | Description |
|
|
891
|
-
| --------------------- | ------- | ---------------- |
|
|
892
|
-
| `id` | bigint | Primary key |
|
|
893
|
-
| `linkedin_company_id` | integer | FK to company |
|
|
894
|
-
| `linkedin_post_id` | bigint | LinkedIn post ID |
|
|
895
|
-
| `content_html` | text | Post content |
|
|
896
|
-
| `likes_count` | integer | Likes |
|
|
897
|
-
| `comments_count` | integer | Comments |
|
|
898
|
-
| `posted_date_range` | tsrange | Post date range |
|
|
899
|
-
| `image_url` | text | Image URL |
|
|
900
|
-
| `video_url` | text | Video URL |
|
|
901
|
-
| `external_url` | text | External link |
|
|
902
|
-
|
|
903
|
-
**Index:** `ix_linkedin_company_post_linkedin_company_id_id` on `(linkedin_company_id, id DESC)`
|
|
904
|
-
|
|
905
|
-
---
|
|
906
|
-
|
|
907
|
-
## Denormalized Views
|
|
908
|
-
|
|
909
|
-
### lkd_company
|
|
910
|
-
|
|
911
|
-
Denormalized company view with JSON fields for nested data.
|
|
912
|
-
|
|
913
|
-
| Column | Type | Description |
|
|
914
|
-
| --------------------- | --------- | ------------------------ |
|
|
915
|
-
| `linkedin_company_id` | integer | LinkedIn company ID |
|
|
916
|
-
| `company_id` | integer | FK to company |
|
|
917
|
-
| `org_id` | integer | Organization ID |
|
|
918
|
-
| `slug` | varchar | URL slug |
|
|
919
|
-
| `name` | varchar | Company name |
|
|
920
|
-
| `description` | varchar | Description |
|
|
921
|
-
| `website` | varchar | Website URL |
|
|
922
|
-
| `employee_count` | integer | Headcount |
|
|
923
|
-
| `founded_year` | integer | Year founded |
|
|
924
|
-
| `follower_count` | integer | LinkedIn followers |
|
|
925
|
-
| `linkedin_url` | text | LinkedIn URL |
|
|
926
|
-
| `country_iso` | text | Country code |
|
|
927
|
-
| `country_name` | text | Country name |
|
|
928
|
-
| `locality` | varchar | City |
|
|
929
|
-
| `type` | text | Company type |
|
|
930
|
-
| `size` | integer | Size code |
|
|
931
|
-
| `ticker` | varchar | Stock ticker |
|
|
932
|
-
| `specialties` | json | Specialties (JSON) |
|
|
933
|
-
| `industries` | json | Industries (JSON) |
|
|
934
|
-
| `locations` | json | Locations (JSON) |
|
|
935
|
-
| `posts` | json | Posts (JSON) |
|
|
936
|
-
| `logo` | text | Logo URL |
|
|
937
|
-
| `similar_pages` | int[] | Similar company IDs |
|
|
938
|
-
| `affiliated_pages` | int[] | Affiliated company IDs |
|
|
939
|
-
| `employees` | int[] | Sample employee IDs |
|
|
940
|
-
| `naics_codes` | json | NAICS codes (JSON) |
|
|
941
|
-
| `crunchbase_funding` | json | Funding data (JSON) |
|
|
942
|
-
| `inferred_location` | json | Inferred location (JSON) |
|
|
943
|
-
| `created_at` | timestamp | Created timestamp |
|
|
944
|
-
| `updated_at` | timestamp | Updated timestamp |
|
|
945
|
-
|
|
946
|
-
### lkd_profile
|
|
947
|
-
|
|
948
|
-
Denormalized profile view with JSON fields for nested data.
|
|
949
|
-
|
|
950
|
-
| Column | Type | Description |
|
|
951
|
-
| --------------------- | --------- | ----------------------- |
|
|
952
|
-
| `profile_id` | integer | LinkedIn profile ID |
|
|
953
|
-
| `person_id` | integer | FK to person |
|
|
954
|
-
| `user_id` | integer | LinkedIn user ID |
|
|
955
|
-
| `slug` | text | URL slug |
|
|
956
|
-
| `url` | text | Profile URL |
|
|
957
|
-
| `name` | text | Full name |
|
|
958
|
-
| `first_name` | text | First name |
|
|
959
|
-
| `last_name` | text | Last name |
|
|
960
|
-
| `company_name` | text | Current company |
|
|
961
|
-
| `title` | text | Current title |
|
|
962
|
-
| `headline` | text | LinkedIn headline |
|
|
963
|
-
| `country_iso` | text | Country code |
|
|
964
|
-
| `country_name` | text | Country name |
|
|
965
|
-
| `locality` | text | City |
|
|
966
|
-
| `industry_id` | integer | Industry ID |
|
|
967
|
-
| `industry_name` | text | Industry name |
|
|
968
|
-
| `profile_pic` | text | Profile picture URL |
|
|
969
|
-
| `connection_count` | integer | Connections |
|
|
970
|
-
| `recommender_count` | integer | Recommendations |
|
|
971
|
-
| `follower_count` | integer | Followers |
|
|
972
|
-
| `jobs_count` | integer | Number of positions |
|
|
973
|
-
| `skills` | text[] | Skills array |
|
|
974
|
-
| `interests` | text[] | Interests array |
|
|
975
|
-
| `summary` | text | Profile summary |
|
|
976
|
-
| `position` | json | Current position (JSON) |
|
|
977
|
-
| `experience` | json | All positions (JSON) |
|
|
978
|
-
| `education` | json | Education (JSON) |
|
|
979
|
-
| `certifications` | json | Certifications (JSON) |
|
|
980
|
-
| `courses` | json | Courses (JSON) |
|
|
981
|
-
| `projects` | json | Projects (JSON) |
|
|
982
|
-
| `volunteering` | json | Volunteering (JSON) |
|
|
983
|
-
| `patents` | json | Patents (JSON) |
|
|
984
|
-
| `awards` | json | Awards (JSON) |
|
|
985
|
-
| `publications` | json | Publications (JSON) |
|
|
986
|
-
| `recommendations` | json | Recommendations (JSON) |
|
|
987
|
-
| `languages` | json | Languages (JSON) |
|
|
988
|
-
| `test_scores` | json | Test scores (JSON) |
|
|
989
|
-
| `articles` | json | Articles (JSON) |
|
|
990
|
-
| `slugs` | json | All slugs (JSON) |
|
|
991
|
-
| `url_resources` | json | URL resources (JSON) |
|
|
992
|
-
| `seniority` | json | Seniority (JSON) |
|
|
993
|
-
| `job_function` | json | Job function (JSON) |
|
|
994
|
-
| `employment_type` | json | Employment type (JSON) |
|
|
995
|
-
| `linkedin_company_id` | integer | Current company ID |
|
|
996
|
-
| `is_incomplete` | boolean | Is incomplete |
|
|
997
|
-
| `privacy_redact` | boolean | Privacy redacted |
|
|
998
|
-
| `is_memorial` | boolean | Is memorial profile |
|
|
999
|
-
| `created_at` | timestamp | Created timestamp |
|
|
1000
|
-
| `updated_at` | timestamp | Updated timestamp |
|
|
1001
|
-
| `activity_at` | timestamp | Last activity |
|
|
1002
|
-
| `last_seen` | timestamp | Last seen |
|
|
1003
|
-
|
|
1004
|
-
---
|
|
1005
|
-
|
|
1006
|
-
## Restricted Tables (Permission Denied)
|
|
1007
|
-
|
|
1008
|
-
The following tables exist but cannot be queried with current permissions:
|
|
1009
|
-
|
|
1010
|
-
- `email_address` - Email addresses
|
|
1011
|
-
- `email_address_linkedin_profile` - Email-to-profile mapping
|
|
1012
|
-
- `email_address_phone_number` - Email-to-phone mapping
|
|
1013
|
-
- `phone_number` - Phone numbers
|
|
1014
|
-
- `company_size` - Size range codes
|
|
1015
|
-
- `linkedin_geo` - Geographic data
|
|
1016
|
-
- `linkedin_job_description` - Full job descriptions
|
|
1017
|
-
- `indeed_*` - All Indeed tables (15+ tables)
|
|
1018
|
-
- `domain` - Domain records
|
|
1019
|
-
- `domain_traffic_estimate` - Traffic data
|
|
1020
|
-
- `host` - Host/subdomain records
|
|
1021
|
-
- `web_tag` - Web technologies
|
|
1022
|
-
- `ios_sdk` / `play_store_sdk` - Mobile SDK data
|
|
1023
|
-
|
|
1024
|
-
---
|
|
1025
|
-
|
|
1026
|
-
## Key Functions
|
|
1027
|
-
|
|
1028
|
-
### key64()
|
|
1029
|
-
|
|
1030
|
-
Hash function for fast slug lookups:
|
|
1031
|
-
|
|
1032
|
-
```sql
|
|
1033
|
-
-- Fast company lookup by slug
|
|
1034
|
-
WHERE slug_key64 = key64('stripe')
|
|
1035
|
-
|
|
1036
|
-
-- Fast profile lookup by slug
|
|
1037
|
-
WHERE slug_key64 = key64('satyanadella')
|
|
1038
|
-
```
|
|
1039
|
-
|
|
1040
|
-
### ts_token()
|
|
1041
|
-
|
|
1042
|
-
Tokenizer for full-text search (used in GIN indexes).
|