PD/DBL - Protodemos database programming language

Protodemos database programing language (PD/DBL) is the world's first parallel-execution scripting language embedded in a database engine.   Taking advantage of the advanced Sql-MR API provided by Teradata Aster database, PD/DBL programs can run in parallel on hundreds of commodity servers.  PD/DBL programs embrace the entire Map-Reduce flow of data, allowing separate program elements for setup, data ingest and Map output, Reduce operations, and post processing ("Drain") operations.

PD/DBL Features include:

  • Script entry and execution at the command line: No java programming needed.  PD/DBL programs can be typed in and executed directly from the user interface or in any ODBC or JDBC compliant database tool.
  • Stored procedure-like functionality.  PD/DBL programs can be stored as schema objects in the Teradata Aster database and retrieved for later execution
  • Enhanced security: Ad-hoc scripting without using an interface that requires OS-level or other non-secure access. PD/DBL programs do not allow outside network access or arbitrary method execution, exposing only the interfaces required for database interaction and program execution.
  • A full compliment of built-in functions for string handling, math, regular expressions, data manipulation, etc.
  • Full support for Teradata Aster Sql-MR functionality including the ability to read from multiple "ON" clauses and "emit" records to the database. 
  • Control over node execution- run your script on one, several, or a "modulus" of worker nodes.
  • JDBC Connection and Curors: Connect to a JDBC database, then execute arbitrary SQL- or create a cursor and iterate through it,  reading, updating, inserting and deleting records with full transaction integrity.
  • High-level language constructs: PD/DBL is very similar to typical current programming languages, with elements such as:
    • Flow control: if/then/elseif/else, branch-on (similar to a java "switch" statement), do/while/for looping
    • User-defined functions with return values, by-reference and by-value arguments, and recursion
    • Simple data primitives (boolean, date, integer, numeric, string and timestamp)
    • Support for database types via a native value holder primitive type, allowing "pass-through" of otherwise non-supported types.
    • Complex variables like records, arrays, maps and stacks
    • Database objects like Connections and Cursors
    • Exception handling with try/catch/finally

Additionally, PD/DBL provides a robust "randomizing" function library that makes it ideal for test data generation.  Imagine being able to generate millions of test records without ANY of them previously existing in the database!  Generate random strings based on complex patterns. Pick from lists of selections where each item can be given its own probability of selection.  Pick numbers based on gaussian, poisson and bell-curve probability distribution functions.