Here is the basic skeleton of a bipp project file:
project project_name dataset dataset name table table_name1 table_name2 table table_name3 table_name4 join table1 left outer join table2 on table1.x = table2.y join table2 inner join table3 on table2.y = table3.z then right outer join table4 on table2.x = table4.w AND table3.h = table4.i table table_name data_source data_source_name sql sql for table column column name sql sql for column type type
The syntax uses Indentation, Keywords, Values, and Comments.
bippLang model files follow strict indentation rules based on the hierarchical structure of the model. If you think of the hierarchy as a tree, all children of a node should have exactly the same indentation. Indentation rules are similar to Python except we replace tabs with 4 spaces in bippLang. Best practice is to use all spaces, never use a mixture of spaces and tabs. Note: Incorrect indentation generates errors when committing or processing the file.
Each line contains one or more the supported keywords. Refer to bippLang Reference for details.
Values (when used) are strings specified in one of these supported formats:
- Double quotes. For example:
- Single quotes: For example:
- Multiple quotes, for multi-line values. For example,
sql """SELECT t.invoice_num AS invoice_num, t.stock_code AS stock_code, t.unit_price AS unit_price, t.country AS county FROM 'online_retail'.'stocks' AS s JOIN 'online_retail'.'transactions' AS t ON s.code = t.stock_code WHERE s.description like '%TAPE%'"""
If you need to use a single or double quote in your code, precede it with a \ to prevent it from being interpreted as syntax.
Comments are optional, but best practice for code that is understandable and maintainable.
- Comments begin with # or //
- Comments can be inline or on a separate line
IN THIS PAGE