All skills
catalystbyzoho avatar

/catalyst-nosql

@a369628

Catalyst NoSQL — key-value table store with typed items built via NoSQLItem builder. Partition key required. Trigger on 'NoSQL', 'nosql.table', 'insertItems', 'fetchItem', 'updateItems', 'deleteItems', 'queryTable', 'NoSQLItem', 'document storage', 'flexible schema', or 'Catalyst document database'. Do NOT use when you need SQL joins, ZCQL queries, or a fixed relational schema — use catalyst-datastore instead.

Use this Skill: https://skilld.dev/gh/catalystbyzoho/agent-skills/catalyst-nosql

This session only. Nothing lands on disk.

referencesnosql-basics.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Overview

Catalyst NoSQL is a key-value store organized into tables. Each table requires a partition key (and optionally a sort key) defined at creation time. Items are typed attribute maps built with the NoSQLItem builder — not plain JSON objects.

Pre-requisite: Create the table in the console (Console → Cloud Scale → NoSQL) before writing SDK code. The table name and partition-key column name must be known.

Data model

Concept Catalyst NoSQL
Container Table (not "collection")
Row Item — typed attribute map
Primary key Partition key (required) + optional sort key
Schema Per-item flexible — any extra attributes allowed
Query Partition-key equality condition (required) + optional filter

SDK Operations (Node.js)

const { NoSQLItem, NoSQLMarshall, NoSQLEnum } = require('zcatalyst-sdk-node/lib/no-sql');
const { NoSQLOperator, NoSQLUpdateOperationType } = NoSQLEnum;

const nosql = catalystApp.nosql();
// nosql.table(name) returns an instance without an API call
const table = nosql.table('UserProfiles');
// Table name from Console → Cloud Scale → NoSQL

// --- INSERT ---
// insertItems(...items) — spread one or more INoSQLInsertItem objects
await table.insertItems({
  item: new NoSQLItem()
    .addString('userId', 'u123')        // partition key
    .addString('name', 'Alice')
    .addNumber('age', 30)
    .addBoolean('active', true)
});

// --- FETCH by key ---
// fetchItem({ keys }) — keys can be a single NoSQLItem or an array for batch fetch
const result = await table.fetchItem({
  keys: new NoSQLItem().addString('userId', 'u123')
});
// result.toJSON() → INoSQLResponse with result.create/get/update/delete arrays

// --- UPDATE ---
// updateItems(...updates) — keys identifies the item; update_attributes describes what to change
await table.updateItems({
  keys: new NoSQLItem().addString('userId', 'u123'),
  update_attributes: [
    {
      operation_type: NoSQLUpdateOperationType.PUT,
      attribute_path: ['name'],
      update_value: NoSQLMarshall.makeString('Alice Smith')
    }
  ]
});

// --- DELETE ---
// deleteItems(...deletes) — keys must include the partition key (and sort key if table has one)
await table.deleteItems({
  keys: new NoSQLItem().addString('userId', 'u123')
});

// --- QUERY ---
// queryTable({ key_condition, limit? }) — must include partition-key equality as condition
const queryResult = await table.queryTable({
  key_condition: {
    attribute: ['userId'],
    operator: NoSQLOperator.EQUALS,
    value: NoSQLMarshall.makeString('u123')
  },
  limit: 50
});

NoSQLItem builder cheat-sheet

Method DynamoDB type Example
.addString(name, val) S .addString('city', 'NYC')
.addNumber(name, val) N .addNumber('score', 42)
.addBoolean(name, val) BOOL .addBoolean('active', true)
.addNull(name) NULL .addNull('deletedAt')
.addList(name, arr) L .addList('tags', [NoSQLMarshall.makeString('beta')])
.addMap(name, obj) M .addMap('meta', { src: NoSQLMarshall.makeString('web') })
NoSQLItem.from(obj) auto-marshall NoSQLItem.from({ userId: 'u1' })

When to Use NoSQL vs Data Store

Use NoSQL Use Data Store
Flexible / evolving per-item attributes Fixed schema with uniform columns
Nested maps or arrays in items Flat tabular data
No complex joins needed Joins or ZCQL queries required
High write throughput, key-value access ACID compliance, relational access

Common Errors

Error Cause Fix
nosql.collection is not a function Using the old (wrong) API Replace with nosql.table(name) — there is no collection() method
table.insertDocument is not a function Using the old (wrong) API Replace with table.insertItems({ item: new NoSQLItem()... })
Table not found / 404 Table doesn't exist yet or name is wrong Create via Console → NoSQL before running SDK code; names are case-sensitive
Insert returns 400 Partition key attribute missing from NoSQLItem Ensure the NoSQLItem includes the partition-key column defined in the Console
queryTable returns empty despite data existing key_condition.attribute path wrong Use the exact column name (case-sensitive) defined as the partition key in the Console

Source: SKILL.md on GitHub

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The skill is a standard documentation and integration guide for Zoho Catalyst NoSQL services, providing instructions and Node.js SDK code examples for database operations. It follows official developer guidelines and uses legitimate vendor libraries without any malicious patterns.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at a369628. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 4 months ago
metadata
{
  "version": "2.1.0"
}

README badge

README badge for catalystbyzoho/agent-skills/catalyst-nosql