# Connecting to Cloud Storage

In this article, we will see how a user can create a shared connection to access and store files from and to the cloud in the Astera Data Stack. To browse cloud files in a report model, the report model should be a part of a project containing the *Shared Action Connection*.

{% hint style="info" %}
**Note:** This feature of browsing files from the cloud only works in Astera if the user has the Cloud Connector add-on.
{% endhint %}

## **Creating a New Cloud Connection**

To create a new cloud connection in a project, you need to add a shared connection within the scope of that project. Once that is done, you can browse for cloud files from the Report Options panel in a report model that is present within the same project.

## **Adding a Shared Connection in a Project**

1. To add a shared connection, we need to create a new project first. Here, we have named our project RMCloud.cprj.

![](/files/ACd2zHpxo6bEiLjUmnNg)

2. Next, create a folder, *Shared Connections,* inside the project. We will save our shared connections (*.sact* files) in this folder.

![](/files/lU6JR7ub8JZf8RKZk9OO)

3. Right-click on the folder, and select *Add New Item…*

![](/files/XydequnlhpNa06wgyRvZ)

4. Select *SharedAction* from the list of file types, give it a meaningful name, and click *Add.*

![](/files/5Nmvzk7edYNfwmDCD2K4)

5. A *.sact* file will open. We have saved it with the name *SharedAction.sact*.

Go to *Toolbox > Resources* and drag and drop the *Cloud Storage Connection* object onto the designer.

![](/files/DJtrVnIoXWPyNCDJCbFZ)

6. Right-click on the header of the object and select *Properties.*

![](/files/Iqi9xYgyp5eZ3R7svjNl)

7. A *Cloud Connection Properties* window will open, where you can configure your *Cloud Connection* object by providing appropriate credentials. Select the *Provider* from the drop-down menu. In this case, we will select *Amazon S3.*

![](/files/wAKlH2IbovlN2vvhr5Dk)

8. Provide appropriate credentials, *Access Key ID,* and *Access Key.* Click *OK.*

![](/files/81myFik1d5QTMC9kXp7q)

Your *SharedAction.sact* is now configured. You can access files from this cloud connection in the project.

## **Adding a Shared Connection via Report Options**

1. To create a new cloud connection through *Report Options,* we need to create/add a report model within our project first.

![](/files/TC1WiiwKVhOFZSEu8Wf1)

2. Open the report model. Go to the Report Options panel, and click on the arrow next to the folder icon in the *Data File Location* group box. Select the *Browse Cloud Files* option.

![](/files/UvWK7efH021h2I7Hd8e5)

3. A *Browse Files* window will open. We can see the Amazon S3 *SharedAction* connection we created above in this window.

![](/files/IYZjk7AgVv2bYNhoQJmH)

4. Click on the *Add New Connection* icon.

![](/files/ofRyenhP8iQzhkmY4zPV)

{% hint style="info" %}
**Note**: This is an alternative way for you to add a shared action (shared cloud connection) to the project you are working on. If you have already created a shared action for the cloud connection you want to use in your project, there is no need to add a new connection.
{% endhint %}

5. A window to *Add a Cloud Connection* will open.

Here, we will select *Microsoft Azure Blob Storage* as our *Provider*.

![](/files/54K3A3ftlNmY1NunKgAL)

6. There are two ways to authenticate the connection, using an *Access Key* or through *Shared Access Signature.* For now, we will use the *Access Key.*

![](/files/QRbQNwtTEP2IrHxcxMI0)

7. Provide relevant credentials by specifying the *Storage Account Name* and *Access Key.* Click *OK.*

![](/files/WUGlUIftwg3QWaiLJqGN)

8. The newly created connection is now a part of the project.

![](/files/lokDSO1rjLBHqFzktsnV)

9. Select the file you want to extract data from and click *Open*.

![](/files/WhH7fw5l3vO0ocl4Qs06)

10. Create a data region and the relevant fields in the report model to extract relevant data from the source file.

![](/files/B9p86lCStOes7v0tOLfc)

11. Click on *Preview Data* to see if the report model is extracting data from the specified fields correctly.

![](/files/78XRKgAqo2PilpabyMeC)

12. The *Data Preview* window shows the data extracted from the file located on the cloud.

![](/files/PmclIO0pIEt3N1CxbuL2)

## **Exporting Data to a Cloud Destination**

Here is how we can export our extracted data to an [Excel](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/destinations/excel-workbook-destination) or a [Delimited](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/destinations/delimited-file-destination) file and save it on the cloud destination.

1. Go to *Report Browser > Data Export Settings* and select *Create New Export Setting and Run (to Excel)* option.

![](/files/rMp7tr6NJI5gIafDVLwW)

2. A configuration window will open. Click on the arrow next to the folder icon and select the *Browse Cloud Files* option.

<figure><img src="/files/M3czd1UiHyCmAVHAGcV5" alt=""><figcaption></figcaption></figure>

3. Locate the cloud directory where you want to save the Excel file, give it a meaningful name, and click *Open.*

<figure><img src="/files/4QOPBQ4UiIyNFvGn2Qlk" alt=""><figcaption></figcaption></figure>

4. The *File Path* is now pointing towards the Amazon S3 cloud provider. Click *OK.*

<figure><img src="/files/CHDyTB0NokqOzHVI9s26" alt=""><figcaption></figcaption></figure>

5. The *Job Progress* window shows the job status and the cloud path where the destination file has been created.

<figure><img src="/files/WGa7bETwJdSvz86N42Hz" alt=""><figcaption></figcaption></figure>

6. If you want to create a *Delimited File Destination*, click on this icon in the *Data Export Settings* window and follow the same steps (step 2 onwards) as mentioned above.

<figure><img src="/files/nh6RdujSFVgyQ62Svowd" alt=""><figcaption></figcaption></figure>

## **Using Files from the Cloud in a Dataflow**

We can access files from the cloud in a dataflow using the *Report Source* object. For that, the dataflow must be a part of the project or must contain a *Cloud Storage Connection* object pointing to the cloud location.

<figure><img src="/files/YfZDOgRAWXnKtkIiU43t" alt=""><figcaption></figcaption></figure>

In this case, we will extract data from a file saved on a cloud location using a report model from the local directory.

1. Go to *Toolbox > Sources* and drag-and-drop the *Report Source* object onto the designer.

<figure><img src="/files/94T45cTqdzQuf7LVP7NM" alt=""><figcaption></figcaption></figure>

2. Right-click on the top of the *Report Model* object header and select *Properties* from the menu.

<figure><img src="/files/J5BLrv0TMRlsEtyRIpiy" alt=""><figcaption></figcaption></figure>

3. Click on the arrow button next to the folder icon in the *Report Location* group-box to browse files from the cloud.

<figure><img src="/files/i21YsJkp1YoQhmMJ5bzG" alt=""><figcaption></figcaption></figure>

4. Locate the file in the cloud directory and click *OK.*

<figure><img src="/files/2HSncA9n0D6iJJZDVxPP" alt=""><figcaption></figcaption></figure>

5. The file path is now pointing towards the Amazon S3 cloud provider. Click on the folder icon to browse the report model from your local directory.

{% hint style="info" %}
**Note**: The report model must be a part of your project.
{% endhint %}

<figure><img src="/files/ppf5lkcrl0WBXTroZ35H" alt=""><figcaption></figcaption></figure>

6. Click *OK* to close the window.

<figure><img src="/files/1g5WAqnF5DhJggaO7VUZ" alt=""><figcaption></figcaption></figure>

7. The *Report Source* object is now configured with a file path coming in from the Amazon S3 cloud connection and the report model from the local directory.

Right-click on the header and select *Preview Output.*

<figure><img src="/files/a5eW54She54DvetW2V4n" alt=""><figcaption></figcaption></figure>

8. The *Data Preview* window shows that the file is correctly being read by the report model.

<figure><img src="/files/EEaq95cSppqJ7TqaCEoY" alt=""><figcaption></figcaption></figure>

## **Using Files from the Cloud in a Workflow**

We can access files from the cloud in a workflow as well, using the *File System* object. For that, the workflow must be a part of the same project as your shared connection.

<figure><img src="/files/ZKemETgzB9HAkM8ZSa1S" alt=""><figcaption></figcaption></figure>

### **Use-Case**

In this case, we want to read all the files from a particular cloud directory (in a workflow) and extract data from those files to write it in an[ *Excel Workbook Destination*](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/destinations/excel-workbook-destination) (in a dataflow).

We will do this by using the [*Report Source as a Transformation*](https://documentation.astera.com/v/astera-data-stack-v8/dataflows/transformations/sources-as-transformations#report-source-as-a-transformation) in a [dataflow ](https://documentation.astera.com/v/astera-data-stack-v8/use-cases/end-to-end-use-cases/data-extraction/reusing-the-extraction-template-for-similar-layout-files#creating-a-dataflow)where we can [parametrize ](https://documentation.astera.com/v/astera-data-stack-v8/use-cases/end-to-end-use-cases/data-extraction/reusing-the-extraction-template-for-similar-layout-files#parameterizing-the-dataflow)the path of the file we want to extract data from using the *Variables* object. This is what the dataflow will look like:

<figure><img src="/files/dsMoHiEcFZpXI834XmRB" alt=""><figcaption></figcaption></figure>

Then, we will call the dataflow in a[ workflow](https://documentation.astera.com/v/astera-data-stack-v8/use-cases/end-to-end-use-cases/data-extraction/reusing-the-extraction-template-for-similar-layout-files#designing-a-workflow) using a *Run Dataflow* object and read the files from the cloud using a *File System Items Source* in a loop. We will send the cloud file path of the source file to the *File Path* variable in the dataflow as shown below:

<figure><img src="/files/vpTDKqdjNChEyq9nAcQN" alt=""><figcaption></figcaption></figure>

## **Using File System Items Source to Browse Cloud Files**

1. Go to *Toolbox > Sources* and drag and drop the *File System Items Source* object onto the designer.

<figure><img src="/files/A88vtsIhabwGeONJ4cRC" alt=""><figcaption></figcaption></figure>

2. Right-click on the object header and select *Properties.*

<figure><img src="/files/GC3jjpk5aLUXHpDncvcK" alt=""><figcaption></figcaption></figure>

3. Click on *Browse Cloud Folders* to access the cloud folder from where you want to read files.

<figure><img src="/files/wWMfjzHOBNtpY9nQstoh" alt=""><figcaption></figcaption></figure>

4. Here, we have selected the folder containing the source files from our Amazon S3 cloud connection. Click *Open.*

<figure><img src="/files/cpamFp6JjYnj3DGVu9oQ" alt=""><figcaption></figcaption></figure>

5. Our *File Path* is now pointing towards a cloud file path. Click *OK.*

<figure><img src="/files/OF9xjYri6bgQRAaqrrev" alt=""><figcaption></figcaption></figure>

6. Our workflow is now complete. Click on *Start Workflow* to run the workflow.

<figure><img src="/files/RQyALMDXretky49UcV4f" alt=""><figcaption></figcaption></figure>

7. The *Job Progress* window shows the status of the job and the path of the Excel destination.

<figure><img src="/files/PSikobEKevNYwzFOOPOZ" alt=""><figcaption></figcaption></figure>

This is how you can create cloud connections and browse files from the cloud in Astera.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v8/connectors/connecting-to-cloud-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
