SQL feature has to contain timestamp widget. Ideally on the first line.
Cell ****which contains widgets cannot contain other code!
create widget text timestamp default "2020-12-12"
The timestamp passed in has to be in the format of YYYY-MM-DD
SQL notebook has to contain only one return select.
Define timestamp widget:
create widget text timestamp default "2020-12-12"
Add Feature metadata in form of a python dictionary:
%python
metadata = {
"category": "customer",
"table": "customer_features",
"features": {
"customer_email": {
"description": "Users email",
"tags": ["email", "sensitive"]
}
}
}
Add one return select
select
customer_id,
timestamp(getargument("timestamp")) as timestamp,
customer_email
from
hive_metastore.odap_offline_sdm_l2.customer