How to use the @dataform/core/utils.stringifyResolvable function in @dataform/core

To help you get started, we’ve selected a few @dataform/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dataform-co / dataform / core / session.ts View on Github external
actions.forEach(action => {
      const fullyQualifiedDependencies: { [name: string]: dataform.ITarget } = {};
      for (const dependency of action.dependencyTargets) {
        const possibleDeps = this.findActions(dependency);
        if (possibleDeps.length === 0) {
          // We couldn't find a matching target.
          this.compileError(
            new Error(
              `Missing dependency detected: Action "${
                action.name
              }" depends on "${utils.stringifyResolvable(dependency)}" which does not exist.`
            ),
            action.fileName
          );
        } else if (possibleDeps.length === 1) {
          // We found a single matching target, and fully-qualify it if it's a normal dependency,
          // or add all of its dependencies to ours if it's an 'inline' table.
          const protoDep = possibleDeps[0].proto;
          if (protoDep instanceof dataform.Table && protoDep.type === "inline") {
            protoDep.dependencyTargets.forEach(inlineDep =>
              action.dependencyTargets.push(inlineDep)
            );
          } else {
            fullyQualifiedDependencies[protoDep.name] = protoDep.target;
          }
        } else {
          // Too many targets matched the dependency.
github dataform-co / dataform / core / operation.ts View on Github external
newDependencies.forEach((d: Resolvable) => {
      const depName = utils.stringifyResolvable(d);
      if (this.proto.dependencies.indexOf(depName) < 0) {
        this.proto.dependencies.push(depName);
      }
    });
    return this;
github dataform-co / dataform / core / assertion.ts View on Github external
newDependencies.forEach((d: Resolvable) => {
      const depName = utils.stringifyResolvable(d);
      if (this.proto.dependencies.indexOf(depName) < 0) {
        this.proto.dependencies.push(depName);
      }
    });
    return this;
github dataform-co / dataform / core / table.ts View on Github external
private addDependency(dependency: Resolvable): void {
    const depName = utils.stringifyResolvable(dependency);
    if (this.proto.dependencies.indexOf(depName) < 0) {
      this.proto.dependencies.push(depName);
    }
  }
}