@dataform/core
Advanced tools
Comparing version 1.4.1 to 1.4.2
/// <amd-module name="@dataform/core/adapters/bigquery" /> | ||
import { IAdapter } from "@dataform/core/adapters"; | ||
import { Adapter } from "@dataform/core/adapters/base"; | ||
import { Tasks } from "@dataform/core/tasks"; | ||
import { dataform } from "@dataform/protos"; | ||
import { Tasks } from "../tasks"; | ||
import { Adapter } from "./base"; | ||
import { IAdapter } from "./index"; | ||
export declare class BigQueryAdapter extends Adapter implements IAdapter { | ||
private project; | ||
constructor(project: dataform.IProjectConfig); | ||
private dataformCoreVersion; | ||
constructor(project: dataform.IProjectConfig, dataformCoreVersion: string); | ||
resolveTarget(target: dataform.ITarget): string; | ||
@@ -10,0 +11,0 @@ publishTasks(table: dataform.ITable, runConfig: dataform.IRunConfig, tableMetadata: dataform.ITableMetadata): Tasks; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@dataform/core/adapters/bigquery", ["require", "exports", "@dataform/protos", "@dataform/core/tasks", "@dataform/core/adapters/base"], factory); | ||
define("@dataform/core/adapters/bigquery", ["require", "exports", "@dataform/core/adapters/base", "@dataform/core/tasks", "@dataform/protos"], factory); | ||
} | ||
@@ -13,9 +13,10 @@ })(function (require, exports) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const base_1 = require("@dataform/core/adapters/base"); | ||
const tasks_1 = require("@dataform/core/tasks"); | ||
const protos_1 = require("@dataform/protos"); | ||
const tasks_1 = require("@dataform/core/tasks"); | ||
const base_1 = require("@dataform/core/adapters/base"); | ||
class BigQueryAdapter extends base_1.Adapter { | ||
constructor(project) { | ||
constructor(project, dataformCoreVersion) { | ||
super(); | ||
this.project = project; | ||
this.dataformCoreVersion = dataformCoreVersion; | ||
} | ||
@@ -74,2 +75,2 @@ resolveTarget(target) { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmlncXVlcnkuanMiLCJzb3VyY2VSb290IjoiI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cHVibGljIGRyb3BJZkV4aXN0cyh0YXJnZXQ6IGRhdGFmb3JtLklUYXJnZXQsIHR5cGU6IHN0cmluZykge1xuICAgIHJldHVybiBgZHJvcCAke3RoaXMuYmFzZVRhYmxlVHlwZSh0eXBlKX0gaWYgZXhpc3RzICR7dGhpcy5yZXNvbHZlVGFyZ2V0KHRhcmdldCl9YDtcbiAgfVxufVxuIl19 |
@@ -12,3 +12,3 @@ /// <amd-module name="@dataform/core/adapters/index" /> | ||
} | ||
export declare type AdapterConstructor<T extends IAdapter> = new (projectConfig: dataform.IProjectConfig) => T; | ||
export declare type AdapterConstructor<T extends IAdapter> = new (projectConfig: dataform.IProjectConfig, dataformCoreVersion: string) => T; | ||
export declare enum WarehouseType { | ||
@@ -30,2 +30,2 @@ BIGQUERY = "bigquery", | ||
export declare function register(warehouseType: string, c: AdapterConstructor<IAdapter>): void; | ||
export declare function create(projectConfig: dataform.IProjectConfig): IAdapter; | ||
export declare function create(projectConfig: dataform.IProjectConfig, dataformCoreVersion: string): IAdapter; |
@@ -69,7 +69,7 @@ (function (factory) { | ||
exports.register = register; | ||
function create(projectConfig) { | ||
function create(projectConfig, dataformCoreVersion) { | ||
if (!registry[projectConfig.warehouse]) { | ||
throw new Error(`Unsupported warehouse: ${projectConfig.warehouse}`); | ||
} | ||
return new registry[projectConfig.warehouse](projectConfig); | ||
return new registry[projectConfig.warehouse](projectConfig, dataformCoreVersion); | ||
} | ||
@@ -83,2 +83,2 @@ exports.create = create; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9jb3JlL2FkYXB0ZXJzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0lBQUEsK0RBQW1FO0lBQ25FLCtEQUFtRTtJQUNuRSxpRUFBcUU7SUFDckU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ob3VzZTogJHtwcm9qZWN0Q29uZmlnLndhcmVob3VzZX1gKTtcbiAgfVxuICByZXR1cm4gbmV3IHJlZ2lzdHJ5W3Byb2plY3RDb25maWcud2FyZWhvdXNlXShwcm9qZWN0Q29uZmlnLCBkYXRhZm9ybUNvcmVWZXJzaW9uKTtcbn1cblxucmVnaXN0ZXIoXCJiaWdxdWVyeVwiLCBCaWdRdWVyeUFkYXB0ZXIpO1xuLy8gVE9ETzogVGhlIHJlZHNoaWZ0IGNsaWVudCBsaWJyYXJ5IGhhcHBlbnMgdG8gd29yayB3ZWxsIGZvciBwb3N0Z3JlcywgYnV0IHdlIHNob3VsZCBwcm9iYWJseVxuLy8gbm90IGJlIHJlbHlpbmcgb24gdGhhdCBiZWhhdmlvdXIuIEF0IHNvbWUgcG9pbnQgd2Ugc2hvdWxkIHJlcGxhY2UgdGhpcyB3aXRoIGEgZmlyc3QtY2xhc3Ncbi8vIFBvc3RncmVzQWRhcHRlci5cbnJlZ2lzdGVyKFwicG9zdGdyZXNcIiwgUmVkc2hpZnRBZGFwdGVyKTtcbnJlZ2lzdGVyKFwicmVkc2hpZnRcIiwgUmVkc2hpZnRBZGFwdGVyKTtcbnJlZ2lzdGVyKFwic25vd2ZsYWtlXCIsIFNub3dmbGFrZUFkYXB0ZXIpO1xucmVnaXN0ZXIoXCJzcWxkYXRhd2FyZWhvdXNlXCIsIFNRTERhdGFXYXJlaG91c2VBZGFwdGVyKTtcbiJdfQ== |
/// <amd-module name="@dataform/core/adapters/redshift" /> | ||
import { IAdapter } from "@dataform/core/adapters"; | ||
import { Adapter } from "@dataform/core/adapters/base"; | ||
import { Tasks } from "@dataform/core/tasks"; | ||
import { dataform } from "@dataform/protos"; | ||
import { Tasks } from "../tasks"; | ||
import { Adapter } from "./base"; | ||
import { IAdapter } from "./index"; | ||
export declare class RedshiftAdapter extends Adapter implements IAdapter { | ||
private project; | ||
constructor(project: dataform.IProjectConfig); | ||
private dataformCoreVersion; | ||
constructor(project: dataform.IProjectConfig, dataformCoreVersion: string); | ||
resolveTarget(target: dataform.ITarget): string; | ||
publishTasks(table: dataform.ITable, runConfig: dataform.IRunConfig, tableMetadata: dataform.ITableMetadata): Tasks; | ||
assertTasks(assertion: dataform.IAssertion, projectConfig: dataform.IProjectConfig): Tasks; | ||
createOrReplaceView(target: dataform.ITarget, query: string, bind?: boolean): string; | ||
createOrReplaceView(target: dataform.ITarget, query: string, bind: boolean): string; | ||
createOrReplace(table: dataform.ITable): Tasks; | ||
@@ -14,0 +15,0 @@ createTable(table: dataform.ITable, target: dataform.ITarget): string; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@dataform/core/adapters/redshift", ["require", "exports", "@dataform/protos", "@dataform/core/tasks", "@dataform/core/adapters/base"], factory); | ||
define("@dataform/core/adapters/redshift", ["require", "exports", "@dataform/core/adapters/base", "@dataform/core/tasks", "@dataform/protos", "semver"], factory); | ||
} | ||
@@ -13,9 +13,11 @@ })(function (require, exports) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const base_1 = require("@dataform/core/adapters/base"); | ||
const tasks_1 = require("@dataform/core/tasks"); | ||
const protos_1 = require("@dataform/protos"); | ||
const tasks_1 = require("@dataform/core/tasks"); | ||
const base_1 = require("@dataform/core/adapters/base"); | ||
const semver = require("semver"); | ||
class RedshiftAdapter extends base_1.Adapter { | ||
constructor(project) { | ||
constructor(project, dataformCoreVersion) { | ||
super(); | ||
this.project = project; | ||
this.dataformCoreVersion = dataformCoreVersion; | ||
} | ||
@@ -50,6 +52,6 @@ resolveTarget(target) { | ||
return tasks_1.Tasks.create() | ||
.add(tasks_1.Task.statement(this.createOrReplaceView(target, assertion.query))) | ||
.add(tasks_1.Task.statement(this.createOrReplaceView(target, assertion.query, true))) | ||
.add(tasks_1.Task.assertion(`select sum(1) as row_count from ${this.resolveTarget(target)}`)); | ||
} | ||
createOrReplaceView(target, query, bind = false) { | ||
createOrReplaceView(target, query, bind) { | ||
const createQuery = `create or replace view ${this.resolveTarget(target)} as ${query}`; | ||
@@ -63,5 +65,8 @@ if (bind) { | ||
if (table.type === "view") { | ||
const isBindDefined = table.redshift && table.redshift.hasOwnProperty("bind"); | ||
const bindDefaultValue = semver.gte(this.dataformCoreVersion, "1.4.1") ? false : true; | ||
const bind = isBindDefined ? table.redshift.bind : bindDefaultValue; | ||
return (tasks_1.Tasks.create() | ||
.add(tasks_1.Task.statement(this.dropIfExists(table.target, this.baseTableType(table.type)))) | ||
.add(tasks_1.Task.statement(this.createOrReplaceView(table.target, table.query, table.redshift && table.redshift.bind)))); | ||
.add(tasks_1.Task.statement(this.createOrReplaceView(table.target, table.query, bind)))); | ||
} | ||
@@ -97,2 +102,2 @@ const tempTableTarget = protos_1.dataform.Target.create({ | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkc2hpZnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9jb3JlL2FkYXB0ZXJzL3JlZHNoaWZ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0lBQUEsNkNBQTRDO0lBQzVDLGdEQUF1QztJQUN2Qyx1REFBaUM7SUFHakMsTUFBYSxlQUFnQixTQUFRLGNBQU87UUFHMUMsWUFBWSxPQUFnQztZQUMxQyxLQUFLLEVBQUUsQ0FBQztZQUNSLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3pCLENBQUM7UUFFTSxhQUFhLENBQUMsTUFBd0I7WUFDM0MsT0FBTyxJQUFJLE1BQU0sQ0FBQyxNQUFNLE1BQU0sTUFBTSxDQUFDLElBQUksR0FBRyxDQUFDO1FBQy9DLENBQUM7UUFFTSxZQUFZLENBQ2pCLEtBQXNCLEVBQ3RCLFNBQThCLEVBQzlCLGFBQXNDO1lBRXRDLE1BQU0sS0FBSyxHQUFHLGFBQUssQ0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NZXRhZGF0YS50eXBlICE9PSB0aGlzLmJhc2VUYWJsZVR5cGUodGFibGUudHlwZSkpIHtcbiAgICAgIHRhc2tzLmFkZChcbiAgICAgICAgVGFzay5zdGF0ZW1lbnQodGhpcy5kcm9wSWZFeGlzdHModGFibGUudGFyZ2V0LCB0aGlzLm9wcG9zaXRlVGFibGVUeXBlKHRhYmxlLnR5cGUpKSlcbiAgICAgICk7XG4gICAgfVxuICAgIGlmICh0YWJsZS50eXBlID09PSBcImluY3JlbWVudGFsXCIpIHtcbiAgICAgIGlmIChydW5Db25maWcuZnVsbFJlZnJlc2ggfHwgIXRhYmxlTWV0YWRhdGEgfHwgdGFibGVNZXRhZGF0YS50eXBlID09PSBcInZpZXdcIikge1xuICAgICAgICB0YXNrcy5hZGRBbGwodGhpcy5jcmVhdGVPclJlcGxhY2UodGFibGUpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIFRoZSB0YWJsZSBleGlzdHMsIGluc2VydCBuZXcgcm93cy5cbiAgICAgICAgdGFza3MuYWRkKFxuICAgICAgICAgIFRhc2suc3RhdGVtZW50KFxuICAgICAgICAgICAgdGhpcy5pbnNlcnRJbnRvKFxuICAgICAgICAgICAgICB0YWJsZS50YXJnZXQsXG4gICAgICAgICAgICAgIHRhYmxlTWV0YWRhdGEuZmllbGRzLm1hcChmID0+IGYubmFtZSksXG4gICAgICAgICAgICAgIHRoaXMud2hlcmUodGFibGUuaW5jcmVtZW50YWxRdWVyeSB8fCB0YWJsZS5xdWVyeSwgdGFibGUud2hlcmUpXG4gICAgICAgICAgICApXG4gICAgICAgICAgKVxuICAgICAgICApO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICB0YXNrcy5hZGRBbGwodGhpcy5jcmVhdGVPclJlcGxhY2UodGFibGUpKTtcbiAgICB9XG4gICAgcmV0dXJuIHRhc2tzO1xuICB9XG5cbiAgcHVibGljIGFzc2VydFRhc2tzKFxuICAgIGFzc2VydGlvbjogZGF0YWZvc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yZWRzaGlmdC5zb3J0U3R5bGV9IHNvcnRrZXkgKCR7dGFibGUucmVkc2hpZnQuc29ydEtleXMuam9pbihcbiAgICAgICAgICBcIiwgXCJcbiAgICAgICAgKX0pYDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGAke3F1ZXJ5fSBhcyAke3RhYmxlLnF1ZXJ5fWA7XG4gICAgfVxuXG4gICAgcmV0dXJuIGBjcmVhdGUgdGFibGUgJHt0aGlzLnJlc29sdmVUYXJnZXQodGFyZ2V0KX0gYXMgJHt0YWJsZS5xdWVyeX1gO1xuICB9XG5cbiAgcHVibGljIGRyb3BJZkV4aXN0cyh0YXJnZXQ6IGRhdGFmb3JtLklUYXJnZXQsIHR5cGU6IHN0cmluZykge1xuICAgIHJldHVybiBgZHJvcCAke3RoaXMuYmFzZVRhYmxlVHlwZSh0eXBlKX0gaWYgZXhpc3RzICR7dGhpcy5yZXNvbHZlVGFyZ2V0KHRhcmdldCl9IGNhc2NhZGVgO1xuICB9XG59XG4iXX0= |
/// <amd-module name="@dataform/core/adapters/snowflake" /> | ||
import { IAdapter } from "@dataform/core/adapters"; | ||
import { Adapter } from "@dataform/core/adapters/base"; | ||
import { Tasks } from "@dataform/core/tasks"; | ||
import { dataform } from "@dataform/protos"; | ||
import { Tasks } from "../tasks"; | ||
import { Adapter } from "./base"; | ||
import { IAdapter } from "./index"; | ||
export declare class SnowflakeAdapter extends Adapter implements IAdapter { | ||
private project; | ||
constructor(project: dataform.IProjectConfig); | ||
private dataformCoreVersion; | ||
constructor(project: dataform.IProjectConfig, dataformCoreVersion: string); | ||
resolveTarget(target: dataform.ITarget): string; | ||
@@ -10,0 +11,0 @@ normalizeIdentifier(identifier: string): string; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@dataform/core/adapters/snowflake", ["require", "exports", "@dataform/protos", "@dataform/core/tasks", "@dataform/core/adapters/base"], factory); | ||
define("@dataform/core/adapters/snowflake", ["require", "exports", "@dataform/core/adapters/base", "@dataform/core/tasks", "@dataform/protos"], factory); | ||
} | ||
@@ -13,9 +13,10 @@ })(function (require, exports) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const base_1 = require("@dataform/core/adapters/base"); | ||
const tasks_1 = require("@dataform/core/tasks"); | ||
const protos_1 = require("@dataform/protos"); | ||
const tasks_1 = require("@dataform/core/tasks"); | ||
const base_1 = require("@dataform/core/adapters/base"); | ||
class SnowflakeAdapter extends base_1.Adapter { | ||
constructor(project) { | ||
constructor(project, dataformCoreVersion) { | ||
super(); | ||
this.project = project; | ||
this.dataformCoreVersion = dataformCoreVersion; | ||
} | ||
@@ -67,2 +68,2 @@ resolveTarget(target) { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic25vd2ZsYWtlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vY29yZS9hZGFwdGVycy9zbm93Zmxha2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7SUFBQSw2Q0FBNEM7SUFDNUMsZ0RBQXVDO0lBQ3ZDLHVEQUFpQztJQUdqQyxNQUFhLGdCQUFpQixTQUFRLGNBQU87UUFHM0MsWUFBWSxPQUFnQztZQUMxQyxLQUFLLEVBQUUsQ0FBQztZQUNSLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3pCLENBQUM7UUFFTSxhQUFhLENBQUMsTUFBd0I7WUFDM0MsT0FBTyxJQUFJLE1BQU0sQ0FBQyxNQUFNLE1BQU0sTUFBTSxDQUFDLElBQUksR0FBRyxDQUFDO1FBQy9DLENBQUM7UUFFTSxtQkFBbUIsQ0FBQyxVQUFrQjtZQUMzQyxPQUFPLFVBQVUsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNsQyxDQUFDO1FBRU0sWUFBWSxDQUNqQixLQUFzQixFQUN0Q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J0aW9uKGBzZWxlY3Qgc3VtKDEpIGFzIHJvd19jb3VudCBmcm9tICR7dGhpcy5yZXNvbHZlVGFyZ2V0KHRhcmdldCl9YCkpO1xuICAgIHJldHVybiB0YXNrcztcbiAgfVxuXG4gIHB1YmxpYyBjcmVhdGVPclJlcGxhY2VWaWV3KHRhcmdldDogZGF0YWZvcm0uSVRhcmdldCwgcXVlcnk6IHN0cmluZykge1xuICAgIHJldHVybiBgXG4gICAgICBjcmVhdGUgb3IgcmVwbGFjZSB2aWV3ICR7dGhpcy5yZXNvbHZlVGFyZ2V0KHRhcmdldCl9IGFzICR7cXVlcnl9YDtcbiAgfVxuXG4gIHB1YmxpYyBjcmVhdGVPclJlcGxhY2UodGFibGU6IGRhdGFmb3JtLklUYWJsZSkge1xuICAgIHJldHVybiBgY3JlYXRlIG9yIHJlcGxhY2UgJHt0aGlzLmJhc2VUYWJsZVR5cGUodGFibGUudHlwZSB8fCBcInRhYmxlXCIpfSAke3RoaXMucmVzb2x2ZVRhcmdldChcbiAgICAgIHRhYmxlLnRhcmdldFxuICAgICl9IGFzICR7dGFibGUucXVlcnl9YDtcbiAgfVxufVxuIl19 |
@@ -7,2 +7,5 @@ /// <amd-module name="@dataform/core/adapters/sqldatawarehouse" /> | ||
export declare class SQLDataWarehouseAdapter extends Adapter implements IAdapter { | ||
private project; | ||
private dataformCoreVersion; | ||
constructor(project: dataform.IProjectConfig, dataformCoreVersion: string); | ||
resolveTarget(target: dataform.ITarget): string; | ||
@@ -9,0 +12,0 @@ publishTasks(table: dataform.ITable, runConfig: dataform.IRunConfig, tableMetadata: dataform.ITableMetadata): Tasks; |
@@ -16,2 +16,7 @@ (function (factory) { | ||
class SQLDataWarehouseAdapter extends base_1.Adapter { | ||
constructor(project, dataformCoreVersion) { | ||
super(); | ||
this.project = project; | ||
this.dataformCoreVersion = dataformCoreVersion; | ||
} | ||
resolveTarget(target) { | ||
@@ -84,2 +89,2 @@ return `"${target.schema}"."${target.name}"`; | ||
}); | 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gICkgXG4gICAgIGFzICR7dGFibGUucXVlcnl9YDtcbiAgfVxufVxuIl19 |
{ | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"homepage": "https://github.com/dataform-co/dataform", | ||
@@ -24,7 +24,8 @@ "license": "MIT", | ||
"dependencies": { | ||
"@dataform/protos": "1.4.1", | ||
"@dataform/sqlx": "1.4.1", | ||
"@dataform/protos": "1.4.2", | ||
"@dataform/sqlx": "1.4.2", | ||
"protobufjs": "^6.8.8", | ||
"tarjan-graph": "^2.0.0" | ||
"tarjan-graph": "^2.0.0", | ||
"semver": "^5.6.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
303925
2532
5
+ Addedsemver@^5.6.0
+ Added@dataform/protos@1.4.2(transitive)
+ Added@dataform/sqlx@1.4.2(transitive)
+ Addedsemver@5.7.2(transitive)
- Removed@dataform/protos@1.4.1(transitive)
- Removed@dataform/sqlx@1.4.1(transitive)
Updated@dataform/protos@1.4.2
Updated@dataform/sqlx@1.4.2