@lume-ai/typescript-sdk v3.12.1
Status
The Lume Typescript SDK is currently in beta. Please reach out to support if you have any questions, encounter any bugs, or have any feature requests.
Installation
npm install @lume-ai/typescript-sdk
yarn add @lume-ai/typescript-sdk
pnpm add @lume-ai/typescript-sdk
Quickstart
Retrieve your input data and target schema.
const targetSchema = {
type: "object",
properties: {
f_name: {
type: "string",
description: "The first name of the user",
},
l_name: {
type: "string",
description: "The last name of the user",
},
},
required: ["f_name", "l_name"],
}
const sourceData = [
{ first_name: "John", last_name: "Doe" },
{ first_name: "Jane", last_name: "Smith" }
]
Create a new pipeline and map data.
import { Lume, Mapping, Pipeline } from '@lume-ai/typescript-sdk';
const lume: Lume = new Lume('api_key')
const createPipeline = async () => {
const createdPipeline = await lume.pipelineService.createPipeline(
{
name: 'sourceX_to_destinationY',
description: "my_description",
target_schema: targetSchema
}
);
return createdPipeline;
}
export async function run() {
// create pipeline and execute job
const pipeline: Pipeline = await createPipeline(lume);
const { result, jobId } = await lume.jobsService.createAndRunJob(pipeline.id, sourceData)
// parse the results and iterate through all mapped records. Note this method is paginated.
const mappingsPage = await lume.resultsService.getMappingsForResult(result.id, 1, 50);
const mappings: Mapping[] = mappingsPage.items;
// use the mappings to access the mapped records
}
run()
Documentation
Issues / Questions
Please reach out to support if you encounter any bugs, have any questions, or have any feature requests.
9 months ago
9 months ago
9 months ago
10 months ago
11 months ago
1 year ago
12 months ago
1 year ago
1 year ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago