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

Method setMetadata

cli/api/dbadapters/bigquery.ts:311–328  ·  view source on GitHub ↗
(action: dataform.IExecutionAction)

Source from the content-addressed store, hash-verified

309 }
310
311 public async setMetadata(action: dataform.IExecutionAction): Promise<void> {
312 const { target, actionDescriptor } = action;
313
314 const metadata = await this.getMetadata(target);
315 const schemaWithDescription = addDescriptionToMetadata(
316 actionDescriptor.columns,
317 metadata.schema.fields
318 );
319
320 await this.getClient(target.database)
321 .dataset(target.schema)
322 .table(target.name)
323 .setMetadata({
324 description: actionDescriptor.description,
325 schema: schemaWithDescription,
326 labels: actionDescriptor.bigqueryLabels
327 });
328 }
329
330 private async getMetadata(target: dataform.ITarget): Promise<TableMetadata> {
331 try {

Callers

nothing calls this directly

Calls 6

getMetadataMethod · 0.95
getClientMethod · 0.95
addDescriptionToMetadataFunction · 0.85
datasetMethod · 0.80
setMetadataMethod · 0.65
tableMethod · 0.65

Tested by

no test coverage detected