Quick Start
Get up and running with the Beem SDK in minutes.
const { hub, catalog, flow, metrics, config } = require("@beem/sdk");
// Query a dataset from the warehouse
const dataset = hub.Dataset("my_dataset");
const latest = await dataset.latest();
const rows = await dataset.rows(latest, { limit: 100 });
// Download / upload files from the datalake
const file = await catalog.download("my-bucket", "data/export.csv");
await catalog.upload("my-bucket", "output/report.docx", buffer, "application/octet-stream");
// Send an email
await flow.email.send({ to: ["[email protected]"], subject: "Report ready", body: "Done." });
// Render a DOCX document
const buf = await flow.documents.render((data, docx) => {
return new docx.Document({ sections: [/* ... */] });
}, { title: "Monthly Report" });
// Publish a metric
await metrics.publish("Beem", "JobsProcessed", 1, {
unit: "Count",
dimensions: { service: "document-export" },
});Updated 7 days ago
