where does this code run in interactive glue sessions

0

If I run this code in glue on a glue notebook / interactive session

import os
print(os.getcwd())

Where does it run exactly?

已提問 3 個月前檢視次數 119 次
2 個答案
0

When you run the provided code in an AWS Glue notebook or interactive session, it runs within the AWS Glue environment.Regardless of where the code is executed (whether in a notebook or interactive session), the os.getcwd() function returns the current working directory within the Glue environment. This directory is typically a temporary or transient location provided by Glue for storing intermediate files, logs, and outputs generated during the execution of ETL jobs or scripts.

profile picture
專家
已回答 3 個月前
profile pictureAWS
專家
已審閱 3 個月前
0

To be specific, that code runs on the driver of the Glue cluster created by the interactive session, so it points to /tmp on that server
If instead you ran %system pwd, it would execute the command locally and it would tell you the current path of the Jupyter process

profile pictureAWS
專家
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南