Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated archiving script #109

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Updated archiving script #109

wants to merge 4 commits into from

Conversation

Indiphile
Copy link

No description provided.

print("No datasets to archive................................................")
else:
df = pd.DataFrame(dataset_ids)
s3.Bucket("s3://deafrica-landsat/status-report/archived/").upload_file(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use a folder on S3 dedicated to these archive logs instead of the Landsat folder @Indiphile

# Upload to AWS s3 bucket
s3.Bucket("archive-deafrica-datasets").upload_file(
Filename=PRODUCT_NAME + "_archived.csv",
Key="crop-mask/" + PRODUCT_NAME + "_archived.csv",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we avoid the specific reference to "crop-mask"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid referencing to the folder "crop-mask", key must include the file name only. For example in this case : if
Key=PRODUCT_NAME + "_archived.csv" , the file will uploaded to the root folder of the S3 bucket. The reason why I created the crop-mask folder is to store related product in one folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants