Skip to content
Back

Confusion around Tables / TablesDB vs Databases in Node SDK (Cloud)

  • 0
  • Functions
  • Cloud
MP1902
26 Dec, 2025, 10:22

Hello everyone,

I ran into quite a bit of confusion when trying to migrate a Function from Databases.createDocument() to the new Tables / Rows API and wanted to share this as feedback, because I think the docs are currently misleading.

Context:

Appwrite Cloud

Node.js Functions

node-appwrite SDK

Function runtime is ESM ("type": "module")

What the docs say: In several places, the documentation shows examples like:

import { Client, TablesDB, ID } from 'node-appwrite';

const tablesDB = new TablesDB(client); await tablesDB.createRow({ ... });

or (CommonJS):

const sdk = require('node-appwrite'); const tablesDB = new sdk.TablesDB(client);

This strongly suggests that:

TablesDB exists in the Node SDK

Tables / Rows are available in Appwrite Cloud

What actually happens: When inspecting the installed SDK at runtime:

Object.keys(await import('node-appwrite'))

the exports are:

Client Databases ID Permission Query Storage Users Teams Functions ...

There is no Tables and no TablesDB at all.

As a result:

TablesDB is not a constructor

Tables is not a constructor

createRow() is impossible

The only working API is still Databases.createDocument()

This caused a lot of back-and-forth debugging around:

ESM vs CommonJS

default vs named exports

dynamic imports

SDK versions

When in reality, the root cause was simply: Tables are not available in the Cloud SDK/runtime yet

Why this is confusing:

The docs don’t clearly state that Tables are not available in Cloud

The Node examples don’t mention version or deployment constraints

It’s not obvious that Databases is still the only valid API in Cloud Functions

Thanks a lot for the great work overall!

TL;DR
Developers are confused about using TablesDB in Node SDK for Appwrite Cloud. The SDK does not actually contain TablesDB, and Tables are not yet available in the Cloud environment. Stick to using Databases.createDocument() for now. Assumptions in the documentation are misleading.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more