JS API reference

Tables, operations, and assertions can all be defined in JavaScript, for more more advanced use cases. The following methods are globally available, or can be explicitly required from @dataform/core.

publish()

Returns a new Table with the given name.

publish(name)
publish(name, query)
publish(name, config)

Arguments

FieldTypeDescription
namestringThe name of the table
queryContextable<string>The query for the table
configTableConfigThe configuration object for this table

operate()

Returns a new Operation with the given name.

operate(name, queries?)

Arguments

FieldTypeDescription
namestringThe name of the operation
queriesContextable<string | string>The query for the table

assert()

Returns a new Assertion with the given name.

assert(name, query)

Arguments

FieldTypeDescription
namestringThe name of the assertion
queriesContextable<string>The query for the assertion