MCPcopy Create free account
hub / github.com/dataform-co/dataform / tables

Method tables

cli/api/dbadapters/bigquery.ts:194–219  ·  view source on GitHub ↗
(database: string, schema?: string)

Source from the content-addressed store, hash-verified

192 }
193
194 public async tables(database: string, schema?: string): Promise<dataform.ITableMetadata[]> {
195 const datasetIds = schema ? [schema] : await this.schemas(database);
196 const tablesMetadata: dataform.ITableMetadata[] = [];
197
198 await Promise.all(
199 datasetIds.map(async datasetId => {
200 const [tables] = await this.getClient(database)
201 .dataset(datasetId)
202 .getTables({ autoPaginate: true, maxResults: 1000 });
203 await Promise.all(
204 tables.map(async table => {
205 const metadata = await this.table({
206 database,
207 schema: datasetId,
208 name: table.id
209 });
210 if (metadata) {
211 tablesMetadata.push(metadata);
212 }
213 })
214 );
215 })
216 );
217
218 return tablesMetadata;
219 }
220
221 public async search(
222 searchText: string,

Callers

nothing calls this directly

Calls 5

schemasMethod · 0.95
getClientMethod · 0.95
tableMethod · 0.95
datasetMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected