Oracle target type with 'createTableIfNotExists' does not invoke override, ends up with 'create table if not exists ' which is invalid
Using latest main branch code as I already had another issue I had to resolve with MkDir permissions being wrong.
[root@* ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.9
ETL Request:
{
"keep-files": true,
"source-name": "remote-prod",
"source-type": "postgresql",
"source-connection-string": "postgresql://remoteuser:remotepass@localhost:9876/remotedatabase",
"source-schema": "remoteschema",
"source-table": "remotetable",
"target-name": "local-test",
"target-type": "oracle",
"target-connection-string": "oracle://localuser:localpass@localhost:2484/localinstance?ssl=true&ssl verify=false&wallet=/opt/orac
le/wallets/tcps",
"target-database": "localinstance",
"target-hostname": "localhost",
"target-port": 2484,
"target-password": "localpass",
"target-username": "localuser",
"target-schema": "localschema",
"target-table": "localtable",
"drop-target-table-if-exists": false,
"create-target-table-if-not-exists": true
}
ETL Transfer Result:
"821e3bde-466c-468c-b184-9590a51e9484": {
"id": "821e3bde-466c-468c-b184-9590a51e9484",
"created-at": "2024-05-24T04:07:56.082740718Z",
"status": "error",
"error": "error running transfer 821e3bde-466c-468c-b184-9590a51e9484 :: error creating target table :: error running create table localschema.localtable:: error running ddl/dml
on local-test :: **create table if not exists** localschema.localtable (_columns definition_) :: ORA-00922: missing or invalid option\n",
"keep-files": true,
"tmp-dir": "/home/oracle/tmp/sqlpipe/821e3bde-466c-468c-b184-9590a51e9484",
"pipe-file-dir": "/home/oracle/tmp/sqlpipe/821e3bde-466c-468c-b184-9590a51e9484/pipe-files",
"final-csv-dir": "/home/oracle/tmp/sqlpipe/821e3bde-466c-468c-b184-9590a51e9484/final-csv",
"source-connection-info": {
"instance-name": "remote-prod",
"type": "postgresql",
"hostname": "",
"database": "",
"username": ""
},
"target-connection-info": {
"instance-name": "local-test",
"type": "oracle",
"hostname": "localhost",
"port": 2484,
"database": "localinstance",
"username": "localuser"
},
"drop-target-table-if-exists": false,
"create-target-schema-if-not-exists": false,
"create-target-table-if-not-exists": true,
"source-schema": "remoteschema",
"source-table": "remotetable",
"target-schema": "localschema",
"target-name": "localtable",
"delimiter": "{dlm}",
"newline": "{nwln}",
"null": "{nll}"
},
Oracle target type with 'createTableIfNotExists' does not invoke override, ends up with 'create table if not exists ' which is invalid
Using latest main branch code as I already had another issue I had to resolve with MkDir permissions being wrong.
ETL Request:
ETL Transfer Result: