{{now}}
-Usage: {{now}}. -Example: The time is {{now}}.
+Get the date and time at the moment of execution.
+Usage
+{{now}}
+
+Example
+The time is {{now}}.
+
+This gives you the date/time at present.
diff --git a/DataWarehouseAutomation/Sample_Templates/TemplateSampleCustomFunctions.Handlebars b/DataWarehouseAutomation/Sample_Templates/TemplateSampleCustomFunctions.Handlebars index c4606a2..7c9c536 100644 --- a/DataWarehouseAutomation/Sample_Templates/TemplateSampleCustomFunctions.Handlebars +++ b/DataWarehouseAutomation/Sample_Templates/TemplateSampleCustomFunctions.Handlebars @@ -19,6 +19,8 @@ This is {{space "Roelant"}} ...spaced out. This replaces the a's in Roelant with an !: {{StringReplace "Roelant" "a" "!"}} +This adds brackets around the string vlue: {{stringwrap "Example" "[" "]"}} + {{!-- Demonstrating the array lookup --}} {{#each dataObjectMappings}} Working on mapping {{name}} diff --git a/docs/_site/handlebars/extension_now.html b/docs/_site/handlebars/extension_now.html index f3ca714..e421cd4 100644 --- a/docs/_site/handlebars/extension_now.html +++ b/docs/_site/handlebars/extension_now.html @@ -78,8 +78,14 @@
Usage: {{now}}. -Example: The time is {{now}}.
+Get the date and time at the moment of execution.
+{{now}}
+
+The time is {{now}}.
+
+This gives you the date/time at present.
Generated a random string no longer than the provided characters as integer input.
+{{randomstring 10}}.
+
+And here is a random string: {{randomstring 10}}.
+
+This will result in
+Generate a random date somewhere higher than the provided characters as four-digit integer (year) input.
+This was originally added to generate test data, and is used for referential-integrity testing purposes.
+{{randomdate 2020}}
+
+Here is a random date: {{randomdate 2020}}.
+
+This may result in 2022-08-03T00:00:00.000000.
+Generate a random number with the numeric positions provided as input integer.
+This was originally added to generate test data, and is used for referential-integrity testing purposes.
+{{randomnumber 5}}
+
+And here is a random string: {{randomnumber 5}}.
+
+This may result in 1346.
+Generate a random string no longer than the provided characters as integer input.
+{{randomstring 10}}
+
+And here is a random string: {{randomstring 10}}.
+
+This may result in Cg8uKuBFS5.
+Block helper to evaluate if the input matches a specified string. Also optionally supports an {{else}} block.
+{{#stringcompare string1 string2}} do something {{else}} do something else {{/stringcompare}}
+
+A and B {{#stringcompare "A" "B"}}are the same. {{else}}are not the same. {{/stringcompare}}
+
+This results in:
+A and B are not the same.
+
+Wraps an input character string with two specified characters.
+{{stringwrap "<start character>" "<end character>"}}
+
+This adds brackets around the string value: {{stringwrap "Example" "[" "]"}}
+
+This results in:
+[EXAMPLE]
+
+TBD
+As part of the schema definitions, a number of extensions in the templating language have been developed:
+