in cloud-composer/dags/sample-dataplex-with-hms-deploy.py [0:0]
def write_deployment_file(deploy_or_destroy):
print("BEGIN: write_deployment_file")
if deploy_or_destroy == "deploy":
run_datetime = datetime.now()
data = {
"deployment_datetime" : run_datetime.strftime("%m/%d/%Y %H:%M:%S"),
}
with open('/home/airflow/gcs/data/' + dag_prefix_name + '.json', 'w') as f:
json.dump(data, f)
print("data: ", data)
else:
print("write_deployment_file is skipped since this DAG is not a deployment DAG.")
print("END: write_deployment_file")