For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/dpe-actions-postgresql-to-csv.md.
  • 🇬🇧 English
  • PostgreSQL to CSV Action

    The data from your PostgreSQL table will be stored in a comma-separated values (CSV) file format within your chosen object storage bucket

    Objective

    The PostgreSQL to CSV action allows you to transfer a table from a PostgreSQL source, configured in your Connectors, directly into a Project bucket. The data from your PostgreSQL table will be stored in a comma-separated values (CSV) file format within your chosen object storage bucket.

    Configure a PostgreSQL to CSV action

    To create a new PostgreSQL to CSV action, follow these steps within the Data Processing Engine (DPE):

    1. Navigate to the Action tab within the Data Processing Engine (DPE) interface.
    2. Click on the "New Action" button.
    3. From the list of available actions, select "PostgreSQL to CSV".
    Configure a PostgreSQL to CSV action — Postgresql to csv

    Choose a PostgreSQL Table

    First, you need to select the specific PostgreSQL table you wish to transfer.

    1. A list of available tables from your connected PostgreSQL sources in the Connectors will be displayed.
    2. Important: If this list is empty, it means you do not have any PostgreSQL sources connected or configured in your Connectors. Please ensure you have added and connected your PostgreSQL database as a source before attempting to use this action.
    3. Select the desired PostgreSQL table from this list.
    Choose a PostgreSQL Table — Postgresql to csv

    Select Destination Bucket and Path

    Next, you will define the destination bucket and the folder path where your CSV file(s) will be stored.

    1. Choose Destination Bucket: Select an available Project bucket from the list where your CSV file(s) will be stored.
    Select Destination Bucket and Path — Postgresql to csv
    1. Specify Folder Path: In the field below the destination bucket selection, you will specify the desired folder path within the bucket.
      • Example: If you want your data to be stored in a folder named my_postgres_data inside an analytics directory, you would enter analytics/my_postgres_data/.
      • The system will automatically create any necessary folders if they don't already exist in the specified path.
      • File Naming Convention: The exported data will always be stored in one or more files named part-1.csv, part-2.csv, and so on, depending on the size of your table.
      • Default Behavior: If you leave the folder path empty, the action will, by default, create a folder named after the PostgreSQL table you selected (e.g., if your table is named products, it will create a products/ folder at the root of the bucket). Within this default folder, the data will be stored as part-1.csv, part-2.csv, etc.
    2. Run the Action: Once both your PostgreSQL table and destination are configured, click the "Run" button to initiate the transfer.
    Select Destination Bucket and Path — Postgresql to csv (2)

    Verify Your Transfer

    After the PostgreSQL to CSV action completes successfully, you can visually confirm the transfer by navigating to the Buckets section within the Lakehouse Manager. Here, you will find your new CSV file(s) at the specified path within your destination bucket.

    Verify Your Transfer — Postgresql to csv

    Go further

    If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.

    Ask questions, give your feedback and interact directly with the team building the Data Platform on the dedicated Discord channel.

    If you need support with your OVHcloud services, create a request in our Help Centre.

    Join our community of users.