https://dagster.io/ logo
#ask-community
Title
# ask-community
a

Amit Rawat

02/28/2023, 12:47 PM
Hi Everyone, I am using the Dagster with Azure Blob storage but unable to save data in containers, can someone help me with the utility to use it with some lines of sample codes. • The file we save is PDF from internet. • If possible and available, where can I find the existing thread in community regarding for any such help. Thanks
🤖 1
m

Martin Picard

02/28/2023, 1:52 PM
You might find this example helpful:
Copy code
from argus.dagster.adls2 import adls2_resource
from azure.storage.blob import BlobServiceClient
from dagster import Definitions, OpExecutionContext, asset


@asset(required_resource_keys={"adls2"})
def example(context: OpExecutionContext):
    client: BlobServiceClient = context.resources.adls2.blob_client
    container = client.create_container("test")
    container.upload_blob("myfile.pdf", data=...)


defs = Definitions(assets=[example], resources={"adls2": adls2_resource.configured({...})})
❤️ 1
18 Views