Skip to content

Enhancement: Allow User-Defined Schema Generation #1

@12fahed

Description

@12fahed

Problem

The current implementation auto-generates a schema by inferring from the data.

Solution

Add a feature which will take the natural language instruction => passing to LLM generated the desired schema. Certainly like this

const { parseAndUpload } = require('csv-auto-datapipe');

const result = await parseAndUpload({
  filePath: './users.csv',
  dbType: 'postgres',
  host: 'localhost',
  user: 'postgres',
  password: 'your_password',
  geminiApiKey: process.env.GEMINI_API_KEY,
  aiSchema: true,
  schemaInstruction: 'Concatinate the first and last name and store it as Full name',
  query: 'Find all users older than 25'
});

console.log('Upload:', result.rowsInserted, 'rows');
console.log('Query Results:', result.queryResult.results);
console.log('Generated SQL:', result.queryResult.generatedQuery);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions