How to use the @dataform/core/declaration.Declaration 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
public declare(dataset: FullyQualifiedName): Declaration {
    const declaration = new Declaration();
    declaration.session = this;
    this.setNameAndTarget(declaration.proto, dataset.name, dataset.schema);
    declaration.proto.fileName = utils.getCallerFile(this.rootDir);
    this.actions.push(declaration);
    return declaration;
  }
github dataform-co / dataform / core / session.ts View on Github external
public declare(dataset: dataform.ITarget): Declaration {
    const declaration = new Declaration();
    declaration.session = this;
    utils.setNameAndTarget(this, declaration.proto, dataset.name, dataset.schema, dataset.database);
    declaration.proto.fileName = utils.getCallerFile(this.rootDir);
    this.actions.push(declaration);
    return declaration;
  }