Commit f4b67410 authored by Yannick's avatar Yannick
Browse files

use account_key for dask

parent d9cdd2d2
Pipeline #50381 failed with stage
in 1 minute and 53 seconds
__version__ = '1.1.2'
__version__ = '1.2.0'
......@@ -6,7 +6,7 @@ import fsspec
from osdu.core.api.storage.dask_storage_parameters import DaskStorageParameters
from osdu.core.api.storage.tenant import Tenant
from .blob_storage_az import AzureAioBlobStorage
from ..partition.partition_service import PartitionService
from osdu_az.partition.partition_service import PartitionService, STORAGE_ACCOUNT_NAME, STORAGE_ACCOUNT_KEY
class AzureBlobFileSystemWithDefaultCredentials(adlfs.AzureBlobFileSystem):
......@@ -30,8 +30,11 @@ def register_azure_fsspec():
async def get_dask_storage_parameters(tenant: Tenant, directory: Optional[str] = None) -> DaskStorageParameters:
storage_account_name = await PartitionService.get_storage_account_name(tenant.data_partition_id)
storage_options = {'account_name': storage_account_name}
partition_info = await PartitionService.get_partition(tenant.data_partition_id)
storage_account_name = partition_info.get_value(STORAGE_ACCOUNT_NAME)
storage_account_key = partition_info.get_value(STORAGE_ACCOUNT_KEY)
storage_options = {'account_name': storage_account_name, 'account_key': storage_account_key}
base_directory = f'{tenant.bucket_name}/{directory}' if directory else tenant.bucket_name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment