Download a CSV File from the Azure Portal and Add It to a Table in a PostgreSQL Database

You can download a CSV file (blob) from the Azure portal using the Azure Storage Adapter (Get Blob operation) and add it to a table in a PostgreSQL database.

This implementation pattern provides an overview of the steps.
  1. Create the Azure Storage Adapter and PostgreSQL Adapter connections.
  2. Create a schedule integration.
  3. Configure schedule parameters:
    • Accept
    • Blob
    • Container
    • version
  4. Drag an Azure Storage Adapter into the integration canvas.
  5. Configure the Azure Storage Adapter endpoint:
    1. On the Basic Info page, provide the endpoint name, select Blobs in the Select Resource field, and select the Get Blob action.
    2. On the Configuration page, add a container name and a blob name.
    3. On the Summary page, review your selections.
  6. In the mapper, map the Schedule parameter elements from the schedule source to the equivalent fields in Azure Storage, and click Validate.

    The Sources, Mapping canvas, and Target sections are shown. The source schedule parameter elements from the schedule are mapped to the equivalent target fields in Azure Storage.

  7. Drag a PostgreSQL Adapter in the integration.
  8. Configure the PostgreSQL Adapter endpoint:
    1. On the Basic Info page, provide an endpoint name and select Perform Bulk Data Import Operation in the What operation do you want to perform? field.
    2. On the Bulk load from File to table page, select comma as a delimiter, select public as a schema, and select the table that's in the database in the Select table field.
    3. On the Summary page, review your selections.
  9. In the mapper, map Stream Reference from Get Blob Action Response to FileReferece in PostgreSQL Request, and click Validate.

    The Sources, Mapping canvas, and Target sections are shown. The source Stream Reference is mapped to the target FileReferece.

    The completed integration looks as follows.


    The integration consists of a schedule, map, invoke, map, and invoke.

  10. Add the tracking variable, save, and activate the integration.
  11. At runtime, provide the valid values for accept, container, blob, and version in the request.
  12. As a result, the blob available in the Azure portal in the specified container is added into the table in the PostgreSQL database.