Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dataform/core

Package Overview
Dependencies
Maintainers
2
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dataform/core - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3

44

adapters/redshift.js

@@ -25,7 +25,7 @@ (function (factory) {

const tasks = tasks_1.Tasks.create();
if (tableMetadata && tableMetadata.type != this.baseTableType(table.type)) {
if (tableMetadata && tableMetadata.type !== this.baseTableType(table.type)) {
tasks.add(tasks_1.Task.statement(this.dropIfExists(table.target, this.oppositeTableType(table.type))));
}
if (table.type == "incremental") {
if (runConfig.fullRefresh || !tableMetadata || tableMetadata.type == "view") {
if (table.type === "incremental") {
if (runConfig.fullRefresh || !tableMetadata || tableMetadata.type === "view") {
tasks.addAll(this.createOrReplace(table));

@@ -43,3 +43,2 @@ }

assertTasks(assertion, projectConfig) {
const tasks = tasks_1.Tasks.create();
const target = assertion.target ||

@@ -50,5 +49,5 @@ protos_1.dataform.Target.create({

});
tasks.add(tasks_1.Task.statement(this.createOrReplaceView(target, assertion.query)));
tasks.add(tasks_1.Task.assertion(`select sum(1) as row_count from ${this.resolveTarget(target)}`));
return tasks;
return tasks_1.Tasks.create()
.add(tasks_1.Task.statement(this.createOrReplaceView(target, assertion.query)))
.add(tasks_1.Task.assertion(`select sum(1) as row_count from ${this.resolveTarget(target)}`));
}

@@ -60,19 +59,18 @@ createOrReplaceView(target, query) {

createOrReplace(table) {
if (table.type == "view") {
return tasks_1.Tasks.create().add(tasks_1.Task.statement(`
if (table.type === "view") {
return (tasks_1.Tasks.create()
.add(tasks_1.Task.statement(this.dropIfExists(table.target, this.baseTableType(table.type))))
.add(tasks_1.Task.statement(`
create or replace view ${this.resolveTarget(table.target)}
as ${table.query}`));
as ${table.query}`)));
}
else {
const tempTableTarget = protos_1.dataform.Target.create({
schema: table.target.schema,
name: table.target.name + "_temp"
});
const tasks = tasks_1.Tasks.create();
tasks.add(tasks_1.Task.statement(this.dropIfExists(tempTableTarget, this.baseTableType(table.type))));
tasks.add(tasks_1.Task.statement(this.createTable(table, tempTableTarget)));
tasks.add(tasks_1.Task.statement(this.dropIfExists(table.target, "table")));
tasks.add(tasks_1.Task.statement(`alter table ${this.resolveTarget(tempTableTarget)} rename to "${table.target.name}"`));
return tasks;
}
const tempTableTarget = protos_1.dataform.Target.create({
schema: table.target.schema,
name: table.target.name + "_temp"
});
return tasks_1.Tasks.create()
.add(tasks_1.Task.statement(this.dropIfExists(tempTableTarget, this.baseTableType(table.type))))
.add(tasks_1.Task.statement(this.createTable(table, tempTableTarget)))
.add(tasks_1.Task.statement(this.dropIfExists(table.target, "table")))
.add(tasks_1.Task.statement(`alter table ${this.resolveTarget(tempTableTarget)} rename to "${table.target.name}"`));
}

@@ -98,2 +96,2 @@ createTable(table, target) {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkc2hpZnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9jb3JlL2FkYXB0ZXJzL3JlZHNoaWZ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0lBQUEsNkNBQTRDO0lBQzVDLGdEQUF1QztJQUN2Qyx1REFBaUM7SUFHakMsTUFBYSxlQUFnQixTQUFRLGNBQU87UUFHMUMsWUFBWSxPQUFnQztZQUMxQyxLQUFLLEVBQUUsQ0FBQztZQUNSLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3pCLENBQUM7UUFFTSxhQUFhLENBQUMsTUFBd0I7WUFDM0MsT0FBTyxJQUFJLE1BQU0sQ0FBQyxNQUFNLE1BQU0sTUFBTSxDQUFDLElBQUksR0FBRyxDQUFDO1FBQy9DLENBQUM7UUFFTSxZQUFZLENBQ2pCLEtBQXNCLEVBQ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IpIHtcbiAgICAgIGlmIChydW5Db25maWcuZnVsbFJlZnJlc2ggfHwgIXRhYmxlTWV0YWRhdGEgfHwgdGFibGVNZXRhZGF0YS50eXBlID09PSBcInZpZXdcIikge1xuICAgICAgICB0YXNrcy5hZGRBbGwodGhpcy5jcmVhdGVPclJlcGxhY2UodGFibGUpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIFRoZSB0YWJsZSBleGlzdHMsIGluc2VydCBuZXcgcm93cy5cbiAgICAgICAgdGFza3MuYWRkKFxuICAgICAgICAgIFRhc2suc3RhdGVtZW50KFxuICAgICAgICAgICAgdGhpcy5pbnNlcnRJbnRvKFxuICAgICAgICAgICAgICB0YWJsZS50YXJnZXQsXG4gICAgICAgICAgICAgIHRhYmxlTWV0YWRhdGEuZmllbGRzLm1hcChmID0+IGYubmFtZSksXG4gICAgICAgICAgICAgIHRoaXMud2hlcmUodGFibGUucXVlcnksIHRhYmxlLndoZXJlKVxuICAgICAgICAgICAgKVxuICAgICAgICAgIClcbiAgICAgICAgKTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgdGFza3MuYWRkQWxsKHRoaXMuY3JlYXRlT3JSZXBsYWNlKHRhYmxlKSk7XG4gICAgfVxuICAgIHJldHVybiB0YXNrcztcbiAgfVxuXG4gIHB1YmxpYyBhc3NlcnRUYXNrcyhcbiAgICBhc3NlcnRpb246IGRhdGFmb3JtLklBc3NlcnRpb24sXG4gICAgcHJvamVjdENvbmZpZzogZGF0YWZvcm0uSVByb2plY3RDb25maWdcbiAgKTogVGFza3Mge1xuICAgIGNvbnN0IHRhcmdldCA9XG4gICAgICBhc3NlcnRpb24udGFyZ2V0IHx8XG4gICAgICBkYXRhZm9ybS5UYXJnZXQuY3JlYXRlKHtcbiAgICAgICAgc2NoZW1hOiBwcm9qZWN0Q29uZmlnLmFzc2VydGlvblNjaGVtYSxcbiAgICAgICAgbmFtZTogYXNzZXJ0aW9uLm5hbWVcbiAgICAgIH0pO1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hpZnQuZGlzdFN0eWxlICYmIHRhYmxlLnJlZHNoaWZ0LmRpc3RLZXkpIHtcbiAgICAgICAgcXVlcnkgPSBgJHtxdWVyeX0gZGlzdHN0eWxlICR7dGFibGUucmVkc2hpZnQuZGlzdFN0eWxlfSBkaXN0a2V5ICgke3RhYmxlLnJlZHNoaWZ0LmRpc3RLZXl9KWA7XG4gICAgICB9XG4gICAgICBpZiAodGFibGUucmVkc2hpZnQuc29ydFN0eWxlICYmIHRhYmxlLnJlZHNoaWZ0LnNvcnRLZXlzKSB7XG4gICAgICAgIHF1ZXJ5ID0gYCR7cXVlcnl9ICR7dGFibGUucmVkc2hpZnQuc29ydFN0eWxlfSBzb3J0a2V5ICgke3RhYmxlLnJlZHNoaWZ0LnNvcnRLZXlzLmpvaW4oXG4gICAgICAgICAgXCIsIFwiXG4gICAgICAgICl9KWA7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBgJHtxdWVyeX0gYXMgJHt0YWJsZS5xdWVyeX1gO1xuICAgIH1cblxuICAgIHJldHVybiBgY3JlYXRlIHRhYmxlICR7dGhpcy5yZXNvbHZlVGFyZ2V0KHRhcmdldCl9IGFzICR7dGFibGUucXVlcnl9YDtcbiAgfVxuXG4gIHB1YmxpYyBkcm9wSWZFeGlzdHModGFyZ2V0OiBkYXRhZm9ybS5JVGFyZ2V0LCB0eXBlOiBzdHJpbmcpIHtcbiAgICByZXR1cm4gYGRyb3AgJHt0aGlzLmJhc2VUYWJsZVR5cGUodHlwZSl9IGlmIGV4aXN0cyAke3RoaXMucmVzb2x2ZVRhcmdldCh0YXJnZXQpfSBjYXNjYWRlYDtcbiAgfVxufVxuIl19

@@ -7,7 +7,7 @@ {

"dependencies": {
"@dataform/protos": "1.0.0-alpha.2",
"@dataform/protos": "1.0.0-alpha.3",
"moo": "^0.5.0",
"protobufjs": "^6.8.8"
},
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"homepage": "https://github.com/dataform-co/dataform",

@@ -14,0 +14,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc