weaviate-class-updater
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

weaviate-class-updater

Update a database class in Weaviate.

Usage

npm i -g weaviate-class-updater
weaviate-class-updater

Alternatively, provide a config file.

weaviate-class-updater -f ./data/config.json

Environment variables

Instead of using the client properties in the configuration file, you can alternatively specify them using environment variables.

Variable Default value
WEAVIATE_HOST 'localhost:8888'
WEAVIATE_SCHEME 'http'
WEAVIATE_AUTH_CLIENT_SECRET
WEAVIATE_API_KEY
WEAVIATE_HEADERS

Configuration file format

Example configuration file to add two properties to the Article schema, authors and sentiment. Note that the client is optional, and can also be provided via environment variables or left blank to use the defaults.

{
  "client": {
    "authClientSecret": "",
    "apiKey": "",
    "host": "localhost:8888",
    "scheme": "http",
    "headers": ""
  },
  "updates": [
    {
      "className": "Article",
      "properties": [
        {
          "dataType": ["text[]"],
          "description": "Authors of the article, if any",
          "name": "authors",
          "indexInverted": true
        },
        {
          "dataType": ["number"],
          "description": "Sentiment of the article",
          "name": "sentiment",
          "indexInverted": true
        }
      ]
    }
  ]
}

Development

git clone https://github.com/erikvullings/weaviate-class-updater
npm i
npm start

/weaviate-class-updater/

    Package Sidebar

    Install

    npm i weaviate-class-updater

    Weekly Downloads

    2

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    24 kB

    Total Files

    25

    Last publish

    Collaborators

    • erikvullings