piper.text.get_sql_text

piper.text.get_sql_text(file_or_text, variables, debug=False)[source]
Get SQL text file and substitute template

variables with (dictionary) variables passed.

Parameters
  • file_or_text – file name containing sql or actual text to convert

  • variables – dictionary of variables to be used for replacing substitutional variables.

  • debug – True, False If True, provide logging/debug information

Returns

Return type

text string containing replaced substitutional variables