{"id":26129510,"url":"https://github.com/mathworks-ref-arch/matlab-azure-blob","last_synced_at":"2025-04-13T18:42:40.229Z","repository":{"id":35945968,"uuid":"160400657","full_name":"mathworks-ref-arch/matlab-azure-blob","owner":"mathworks-ref-arch","description":"MATLAB interface for Windows Azure Blob Storage.","archived":false,"fork":false,"pushed_at":"2022-09-27T20:39:19.000Z","size":779,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-10T19:55:15.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks-ref-arch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2018-12-04T18:22:02.000Z","updated_at":"2022-10-25T13:51:06.000Z","dependencies_parsed_at":"2022-09-01T07:50:19.978Z","dependency_job_id":null,"html_url":"https://github.com/mathworks-ref-arch/matlab-azure-blob","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-azure-blob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-azure-blob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-azure-blob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-azure-blob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks-ref-arch","download_url":"https://codeload.github.com/mathworks-ref-arch/matlab-azure-blob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764964,"owners_count":21158194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-10T19:49:13.962Z","updated_at":"2025-04-13T18:42:40.196Z","avatar_url":"https://github.com/mathworks-ref-arch.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MATLAB Interface *for Windows Azure Storage Blob*\n\n**This package has been deprecated, please use the following package instead: https://github.com/mathworks-ref-arch/matlab-azure-services This package may be removed in the future.**\n\nThis is a MATLAB® interface that connects to the Windows Azure™ Storage Blob (WASB) service. This is a low-level interface, if the higher-level interface as provided in MATLAB supports your requirements it is recommended to use that, see [https://www.mathworks.com/help/matlab/import_export/work-with-remote-data.html](https://www.mathworks.com/help/matlab/import_export/work-with-remote-data.html) for more details. This interface also supports Table Storage and Queue Storage.\n\n## Requirements\n### MathWorks products\n* Requires MATLAB release R2017a or later\n\n### 3rd party products\nTo build a required JAR file:\n* Maven™\n* JDK 8\n* Microsoft® Azure Blob Storage SDK for Java®\n\n## Getting Started\n\nPlease refer to the documents in the [Documentation](Documentation/README.md) folder to get started.\nIn particular, the [Basic Usage](Documentation/BasicUsageBlob.md) provides an overview of using this interface.\n\nThis package is used to enable the use of the Azure Table Storage service with MATLAB.\nIn the Software/MATLAB directory run the *startup.m* to make the software available in the MATLAB environment.\n\n### Create and configure a storage account\nIf this is the first time using the interface, as a one-time operation per session (assuming only one storage account is being used), setup the the Cloud Storage Account. This is done using:\n```\n% Create a handle to the storage account\naz = azure.storage.CloudStorageAccount;\n```\n\nThe storage account will need to be configured to work with the Azure account or the development emulator. By default the UseDevelopmentStorage flag is set to *true* and so the emulator running on localhost will be used. For details of the development emulator see here: [https://docs.microsoft.com/en-us/azure/storage/storage-use-emulator](https://docs.microsoft.com/en-us/azure/storage/storage-use-emulator). To use Azure itself, disable this setting as follows:\n```\naz.UseDevelopmentStorage = false;\n```\n\nAn organization's Azure environment may well to be configured to support only https based access, this is enabled as follows:\n```\naz.DefaultEndpointsProtocol = 'https';\n```\n\nThe following allows one to specify the credentials for the Azure storage account of choice. The AccountName value is the name of the storage account to access and the AccountKey is the associated Key. In the Azure portal select the Storage account then Settings then AccessKeys and then the Key. Normally the *Key1* value is used.\n```\naz.AccountName = 'myaccountname'\naz.AccountKey  = 'SVn445qMEABafld3k225l*****[REDACTED_FOR_SECURITY]****RfIhAQtvYzAQr0328/d030GGw=='\n```\n\nThe CloudStorageAccount is now ready to connect. When fully configured this looks like:\n```\naz.connect()\naz\n\naz =\n\n  CloudStorageAccount with properties:\n\n                   AccountName: 'myaccountname'\n                    AccountKey: 'SVn\u003cMYACCOUNTKEY\u003e0GGw=='\n                   ServiceName: 'blob'\n      DefaultEndpointsProtocol: 'http'\n         UseDevelopmentStorage: 0\n    DevelopmentStorageProxyUri: []\n                     Secondary: 0\n                           URI: 'http://myaccountname.blob.core.windows.net/'\n                  BlobEndpoint: 'http://myaccountname.blob.core.windows.net/'\n```\nNote, your storage account key is similar to the root password for the storage account. Always be careful to protect the account key. Avoid distributing it to other users, hard-coding it, or saving it anywhere in plain text that is accessible to others. Regenerate the account key using the Azure portal if you believe it may have been compromised.\n\n\n### Create a blob client\nWith a fully configured connection get a handle to a client that allows uploading and downloading from the blob storage.\n```\nazClient = azure.storage.blob.CloudBlobClient(az)\n\nazClient =\n  CloudBlobClient with properties:\n    DirectoryDelimiter: '/'\n```\nWindows Azure blob storage can now be accessed from within MATLAB. Shown below are a few of the common operations for the Blob Storage service.\n\n### Create a container\nTo create a container for the configured client one can:\n```\nazContainer = azure.storage.blob.CloudBlobContainer(azClient,'testcontainer');\nazContainer.createIfNotExists()\n```\n\n### Uploading a blob into a container\nBlobs can be content of any nature. To generate some data in MATLAB and save it to newly created container is simple.\n```\nsampleData = rand(1000,1000);    % Approx 7MB\nsave SampleData sampleData;\n```\nUploading the data to a previously created container, create a blob handle (merely a reference) and upload.\n```\nblob = azContainer.getBlockBlobReference(which('SampleData.mat'));\nblob.upload();\n```\nThis file is now available on the Windows Azure Blob Storage service.\n\n\n### Create a table client\nWith a fully configured connection get a handle to a client that is required to perform CRUD (Create, Retrieve, Update, Delete) operations on Table storage.\n```\nazClient = azure.storage.table.CloudTableClient(az)\n\nazClient =\n\n  CloudTableClient with properties:\n\n    Parent: [1x1 azure.storage.CloudStorageAccount]\n```\n\n### List existing tables\nTo get a list of tables, call the *CloudTableClient.listTables()* method to retrieve an list of table names.\n```\ntableList = azClient.listTables\n\ntableList =\n\n  1x14 CloudTable array with properties:\n\n    Parent\n    Name\n```\n\n### Create a queue client\nWith a fully configured connection get a handle to a client that is required to perform CRUD (Create, Retrieve, Update, Delete) operations on queue storage.\n```\nqueueClient = az.createCloudQueueClient()\n\nqueueClient =\n CloudQueueClient with no properties.\n```\n\n### Create a queue\nA queue contains a set of messages. The client can be used to create a queue as follows:\n```\nqueue = queueClient.getQueueReference('my-queue-name');\ntf = queue.createIfNotExists();\n```\n\n### Create a message\nAs message can be created as shown and must then be added to a queue before it can be retrieved:\n```\n% Create a text based message\nmessage = azure.storage.queue.CloudQueueMessage('Hello World');\nqueue.addMessage(message);\n```\n\n\n## Supported Products\n\nMathWorks Products (https://www.mathworks.com)\n1.  MATLAB (R2017a or later)\n2.  MATLAB Compiler and Compiler SDK (R2017a or later)\n3.  MATLAB Production Server (R2017a or later)\n4.  MATLAB Parallel Server (R2017a or later)   \n\nThis package is primarily tested on Ubuntu™ 18.04 and Windows™ 10.\n\n## License\nThe license for the MATLAB Interface for Windows Azure Storage Blob is available in the [LICENSE.md](LICENSE.md) file in this GitHub repository. This package uses certain third-party content which is licensed under separate license agreements. See the [pom.xml](Software/Java/pom.xml) file for third-party software downloaded at build time.\n\n## Enhancement Request\nProvide suggestions for additional features or capabilities using the following link:   \nhttps://www.mathworks.com/products/reference-architectures/request-new-reference-architectures.html\n\n## Support\nEmail: `mwlab@mathworks.com`\n\n\n[//]: #  (Copyright 2017-2019 The MathWorks, Inc.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-azure-blob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-azure-blob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-azure-blob/lists"}