@dataform/core
Advanced tools
Comparing version 0.0.2-alpha.46 to 0.0.2-alpha.47
@@ -1,5 +0,9 @@ | ||
export declare class Adapter { | ||
import * as protos from "@dataform/protos"; | ||
export declare abstract class Adapter { | ||
where(query: string, where: string): string; | ||
baseTableType(type: string): string; | ||
oppositeTableType(type: string): "table" | "view"; | ||
insertInto(target: protos.ITarget, columns: string[], query: string): string; | ||
dropIfExists(target: protos.ITarget, type: string): string; | ||
abstract resolveTarget(target: protos.ITarget): any; | ||
} |
@@ -18,4 +18,14 @@ "use strict"; | ||
} | ||
insertInto(target, columns, query) { | ||
return ` | ||
insert into ${this.resolveTarget(target)} | ||
(${columns.join(",")}) | ||
select ${columns.join(",")} | ||
from (${query})`; | ||
} | ||
dropIfExists(target, type) { | ||
return `drop ${this.baseTableType(type)} if exists ${this.resolveTarget(target)}`; | ||
} | ||
} | ||
exports.Adapter = Adapter; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2NvcmUvYWRhcHRlcnMvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE1BQWEsT0FBTztJQUNsQixLQUFLLENBQUMsS0FBYSxFQUFFLEtBQWE7UUFDaEMsT0FBTztVQUNELEtBQUs7Z0JBQ0MsS0FBSyxFQUFFLENBQUM7SUFDdEIsQ0FBQztJQUVELGFBQWEsQ0FBQyxJQUFZO1FBQ3hCLElBQUksSUFBSSxJQUFJLGFBQWEsRUFBRTtZQUN6QixPQUFPLE9BQU8sQ0FBQztTQUNoQjtRQUNELE9BQU8sSUFBSSxDQUFDO0lBQ2QsQ0FBQztJQUVELGlCQUFpQixDQUFDLElBQVk7UUFDNUIsT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsTUFBTSx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ElBQUksQ0FBQyxjQUFjLElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztJQUNwRixDQUFDO0NBR0Y7QUEvQkQsMEJBK0JDIn0= |
@@ -9,9 +9,7 @@ import * as protos from "@dataform/protos"; | ||
resolveTarget(target: protos.ITarget): string; | ||
materializeTasks(m: protos.IMaterialization, runConfig: protos.IRunConfig, table: protos.ITable): Tasks; | ||
publishTasks(t: protos.ITable, runConfig: protos.IRunConfig, tableMetadata: protos.ITableMetadata): Tasks; | ||
assertTasks(a: protos.IAssertion, projectConfig: protos.IProjectConfig): Tasks; | ||
createEmptyIfNotExists(m: protos.IMaterialization): string; | ||
createOrReplace(m: protos.IMaterialization): string; | ||
createEmptyIfNotExists(t: protos.ITable): string; | ||
createOrReplace(t: protos.ITable): string; | ||
createOrReplaceView(target: protos.ITarget, query: string): string; | ||
insertInto(target: protos.ITarget, columns: string[], query: string): string; | ||
dropIfExists(target: protos.ITarget, type: string): string; | ||
} |
@@ -15,17 +15,17 @@ "use strict"; | ||
} | ||
materializeTasks(m, runConfig, table) { | ||
publishTasks(t, runConfig, tableMetadata) { | ||
var tasks = tasks_1.Tasks.create(); | ||
if (table && table.type != this.baseTableType(m.type)) { | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(m.target, this.oppositeTableType(m.type)))); | ||
if (tableMetadata && tableMetadata.type != this.baseTableType(t.type)) { | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(t.target, this.oppositeTableType(t.type)))); | ||
} | ||
if (m.type == "incremental") { | ||
if (runConfig.fullRefresh || !table || table.type == "view") { | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(m))); | ||
if (t.type == "incremental") { | ||
if (runConfig.fullRefresh || !tableMetadata || tableMetadata.type == "view") { | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(t))); | ||
} | ||
else { | ||
tasks.add(tasks_1.Task.statement(this.insertInto(m.target, Object.keys(m.descriptor), this.where(m.query, m.where)))); | ||
tasks.add(tasks_1.Task.statement(this.insertInto(t.target, tableMetadata.fields.map(f => f.name), this.where(t.query, t.where)))); | ||
} | ||
} | ||
else { | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(m))); | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(t))); | ||
} | ||
@@ -44,7 +44,7 @@ return tasks; | ||
} | ||
createEmptyIfNotExists(m) { | ||
return `create ${this.baseTableType(m.type)} if not exists ${this.resolveTarget(m.target)} ${m.bigquery && m.bigquery.partitionBy ? `partition by ${m.bigquery.partitionBy}` : ""} as ${this.where(m.query, "false")}`; | ||
createEmptyIfNotExists(t) { | ||
return `create ${this.baseTableType(t.type)} if not exists ${this.resolveTarget(t.target)} ${t.bigquery && t.bigquery.partitionBy ? `partition by ${t.bigquery.partitionBy}` : ""} as ${this.where(t.query, "false")}`; | ||
} | ||
createOrReplace(m) { | ||
return `create or replace ${this.baseTableType(m.type)} ${this.resolveTarget(m.target)} ${m.bigquery && m.bigquery.partitionBy ? `partition by ${m.bigquery.partitionBy}` : ""} as ${m.query}`; | ||
createOrReplace(t) { | ||
return `create or replace ${this.baseTableType(t.type)} ${this.resolveTarget(t.target)} ${t.bigquery && t.bigquery.partitionBy ? `partition by ${t.bigquery.partitionBy}` : ""} as ${t.query}`; | ||
} | ||
@@ -55,12 +55,4 @@ createOrReplaceView(target, query) { | ||
} | ||
insertInto(target, columns, query) { | ||
return ` | ||
insert ${this.resolveTarget(target)} (${columns.join(",")}) | ||
${query}`; | ||
} | ||
dropIfExists(target, type) { | ||
return `drop ${type} if exists ${this.resolveTarget(target)}`; | ||
} | ||
} | ||
exports.BigQueryAdapter = BigQueryAdapter; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmlncXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb3JlL2FkYXB0ZXJzL2JpZ3F1ZXJ5LnRzIl0sIm5hbWVzIjpbX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0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGtCQUFrQixJQUFJLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsSUFDdkYsQ0FBQyxDQUFDLFFBQVEsSUFBSSxDQUFDLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQ3BGLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxFQUFFLENBQUM7SUFDeEMsQ0FBQztJQUVELGVBQWUsQ0FBQyxDQUFnQjtRQUM5QixPQUFPLHFCQUFxQixJQUFJLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxJQUFJLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsSUFDcEYsQ0FBQyxDQUFDLFFBQVEsSUFBSSxDQUFDLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQ3BGLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ25CLENBQUM7SUFFRCxtQkFBbUIsQ0FBQyxNQUFzQixFQUFFLEtBQWE7UUFDdkQsT0FBTzsrQkFDb0IsSUFBSSxDQUFDLGFBQWEsQ0FBQyxNQUFNLENBQUMsT0FBTyxLQUFLLEVBQUUsQ0FBQztJQUN0RSxDQUFDO0NBQ0Y7QUE1REQsMENBNERDIn0= |
@@ -5,4 +5,4 @@ import * as protos from "@dataform/protos"; | ||
resolveTarget(target: protos.ITarget): string; | ||
materializeTasks(materialization: protos.IMaterialization, runConfig: protos.IRunConfig, table: protos.ITable): Tasks; | ||
assertTasks(materialization: protos.IAssertion, projectConfig: protos.IProjectConfig): Tasks; | ||
publishTasks(table: protos.ITable, runConfig: protos.IRunConfig, tableMetadata: protos.ITableMetadata): Tasks; | ||
assertTasks(assertion: protos.IAssertion, projectConfig: protos.IProjectConfig): Tasks; | ||
} | ||
@@ -9,0 +9,0 @@ export interface AdapterConstructor<T extends IAdapter> { |
@@ -9,9 +9,7 @@ import * as protos from "@dataform/protos"; | ||
resolveTarget(target: protos.ITarget): string; | ||
materializeTasks(m: protos.IMaterialization, runConfig: protos.IRunConfig, table: protos.ITable): Tasks; | ||
publishTasks(t: protos.ITable, runConfig: protos.IRunConfig, tableMetadata: protos.ITableMetadata): Tasks; | ||
assertTasks(a: protos.IAssertion, projectConfig: protos.IProjectConfig): Tasks; | ||
createOrReplaceView(target: protos.ITarget, query: string): string; | ||
createOrReplace(m: protos.IMaterialization): Tasks; | ||
createTable(m: protos.IMaterialization, tempTableTarget: any): string; | ||
insertInto(target: protos.ITarget, columns: string[], query: string): string; | ||
dropIfExists(target: protos.ITarget, type: string): string; | ||
createOrReplace(t: protos.ITable): Tasks; | ||
createTable(t: protos.ITable, target: protos.ITarget): string; | ||
} |
@@ -14,17 +14,17 @@ "use strict"; | ||
} | ||
materializeTasks(m, runConfig, table) { | ||
publishTasks(t, runConfig, tableMetadata) { | ||
var tasks = tasks_1.Tasks.create(); | ||
if (table && table.type != this.baseTableType(m.type)) { | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(m.target, this.oppositeTableType(m.type)))); | ||
if (tableMetadata && tableMetadata.type != this.baseTableType(t.type)) { | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(t.target, this.oppositeTableType(t.type)))); | ||
} | ||
if (m.type == "incremental") { | ||
if (runConfig.fullRefresh || !table || table.type == "view") { | ||
tasks.addAll(this.createOrReplace(m)); | ||
if (t.type == "incremental") { | ||
if (runConfig.fullRefresh || !tableMetadata || tableMetadata.type == "view") { | ||
tasks.addAll(this.createOrReplace(t)); | ||
} | ||
else { | ||
tasks.add(tasks_1.Task.statement(this.insertInto(m.target, Object.keys(m.descriptor), this.where(m.query, m.where)))); | ||
tasks.add(tasks_1.Task.statement(this.insertInto(t.target, tableMetadata.fields.map(f => f.name), this.where(t.query, t.where)))); | ||
} | ||
} | ||
else { | ||
tasks.addAll(this.createOrReplace(m)); | ||
tasks.addAll(this.createOrReplace(t)); | ||
} | ||
@@ -47,45 +47,36 @@ return tasks; | ||
} | ||
createOrReplace(m) { | ||
if (m.type == "view") { | ||
createOrReplace(t) { | ||
if (t.type == "view") { | ||
return tasks_1.Tasks.create().add(tasks_1.Task.statement(` | ||
create or replace view ${this.resolveTarget(m.target)} | ||
as ${m.query}`)); | ||
create or replace view ${this.resolveTarget(t.target)} | ||
as ${t.query}`)); | ||
} | ||
else { | ||
const tempTableTarget = protos.Target.create({ | ||
schema: m.target.schema, | ||
name: m.target.name + "_temp" | ||
schema: t.target.schema, | ||
name: t.target.name + "_temp" | ||
}); | ||
const tasks = tasks_1.Tasks.create(); | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(tempTableTarget, this.baseTableType(m.type)))); | ||
tasks.add(tasks_1.Task.statement(this.createTable(m, tempTableTarget))); | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(m.target, "table"))); | ||
tasks.add(tasks_1.Task.statement(`alter table ${this.resolveTarget(tempTableTarget)} rename to "${m.target.name}"`)); | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(tempTableTarget, this.baseTableType(t.type)))); | ||
tasks.add(tasks_1.Task.statement(this.createTable(t, tempTableTarget))); | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(t.target, "table"))); | ||
tasks.add(tasks_1.Task.statement(`alter table ${this.resolveTarget(tempTableTarget)} rename to "${t.target.name}"`)); | ||
return tasks; | ||
} | ||
} | ||
createTable(m, tempTableTarget) { | ||
if (m.redshift) { | ||
let query = `create table ${this.resolveTarget(tempTableTarget)}`; | ||
if (m.redshift.distStyle && m.redshift.distKey) { | ||
query = `${query} diststyle ${m.redshift.distStyle} distkey (${m.redshift.distKey})`; | ||
createTable(t, target) { | ||
if (t.redshift) { | ||
let query = `create table ${this.resolveTarget(target)}`; | ||
if (t.redshift.distStyle && t.redshift.distKey) { | ||
query = `${query} diststyle ${t.redshift.distStyle} distkey (${t.redshift.distKey})`; | ||
} | ||
if (m.redshift.sortStyle && m.redshift.sortKeys) { | ||
query = `${query} ${m.redshift.sortStyle} sortkey (${m.redshift.sortKeys.join(", ")})`; | ||
if (t.redshift.sortStyle && t.redshift.sortKeys) { | ||
query = `${query} ${t.redshift.sortStyle} sortkey (${t.redshift.sortKeys.join(", ")})`; | ||
} | ||
return `${query} as ${m.query}`; | ||
return `${query} as ${t.query}`; | ||
} | ||
return `create table ${this.resolveTarget(tempTableTarget)} as ${m.query}`; | ||
return `create table ${this.resolveTarget(target)} as ${t.query}`; | ||
} | ||
insertInto(target, columns, query) { | ||
return ` | ||
insert into ${this.resolveTarget(target)} | ||
(${columns.join(",")}) | ||
${query}`; | ||
} | ||
dropIfExists(target, type) { | ||
return `drop ${type} if exists ${this.resolveTarget(target)}`; | ||
} | ||
} | ||
exports.RedshiftAdapter = RedshiftAdapter; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkc2hpZnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb3JlL2FkYXB0ZXJzL3JlZHNoaWZ0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkNBQTJDO0FBRTNDLGlDQUFpQztBQUNqQyxvQ0FBdUM7QUFFdkMsTUFBYSxlQUFnQixTQUFRLGNBQU87SUFHMUMsWUFBWSxPQUE4QjtRQUN4QyxLQUFLLEVBQUUsQ0FBQztRQUNSLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO0lBQ3pCLENBQUM7SUFFRCxhQUFhLENBQUMsTUFBc0I7UUFDbEM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QUFDLFFBQVEsRUFBRTtZQUNkLElBQUksS0FBSyxHQUFHLGdCQUFnQixJQUFJLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7WUFFekQsSUFBSSxDQUFDLENBQUMsUUFBUSxDQUFDLFNBQVMsSUFBSSxDQUFDLENBQUMsUUFBUSxDQUFDLE9BQU8sRUFBRTtnQkFDOUMsS0FBSyxHQUFHLEdBQUcsS0FBSyxjQUFjLENBQUMsQ0FBQyxRQUFRLENBQUMsU0FBUyxhQUFhLENBQUMsQ0FBQyxRQUFRLENBQUMsT0FBTyxHQUFHLENBQUM7YUFDdEY7WUFDRCxJQUFJLENBQUMsQ0FBQyxRQUFRLENBQUMsU0FBUyxJQUFJLENBQUMsQ0FBQyxRQUFRLENBQUMsUUFBUSxFQUFFO2dCQUMvQyxLQUFLLEdBQUcsR0FBRyxLQUFLLElBQUksQ0FBQyxDQUFDLFFBQVEsQ0FBQyxTQUFTLGFBQWEsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUM7YUFDeEY7WUFFRCxPQUFPLEdBQUcsS0FBSyxPQUFPLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztTQUNqQztRQUVELE9BQU8sZ0JBQWdCLElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3BFLENBQUM7Q0FDRjtBQXZGRCwwQ0F1RkMifQ== |
@@ -9,8 +9,6 @@ import * as protos from "@dataform/protos"; | ||
resolveTarget(target: protos.ITarget): string; | ||
materializeTasks(m: protos.IMaterialization, runConfig: protos.IRunConfig, table: protos.ITable): Tasks; | ||
publishTasks(t: protos.ITable, runConfig: protos.IRunConfig, tableMetadata: protos.ITableMetadata): Tasks; | ||
assertTasks(a: protos.IAssertion, projectConfig: protos.IProjectConfig): Tasks; | ||
createOrReplaceView(target: protos.ITarget, query: string): string; | ||
createOrReplace(m: protos.IMaterialization): string; | ||
insertInto(target: protos.ITarget, columns: string[], query: string): string; | ||
dropIfExists(target: protos.ITarget, type: string): string; | ||
createOrReplace(t: protos.ITable): string; | ||
} |
@@ -14,17 +14,17 @@ "use strict"; | ||
} | ||
materializeTasks(m, runConfig, table) { | ||
publishTasks(t, runConfig, tableMetadata) { | ||
var tasks = tasks_1.Tasks.create(); | ||
if (table && table.type != this.baseTableType(m.type)) { | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(m.target, this.oppositeTableType(m.type)))); | ||
if (tableMetadata && tableMetadata.type != this.baseTableType(t.type)) { | ||
tasks.add(tasks_1.Task.statement(this.dropIfExists(t.target, this.oppositeTableType(t.type)))); | ||
} | ||
if (m.type == "incremental") { | ||
if (runConfig.fullRefresh || !table || table.type == "view") { | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(m))); | ||
if (t.type == "incremental") { | ||
if (runConfig.fullRefresh || !tableMetadata || tableMetadata.type == "view") { | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(t))); | ||
} | ||
else { | ||
tasks.add(tasks_1.Task.statement(this.insertInto(m.target, Object.keys(m.descriptor), this.where(m.query, m.where)))); | ||
tasks.add(tasks_1.Task.statement(this.insertInto(t.target, tableMetadata.fields.map(f => f.name), this.where(t.query, t.where)))); | ||
} | ||
} | ||
else { | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(m))); | ||
tasks.add(tasks_1.Task.statement(this.createOrReplace(t))); | ||
} | ||
@@ -47,16 +47,7 @@ return tasks; | ||
} | ||
createOrReplace(m) { | ||
return `create or replace ${this.baseTableType(m.type || "table")} ${this.resolveTarget(m.target)} as ${m.query}`; | ||
createOrReplace(t) { | ||
return `create or replace ${this.baseTableType(t.type || "table")} ${this.resolveTarget(t.target)} as ${t.query}`; | ||
} | ||
insertInto(target, columns, query) { | ||
return ` | ||
insert into ${this.resolveTarget(target)} | ||
(${columns.join(",")}) | ||
${query}`; | ||
} | ||
dropIfExists(target, type) { | ||
return `drop ${this.baseTableType(type)} if exists ${this.resolveTarget(target)}`; | ||
} | ||
} | ||
exports.SnowflakeAdapter = SnowflakeAdapter; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic25vd2ZsYWtlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vY29yZS9hZGFwdGVycy9zbm93Zmxha2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQ0FBMkM7QUFFM0MsaUNBQWlDO0FBQ2pDLG9DQUF1QztBQUV2QyxNQUFhLGdCQUFpQixTQUFRLGNBQU87SUFHM0MsWUFBWSxPQUE4QjtRQUN4QyxLQUFLLEVBQUUsQ0FBQztRQUNSLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO0lBQ3pCLENBQUM7SUFFRCxhQUFhLENBQUMsTUFBc0I7UUFDbEMsT0FBTyxJQUFJLE1BQU0sQ0FBQyxNQUFNLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxhQUFhLE1BQU0sTUFBTSxDQUFDLElBQUksR0FBRyxDQUFDO0lBQzdFLENBQUM7SUFFRCxnQkFBZ0IsQ0FBQyxDQUEwQixFQUFFLFNBQTRCLEVBQUUsS0FBb0I7UUFDN0YsSUFBSSxLQUFLLEdBQUcsYUFBSyxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBRTNCLElBQUksS0FBSyxJQUFJLEtBQUssQ0FBQyxJQUFJLElBQUksSUFBSSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUU7WUFDckQsS0FBSyxDQUFDLEdBQUcsQ0FBQyxZQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsaUJBQWlCLENBQUMsQ0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DLE1BQU0sQ0FBQztZQUN6QyxNQUFNLEVBQUUsYUFBYSxDQUFDLGVBQWU7WUFDckMsSUFBSSxFQUFFLENBQUMsQ0FBQyxJQUFJO1NBQ2IsQ0FBQyxDQUFDO1FBQ0gsS0FBSyxDQUFDLEdBQUcsQ0FBQyxZQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxlQUFlLEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUM5RSxLQUFLLENBQUMsR0FBRyxDQUFDLFlBQUksQ0FBQyxTQUFTLENBQUMsMkJBQTJCLElBQUksQ0FBQyxhQUFhLENBQUMsZUFBZSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7UUFDNUYsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDO0lBRUQsbUJBQW1CLENBQUMsTUFBc0IsRUFBRSxLQUFhO1FBQ3ZELE9BQU87K0JBQ29CLElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLE9BQU8sS0FBSyxFQUFFLENBQUM7SUFDdEUsQ0FBQztJQUVELGVBQWUsQ0FBQyxDQUFnQjtRQUM5QixPQUFPLHFCQUFxQixJQUFJLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksSUFBSSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3BILENBQUM7Q0FDRjtBQWxERCw0Q0FrREMifQ== |
export declare function compile(code: string, path: string): string; | ||
export declare function compileMaterializationSql(code: string, path: string): string; | ||
export declare function compileTableSql(code: string, path: string): string; | ||
export declare function compileOperationSql(code: string, path: string): string; | ||
@@ -4,0 +4,0 @@ export declare function compileAssertionSql(code: string, path: string): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const utils = require("./utils"); | ||
const materialization_1 = require("./materialization"); | ||
const table_1 = require("./table"); | ||
const operation_1 = require("./operation"); | ||
@@ -15,3 +15,3 @@ const assertion_1 = require("./assertion"); | ||
if (path.endsWith(".sql")) { | ||
return compileMaterializationSql(code, path); | ||
return compileTableSql(code, path); | ||
} | ||
@@ -21,7 +21,8 @@ return code; | ||
exports.compile = compile; | ||
function compileMaterializationSql(code, path) { | ||
function compileTableSql(code, path) { | ||
var { sql, js } = extractJsBlocks(code); | ||
var functionsBindings = getFunctionPropertyNames(materialization_1.MaterializationContext.prototype).map(name => `const ${name} = !!ctx.${name} ? ctx.${name}.bind(ctx) : () => "";`); | ||
var functionsBindings = getFunctionPropertyNames(table_1.TableContext.prototype).map(name => `const ${name} = !!ctx.${name} ? ctx.${name}.bind(ctx) : () => "";`); | ||
return ` | ||
materialize("${utils.baseFilename(path)}").query(ctx => { | ||
const publish = global.publish || global.materialize; | ||
publish("${utils.baseFilename(path)}").query(ctx => { | ||
${functionsBindings.join("\n")} | ||
@@ -32,3 +33,3 @@ ${js} | ||
} | ||
exports.compileMaterializationSql = compileMaterializationSql; | ||
exports.compileTableSql = compileTableSql; | ||
function compileOperationSql(code, path) { | ||
@@ -82,2 +83,2 @@ var { sql, js } = extractJsBlocks(code); | ||
exports.getFunctionPropertyNames = getFunctionPropertyNames; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vY29yZS9jb21waWxlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpQ0FBaUM7QUFDakMsdURBQTJEO0FBQzNELDJDQUErQztBQUMvQywyQ0FBK0M7QUFFL0MsU0FBZ0IsT0FBTyxDQUFDLElBQVksRUFBRSxJQUFZO0lBQ2hELElBQUksSUFBSSxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsRUFBRT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DLE1BQU0sQ0FBQyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsR0FBRztRQUNwRSxJQUFJLENBQUMsSUFBSSxHQUFHLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLE9BQU8sU0FBUyxDQUFDLENBQUMsQ0FBQyxJQUFJLFVBQVU7WUFBRSxPQUFPLElBQUksQ0FBQztJQUN4RSxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFKRCw0REFJQyJ9 |
import * as protos from "@dataform/protos"; | ||
import { Session } from "./session"; | ||
import { Materialization, MaterializationContext, MConfig } from "./materialization"; | ||
import { Table, TableContext, TConfig } from "./table"; | ||
import { Operation, OContextable } from "./operation"; | ||
@@ -10,5 +10,6 @@ import { Assertion, AContextable } from "./assertion"; | ||
import * as tasks from "./tasks"; | ||
export { adapters, utils, compilers, tasks, Session, Materialization, MaterializationContext, MConfig, Operation, Assertion }; | ||
export { adapters, utils, compilers, tasks, Session, Table, TableContext, TConfig, Operation, Assertion }; | ||
export declare const session: any; | ||
export declare const materialize: (name: string, queryOrConfig?: string | MConfig | ((ctx: MaterializationContext) => string)) => any; | ||
export declare const publish: (name: string, queryOrConfig?: string | TConfig | ((ctx: TableContext) => string)) => any; | ||
export declare const materialize: (name: string, queryOrConfig?: string | TConfig | ((ctx: TableContext) => string)) => any; | ||
export declare const operate: (name: string, statement?: OContextable<string | string[]>) => any; | ||
@@ -15,0 +16,0 @@ export declare const assert: (name: string, query?: AContextable<string>) => any; |
15
index.js
@@ -5,5 +5,5 @@ "use strict"; | ||
exports.Session = session_1.Session; | ||
const materialization_1 = require("./materialization"); | ||
exports.Materialization = materialization_1.Materialization; | ||
exports.MaterializationContext = materialization_1.MaterializationContext; | ||
const table_1 = require("./table"); | ||
exports.Table = table_1.Table; | ||
exports.TableContext = table_1.TableContext; | ||
const operation_1 = require("./operation"); | ||
@@ -35,3 +35,4 @@ exports.Operation = operation_1.Operation; | ||
global._DF_SESSION = exports.session; | ||
exports.materialize = (name, queryOrConfig) => exports.session.materialize(name, queryOrConfig); | ||
exports.publish = (name, queryOrConfig) => exports.session.publish(name, queryOrConfig); | ||
exports.materialize = exports.publish; | ||
exports.operate = (name, statement) => exports.session.operate(name, statement); | ||
@@ -42,6 +43,6 @@ exports.assert = (name, query) => exports.session.assert(name, query); | ||
global.session = exports.session; | ||
global.materialize = exports.materialize; | ||
global.publish = exports.materialize; | ||
global.materialize = exports.publish; | ||
global.publish = exports.publish; | ||
global.operate = exports.operate; | ||
global.assert = exports.assert; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9jb3JlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsdUNBQW9DO0FBbUJsQyxrQkFuQk8saUJBQU8sQ0FtQlA7QUFsQlQsdURBQW1HO0FBbUJqRywwQkFuQk8saUNBQWUsQ0FtQlA7QUFDZixpQ0FwQndCLHdDQUFzQixDQW9CeEI7QUFuQnhCLDJDQUFzRDtBQXFCcEQsb0JBckJPLHFCQUFTLENBcUJQO0FBcEJYLDJDQUFzRDtBQXFCcEQsb0JBckJPLHFCQUFTLENBcUJQO0FBakJYLHVDQUF1QztBQVFyQyw0QkFBUTtBQVBWLGlDQUFpQztBQVEvQixzQkFBSztBQVBQLHlDQUF5QztBQVF2Qyw4QkFBUztBQVBYLGlDQUFpQztBQVEvQixzQkFBSztBQVdQLElBQUksT0FBTyxDQUFDLFVBQVUsRUFBRTtJQUN0QixPQUFPLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxHQUFHLFVBQVMsTUFBVyxFQUFFLElBQVk7UUFDN0QsSUFBSSxVQUFVLEdBQUcsTUFBTSxDQUFDLFFBQVEsQ0FBQztRQUNqQyxNQUFNLENBQUMsUUFBUSxHQUFHLFVBQVMsSUFBSSxFQUFFLElBQUk7WUF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UFBTyxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDckYsUUFBQSxPQUFPLEdBQUcsR0FBRyxFQUFFLENBQUMsZUFBTyxDQUFDLE9BQU8sRUFBRSxDQUFDO0FBQ2xDLFFBQUEsSUFBSSxHQUFHLENBQUMsT0FBZSxFQUFFLGFBQXFDLEVBQUUsRUFBRSxDQUFDLGVBQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLGFBQWEsQ0FBQyxDQUFDO0FBRXBILE1BQWMsQ0FBQyxPQUFPLEdBQUcsZUFBTyxDQUFDO0FBQ2pDLE1BQWMsQ0FBQyxXQUFXLEdBQUcsZUFBTyxDQUFDO0FBQ3JDLE1BQWMsQ0FBQyxPQUFPLEdBQUcsZUFBTyxDQUFDO0FBQ2pDLE1BQWMsQ0FBQyxPQUFPLEdBQUcsZUFBTyxDQUFDO0FBQ2pDLE1BQWMsQ0FBQyxNQUFNLEdBQUcsY0FBTSxDQUFDIn0= |
{ | ||
"name": "@dataform/core", | ||
"version": "0.0.2-alpha.46", | ||
"version": "0.0.2-alpha.47", | ||
"description": "Dataform core API.", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@dataform/protos": "^0.0.2-alpha.46", | ||
"@dataform/protos": "^0.0.2-alpha.47", | ||
"protobufjs": "^6.8.8" | ||
@@ -15,3 +15,3 @@ }, | ||
}, | ||
"gitHead": "23961fd8c42140c0c29e7ef39d056d811364c314" | ||
"gitHead": "d9d906ad691820dbf1e5f5b3211712ed1559d813" | ||
} |
import * as protos from "@dataform/protos"; | ||
import * as adapters from "./adapters"; | ||
import { Materialization, MContextable, MConfig } from "./materialization"; | ||
import { Table, TContextable, TConfig } from "./table"; | ||
import { Operation, OContextable } from "./operation"; | ||
@@ -9,4 +9,4 @@ import { Assertion, AContextable } from "./assertion"; | ||
config: protos.IProjectConfig; | ||
materializations: { | ||
[name: string]: Materialization; | ||
tables: { | ||
[name: string]: Table; | ||
}; | ||
@@ -27,4 +27,4 @@ operations: { | ||
operate(name: string, queries?: OContextable<string | string[]>): Operation; | ||
materialize(name: string, queryOrConfig?: MContextable<string> | MConfig): Materialization; | ||
publish(name: string, queryOrConfig?: MContextable<string> | MConfig): Materialization; | ||
materialize(name: string, queryOrConfig?: TContextable<string> | TConfig): Table; | ||
publish(name: string, queryOrConfig?: TContextable<string> | TConfig): Table; | ||
assert(name: string, query?: AContextable<string>): Assertion; | ||
@@ -34,5 +34,5 @@ validationError(message: string): void; | ||
compileGraphChunk(part: { | ||
[name: string]: Materialization | Operation | Assertion; | ||
[name: string]: Table | Operation | Assertion; | ||
}): Array<any>; | ||
compile(): protos.ICompiledGraph; | ||
} |
@@ -6,3 +6,3 @@ "use strict"; | ||
const utils = require("./utils"); | ||
const materialization_1 = require("./materialization"); | ||
const table_1 = require("./table"); | ||
const operation_1 = require("./operation"); | ||
@@ -17,3 +17,3 @@ const assertion_1 = require("./assertion"); | ||
this.config = projectConfig || { defaultSchema: "dataform" }; | ||
this.materializations = {}; | ||
this.tables = {}; | ||
this.operations = {}; | ||
@@ -41,6 +41,6 @@ this.assertions = {}; | ||
ref(name) { | ||
const mNode = this.materializations[name]; | ||
const tNode = this.tables[name]; | ||
const oNode = this.operations[name]; | ||
if (mNode) { | ||
return this.adapter().resolveTarget(mNode.proto.target); | ||
if (tNode) { | ||
return this.adapter().resolveTarget(tNode.proto.target); | ||
} | ||
@@ -71,21 +71,21 @@ else if (oNode && oNode.proto.hasOutput) { | ||
publish(name, queryOrConfig) { | ||
if (this.materializations[name]) { | ||
const message = `Duplicate node name detected, names must be unique across materializations, assertions, and operations: "${name}"`; | ||
if (this.tables[name]) { | ||
const message = `Duplicate node name detected, names must be unique across tables, assertions, and operations: "${name}"`; | ||
this.validationError(message); | ||
} | ||
const materialization = new materialization_1.Materialization(); | ||
materialization.session = this; | ||
materialization.proto.name = name; | ||
materialization.proto.target = this.target(name); | ||
const table = new table_1.Table(); | ||
table.session = this; | ||
table.proto.name = name; | ||
table.proto.target = this.target(name); | ||
if (!!queryOrConfig) { | ||
if (typeof queryOrConfig === "object") { | ||
materialization.config(queryOrConfig); | ||
table.config(queryOrConfig); | ||
} | ||
else { | ||
materialization.query(queryOrConfig); | ||
table.query(queryOrConfig); | ||
} | ||
} | ||
materialization.proto.fileName = utils.getCallerFile(this.rootDir); | ||
this.materializations[name] = materialization; | ||
return materialization; | ||
table.proto.fileName = utils.getCallerFile(this.rootDir); | ||
this.tables[name] = table; | ||
return table; | ||
} | ||
@@ -129,3 +129,3 @@ assert(name, query) { | ||
projectConfig: this.config, | ||
materializations: this.compileGraphChunk(this.materializations), | ||
tables: this.compileGraphChunk(this.tables), | ||
operations: this.compileGraphChunk(this.operations), | ||
@@ -136,7 +136,7 @@ assertions: this.compileGraphChunk(this.assertions), | ||
}); | ||
var allNodes = [].concat(compiledGraph.materializations, compiledGraph.assertions, compiledGraph.operations); | ||
var allNodes = [].concat(compiledGraph.tables, compiledGraph.assertions, compiledGraph.operations); | ||
var allNodeNames = allNodes.map(node => node.name); | ||
allNodes.forEach(node => { | ||
if (allNodes.filter(subNode => subNode.name == node.name).length > 1) { | ||
const message = `Duplicate node name detected, names must be unique across materializations, assertions, and operations: "${node.name}"`; | ||
const message = `Duplicate node name detected, names must be unique across tables, assertions, and operations: "${node.name}"`; | ||
this.validationError(message); | ||
@@ -182,2 +182,2 @@ } | ||
exports.Session = Session; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2NvcmUvc2Vzc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJDQUEyQztBQUMzQyx1Q0FBdUM7QUFDdkMsaUNBQWlDO0FBQ2pDLHVEQUEyRTtBQUMzRSwyQ0FBc0Q7QUFDdEQsMkNBQXNEO0FBRXRELE1B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