utils¶
- lakeformation.utils.to_var_name(s: str) str[source]¶
Convert string to variable name safe format. For example:
>>> to_var_name("us-east-1") us_east_1 >>> to_var_name("arn:aws") arn_aws >>> to_var_name("a/b") a__b >>> to_var_name("database.table") database_dot_table
- lakeformation.utils.get_local_and_utc_now() Tuple[datetime.datetime, datetime.datetime][source]¶
Get current time in both local timezone format and utc format.
- lakeformation.utils.get_diff_and_inter(dct1: Dict[str, Any], dct2: Dict[str, Any]) Tuple[ordered_set.OrderedSet, ordered_set.OrderedSet, ordered_set.OrderedSet][source]¶
Each deployed
Objectusually has a unique id.Mapperis a dictionary data structure that stores a collection ofObject. Key is theObjectid, value is theObjectinstance.Given a new
Mapperand a deployedMapper, it is very common to find out whichObjectshould be added, should be delayed and should be updated.This utility function takes two parameter
new object
Mapperdeployed object
Mapper
Returns three set data structure
to add object id set
to delete object id set
to update object id set
- Parameters
dct1 –
dct2 –
- Returns