Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToDo for Dataset service #31

Closed
techsavvyash opened this issue Apr 19, 2024 · 1 comment
Closed

ToDo for Dataset service #31

techsavvyash opened this issue Apr 19, 2024 · 1 comment

Comments

@techsavvyash
Copy link
Owner

Dynamo-Prisma

ToDo:

1. Fix Package Response

Ticket

Success Response

{
    "error":false,
    "message":"Warnings if any",
    "data":"original schema with any modications made"
}

Error Response

{
    "error": true,
    "message" : "Error message",
}

2. Add support for Postgres types

Ticket

3. Cover the following edge cases during schema.prisma generation.

  1. No fields are unique
    Ticket
{
    "schemaName": "test01",
    "fields": [
        {
            "fieldName": "Crop",
            "type": "VARCHAR",
            "description": "",
            "maxLength": "",
            "nullable": false,
            "unique": false,
            "vectorEmbed": false
        }
    ],
    "description": "Schema for seed treating materials data with details of each order"
}
  1. creation of a table with vector embeddings. extra columns to be added: cropAlgotithm, cropEmbedding
{
    "schemaName": "test01",
    "fields": [
        {
            "fieldName": "Crop",
            "type": "VARCHAR",
            "description": "",
            "maxLength": "",
            "nullable": false,
            "unique": false,
            "vectorEmbed": true,
            "embeddingAlgorithm": "text-embedding-ada-002"
        }
    ],
    "description": "Schema for seed treating materials data with details of each order"
}

Expected model:

model test01 {
  Crop String
  CropAlgorithm  String
  CropEmbedding  Unsupported("vector(1536)")?
  @@unique([crop, abc])
}

The 1536 in this is according to the following mapping:

{
  'text-embedding-ada-002': 1536,
  'text-embedding-3-small': 1536,
  'text-embedding-3-large': 3072,
}
  1. Dash (-) in the schemaName and/or fieldName
    Package can make modifications to the name, but the modification should be returned to a user, with a warning
    Ticket
{
    "schemaName": "test01-value",
    "fields": [
        {
            "fieldName": "Crop-value",
            "type": "VARCHAR",
            "description": "",
            "maxLength": "",
            "nullable": false,
            "unique": false,
            "vectorEmbed": false
        }
    ],
    "description": "Schema for seed treating materials data with details of each order"
}
  1. Whitespace in schemaName and/or fieldName
    Package can make modifications to the name, but the modification should be returned to a user, with a warning
    Ticket

Both have a white space

{
    "schemaName": "test01 space",
    "fields": [
        {
            "fieldName": "Crop space",
            "type": "VARCHAR",
            "description": "",
            "maxLength": "",
            "nullable": false,
            "unique": false,
            "vectorEmbed": false
        }
    ],
    "description": "Schema for seed treating materials data with details of each order"
}

schemaName has a white space

{
    "schemaName": "test01 space",
    "fields": [
        {
            "fieldName": "Crop_space",
            "type": "VARCHAR",
            "description": "",
            "maxLength": "",
            "nullable": false,
            "unique": false,
            "vectorEmbed": false
        }
    ],
    "description": "Schema for seed treating materials data with details of each order"
}

fieldName has a white space

{
    "schemaName": "test01_space",
    "fields": [
        {
            "fieldName": "Crop space",
            "type": "VARCHAR",
            "description": "",
            "maxLength": "",
            "nullable": false,
            "unique": false,
            "vectorEmbed": false
        }
    ],
    "description": "Schema for seed treating materials data with details of each order"
}
@techsavvyash
Copy link
Owner Author

#27 closes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant