Skip to content

GetTable

Source: src/AWS/BCMDataExports/GetTable.ts

Runtime binding for bcm-data-exports:GetTable.

An account-level operation (the table dictionary is not tied to any export) that reads the schema of a Data Exports table — its columns, data types, and descriptions for the given table properties. Useful for query builders that validate an SQL statement’s columns before calling UpdateExport. Provide the implementation with Effect.provide(AWS.BCMDataExports.GetTableHttp).

// init — account-level binding takes no resource
const getTable = yield* AWS.BCMDataExports.GetTable();
// runtime
const table = yield* getTable({ TableName: "COST_AND_USAGE_REPORT" });
const columns = (table.Schema ?? []).map((column) => column.Name);