| name | juicebox-migration-deep-dive |
| description | Advanced Juicebox data migration strategies.
Use when migrating from other recruiting platforms, performing bulk data imports,
or implementing complex data transformation pipelines.
Trigger with phrases like "juicebox data migration", "migrate to juicebox",
"juicebox import", "juicebox bulk migration".
|
| allowed-tools | Read, Write, Edit, Bash(kubectl:*), Bash(curl:*) |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Juicebox Migration Deep Dive
Overview
Advanced strategies for migrating data to Juicebox from other recruiting and people search platforms.
Prerequisites
- Source data access and export capabilities
- Juicebox Enterprise plan (for bulk imports)
- Data mapping documentation
- Testing environment
Migration Sources
| Source | Complexity | Common Issues |
|---|
| LinkedIn Recruiter | Medium | Rate limits, field mapping |
| Greenhouse | Low | Well-documented API |
| Lever | Low | Standard export format |
| Custom ATS | High | Custom transformation needed |
| CSV/Excel | Low | Data quality issues |
Instructions
Step 1: Data Assessment
interface DataAssessment {
totalRecords: number;
uniqueProfiles: number;
duplicates: number;
fieldCoverage: Record<string, number>;
dataQualityScore: number;
estimatedMigrationTime: string;
}
export async function assessSourceData(
source: string,
sampleSize: number = 1000
): Promise<DataAssessment> {
const sample = await loadSampleData(source, sampleSize);
const assessment: DataAssessment = {
totalRecords: sample.total,
uniqueProfiles: new Set(sample.records.map(r => r.email)).size,
duplicates: sample.total - new Set(sample.records.map( => r.)).,
: (sample.),
: (sample.),
: (sample.)
};
assessment;
}
(): <, > {
fields = [, , , , , ];
: <, > = {};
( field fields) {
count = records.( r[field] && r[field].()).;
coverage[field] = (count / records.) * ;
}
coverage;
}
Step 2: Schema Mapping
export interface FieldMapping {
sourceField: string;
targetField: string;
transform?: (value: any) => any;
required: boolean;
}
export const linkedInMapping: FieldMapping[] = [
{ sourceField: 'firstName', targetField: 'first_name', required: true },
{ sourceField: 'lastName', targetField: 'last_name', required: true },
{
sourceField: 'fullName',
targetField: 'name',
transform: (v) => v || undefined,
required: false
},
{ sourceField: 'headline', targetField: 'title', required: false },
{ sourceField: 'companyName', targetField: 'company', required: false },
{
: ,
: ,
: normalizeLocation,
:
},
{
: ,
: ,
: normalizeLinkedInUrl,
:
},
{
: ,
: ,
:
}
];
{
() {}
(: <, >): <, > {
: <, > = {};
( mapping .) {
value = .(source, mapping.);
(mapping.) {
value = mapping.(value);
}
(value !== && value !== && value !== ) {
.(target, mapping., value);
} (mapping.) {
();
}
}
target;
}
}
Step 3: Data Transformation Pipeline
import { Transform, pipeline } from 'stream';
import { promisify } from 'util';
const pipelineAsync = promisify(pipeline);
export class MigrationPipeline {
private stages: Transform[] = [];
addStage(name: string, transform: (record: any) => any): this {
this.stages.push(new Transform({
objectMode: true,
transform(record, encoding, callback) {
try {
const result = transform(record);
if (result) {
this.push(result);
}
callback();
} catch (error) {
callback(error as Error);
}
}
}));
return this;
}
async run(: , : ): <> {
stats = ();
statsTracker = ({
: ,
() {
stats.();
.(record);
();
}
});
(
source,
....,
statsTracker,
destination
);
stats;
}
}
pipeline = ()
.(, parseCSVRecord)
.(, validateRecord)
.(, deduplicateRecord)
.(, transformToJuiceboxSchema)
.(, enrichWithMetadata);
Step 4: Bulk Import with Rate Limiting
export class BulkImporter {
private rateLimiter: RateLimiter;
private batchSize: number;
private maxConcurrent: number;
constructor(options: {
requestsPerSecond: number;
batchSize: number;
maxConcurrent: number;
}) {
this.rateLimiter = new RateLimiter(options.requestsPerSecond);
this.batchSize = options.batchSize;
this.maxConcurrent = options.maxConcurrent;
}
async import(records: Profile[]): Promise<ImportResult> {
const result: ImportResult = {
total: records.length,
successful: 0,
failed: 0,
errors: []
};
const batches = chunk(records, this.);
semaphore = (.);
.(batches.( (batch, index) => {
semaphore.();
{
..();
batchResult = .(batch);
result. += batchResult.;
result. += batchResult.;
result..(...batchResult.);
logger.(, {
: batchResult.,
: batchResult.
});
} {
semaphore.();
}
}));
result;
}
(: []): <> {
{
response = juiceboxClient..(batch);
{
: response. + response.,
: response.,
: response.
};
} (error) {
{
: ,
: batch.,
: [{ : (error )., : batch }]
};
}
}
}
Step 5: Validation and Reconciliation
export class MigrationValidator {
async validateMigration(
sourceCount: number,
destinationQuery: string
): Promise<ValidationReport> {
const report: ValidationReport = {
sourceCount,
destinationCount: 0,
matchRate: 0,
missingRecords: [],
dataIntegrityIssues: []
};
const destResult = await juiceboxClient.search.people({
query: destinationQuery,
limit: 0
});
report.destinationCount = destResult.total;
report.matchRate = (report.destinationCount / sourceCount) * 100;
const sampleSize = Math.min(100, sourceCount);
const sample = await this.getSampleFromSource(sampleSize);
for (const record of sample) {
const match = await .(record);
(!match) {
report..(record.);
} {
issues = .(record, match);
(issues. > ) {
report..({
: record.,
issues
});
}
}
}
report;
}
(: , : ): [] {
: [] = [];
criticalFields = [, , ];
( field criticalFields) {
(source[field] !== dest[field]) {
issues.();
}
}
issues;
}
}
Step 6: Rollback Strategy
export class MigrationRollback {
private checkpointFile: string;
constructor(migrationId: string) {
this.checkpointFile = `./checkpoints/${migrationId}.json`;
}
async saveCheckpoint(state: MigrationState): Promise<void> {
await fs.writeFile(this.checkpointFile, JSON.stringify(state, null, 2));
}
async loadCheckpoint(): Promise<MigrationState | null> {
try {
const data = await fs.readFile(this.checkpointFile, 'utf-8');
return JSON.parse(data);
} catch {
return null;
}
}
async rollback(migrationId: string): <> {
checkpoint = .();
(!checkpoint) {
();
}
deleted = juiceboxClient..({
: { migrationId }
});
{
: deleted.,
: checkpoint.
};
}
}
Migration Checklist
## Pre-Migration
- [ ] Source data exported and validated
- [ ] Field mapping documented
- [ ] Test migration on sample data
- [ ] Rollback plan documented
- [ ] Stakeholder sign-off
## During Migration
- [ ] Monitoring dashboards active
- [ ] Progress tracking enabled
- [ ] Error logging configured
- [ ] Checkpoint saves working
## Post-Migration
- [ ] Reconciliation complete
- [ ] Data integrity verified
- [ ] Source system archived
- [ ] Documentation updated
- [ ] Team training complete
Output
- Data assessment tools
- Schema mapping configuration
- Transformation pipeline
- Bulk import with rate limiting
- Validation and reconciliation
Resources
Summary
This skill pack completes the enterprise-grade Juicebox integration toolkit.