/export/records/totable

URL: https://<aws.fqdn>/<aws.cluster.name>/gpudb-0/export/records/totable

Exports records from source table to the specified target table in an external database

Input Parameter Description

NameTypeDescription
table_namestringName of the table from which the data will be exported to remote database, in [schema_name.]table_name format, using standard name resolution rules.
remote_querystringParameterized insert query to export gpudb table data into remote database. The default value is ''.
optionsmap of string to strings

Optional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
batch_sizeBatch size, which determines how many rows to export per round trip. The default value is '200000'.
datasink_nameName of an existing external data sink to which table name specified in input parameter table_name will be exported
jdbc_session_init_statementExecutes the statement per each jdbc session before doing actual load. The default value is ''.
jdbc_connection_init_statementExecutes the statement once before doing actual load. The default value is ''.
remote_tableName of the target table to which source table is exported. When this option is specified remote_query cannot be specified. The default value is ''.
use_st_geomfrom_casts

Wraps parametrized variables with st_geomfromtext or st_geomfromwkb based on source column type The default value is false. The supported values are:

  • true
  • false
use_indexed_parameters

Uses $n style syntax when generating insert query for remote_table option The default value is true. The supported values are:

  • true
  • false

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'export_records_to_table_response' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /export/records/totable endpoint:

NameTypeDescription
table_namestringValue of input parameter table_name.
count_insertedlongNumber of records inserted into the target table.
count_skippedlongNumber of records skipped.
count_updatedlong[Not yet implemented] Number of records updated within the target table.
infomap of string to stringsAdditional information.

Empty string in case of an error.