<@ULVA73B9P>, how can I copy the existing blocks ...
# marvin-in-the-wild
g
@Marvin, how can I copy the existing blocks and credentials from my workspace to the ephemeral database created using prefect_test_harness?
m
I found some information on managing credentials and database configurations with Prefect, but nothing specifically detailing how to copy existing blocks and credentials to the ephemeral database created using
prefect_test_harness
. However, generally speaking, if you want to copy resources, you'd typically load them programmatically and then save them into the new database. To work with credentials and blocks in Prefect, you can load and save them as demonstrated in the MinIO Credentials example:
Copy code
python
from prefect_aws import MinIOCredentials

minio_credentials_block = MinIOCredentials.load("BLOCK_NAME")
# You would then save it to the new database/context
minio_credentials_block.save("NEW_BLOCK_NAME", overwrite=True)
For more detailed guidance on configuring databases in Prefect, you can refer to these sources: - Using databases with Prefect - SQLAlchemy database with Prefect If you need assistance with a more specific problem related to copying blocks and credentials in the context of
prefect_test_harness
, you might consider consulting the Prefect community or opening a GitHub issue for targeted help.
🫠 1