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

Function build

cli/api/commands/build.ts:9–28  ·  view source on GitHub ↗
(
  compiledGraph: dataform.ICompiledGraph,
  runConfig: dataform.IRunConfig,
  dbadapter: dbadapters.IDbAdapter
)

Source from the content-addressed store, hash-verified

7import { dataform } from "df/protos/ts";
8
9export async function build(
10 compiledGraph: dataform.ICompiledGraph,
11 runConfig: dataform.IRunConfig,
12 dbadapter: dbadapters.IDbAdapter
13) {
14 const prunedGraph = prune(compiledGraph, runConfig);
15
16 const allInvolvedTargets = new Set<string>(
17 prunedGraph.tables.map(table => targetStringifier.stringify(table.target))
18 );
19
20 return new Builder(
21 prunedGraph,
22 runConfig,
23 await state(
24 dbadapter,
25 Array.from(allInvolvedTargets).map(target => targetStringifier.parse(target))
26 )
27 ).build();
28}
29
30export class Builder {
31 private readonly executionSql: ExecutionSql;

Callers 1

runCliFunction · 0.90

Calls 5

pruneFunction · 0.90
stateFunction · 0.90
stringifyMethod · 0.80
buildMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected