Articles in this section

Export data from IBM Db2

Before you begin

Set up a connection to IBM Db2 if you don't have an existing connection that you can use.

Export data from the connected database

  1. From the left navigation pane, select either ResourcesExports or ToolsFlow builder.

  2. At the upper right of the Exports page, click + New export; or, in Flow builder, click Add source.

  3. In the Create export panel, provide general details. These fields might be ordered differently based on the path you use to create a new export.

    Tip

    If you are adding a source application for your export in Flow builder, the field names could differ slightly. For example, instead of Name , the field name would be Flow step name.

    1. For Application, select the database for your export.

    2. For Connection, select the connection you've already created. The Connection list is populated only with existing connection resources for the database application.If you haven't yet created a connection, click +Create connection to create your connection.

    3. For Name, enter a meaningful name for your export.

    4. For Description, provide details that would helpful for you for quick reference or your team to reuse it if required.

  4. Then, in the SQL query field, write the SQL statement that fetches the data that you require. See also, IBM Db2 documentation.

    Tip

    ˇClick handlebars_editor.svg to open the Build SQL query editor and ask Celigo AI to generate a SQL query for you. Enter a description of your query in plain English in the space provided, and Celigo AI will attempt to generate a query based on your prompt.

    SELECT *
    FROM orders
    WHERE status = 'pending'
      AND from={{lastExportDateTime}}&to={{currentExportDateTime}}
    export-ibmdb2.png

    Note

    Some implementations require you to specify the database name when accessing a table – for example,

    SELECT * FROM <databasename>.<schema>.<tablename> 
  5. Select an Export type:

    • All – to export all data, always

    • Delta – to export only data that has changed since the last time the data flow was run

    • Once – to export only data that has not already been exported

    • Limit – to export a limited set of records, primarily used for testing to avoid syncing lots of data

      Note

      When you select the export type as Limit - export a set number of records , another setting How many records would you like to export? is enabled for you to enter the maximum number of records to export each time this flow runs. The default value is set to one. You can export a maximum of 100 records.

  6. Click preview to see sample JSON-formatted data. If the SQL query is not executed successfully, revise the SQL query or Export type values.

    Note

    In the export Preview and import mappings Input, you will see the bigint datatype values in string format. Bigint values are returned as strings to avoid precision issues and accurately represent very large numbers.

  7. Click Save, and proceed to access the new export within a flow.

Note

You can set optional fields in the following sections if it is required for your export.

Group export records

The Grouping option allows you to manage your flow’s files by grouping records by field. This feature allows you to aggregate your data based on your chosen field(s).

Mock export data

The Mock data option enables you to test your export data, useful especially when initially building or making changes and checking your flows. If you leave this field blank, then the preview data is used as mock data.

Use advanced export options

The Advanced option allows you to set the number of records exported in pages. See also Fine-tune integrator․io for optimal performance and data throughput.

It also allows to specify the Data URI template or Override trace key template, which are useful when troubleshooting errors. See description in create webhook listeners .