in google-datacatalog-apache-atlas-connector/src/google/datacatalog_connectors/apache_atlas/prepare/datacatalog_entry_factory.py [0:0]
def __set_source_timestamp_fields(cls, entry, data, generated_id):
create_time = data.get('createTime')
update_time = data.get('updateTime')
if create_time:
# Transform millis to seconds.
created_timestamp = timestamp_pb2.Timestamp()
created_timestamp.FromSeconds(round(create_time / 1000))
entry.source_system_timestamps.create_time = created_timestamp
if not update_time:
update_time = create_time
# Transform millis to seconds.
updated_timestamp = timestamp_pb2.Timestamp()
updated_timestamp.FromSeconds(round(update_time / 1000))
entry.source_system_timestamps.update_time = updated_timestamp
else:
logging.info('Entity "%s" has no created_time information!',
generated_id)