All project JSON files are in a template defined by Jsonnet files. Jsonnet is based on JSON syntax. Valid JSON is also valid Jsonnet. In addition, Jsonnet offers more language constructs, such as conditions, cycles, and variables.
In addition to the standard Jsonnet functions, the following functions are also available:
ConfigId(string configId) string
my-config
.5038695485
.ConfigId
function is primarily used in the template manifest but can be used in any Jsonnet file.For example, a bucket ID that contains a configuration ID can be composed in this way:
{
storage: {
input: {
tables: [
{source: "in.c-keboola-ex-aws-s3-" + ConfigId("config-with-output-mapping") + ".table"},
],
},
},
}
ConfigRowId(string rowId) string
ConfigId
, but for configuration rows.Input(string inputId) string
false
:
0
for int
, false
for bool
, etc.Example:
{
parameters: {
api: {
baseUrl: Input("base-url"),
},
},
}
InputIsAvailable(string inputId) string
true
if the input has been filled in by the user and false
if the step has been skipped or showIf = false
.InstanceId() string
V1StGXR8IZ5jdHi6BAmyT
InstanceIdShort() string
V1StGXR8
ComponentIsAvailable(string componentId) bool
true
if the component is available; otherwise, it returns false
.SnowflakeWriterComponentId() string
componentId
of the Snowflake writer.
keboola.wr-db-snowflake
for AWS stacks.keboola.wr-snowflake-blob-storage
for Azure stacks.HasProjectBackend(backend string) bool
true
if the backend is available; otherwise, it returns false
.