Scriptella encoding issue in migrating utf-8 data from access (mdb) to Oracle

948 views Asked by At

I wrote program using java and scriptella(etl framework) to move data from access(mdb) to oracle, I changed the unicodeCompression in Access for each field to YES and I'v tested oracle encoding by adding utf-8 data in SqlDeveloper which is ok,Now when I run the program to move the data to Oracle I got questionMarks in records.

here is my etl

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
    <connection id="dbInput"  url="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=$MDB_FILE_NAME" />
    <connection id="dbOutput"  url="jdbc:oracle:thin:@localhost:1521:xe" user="user"    password="pass" />
    <query connection-id="dbInput" >
        SELECT * FROM table1;
        <script connection-id="dbOutput"> 
            INSERT INTO some_table(COLUMN1, COLUMN2, COLUMN3) values (?field1,
            ?field2, ?field3);
        </script>
    </query>
</etl>

What's wrong with that?

I'v seen input/output encoding in ETL tools such as jasperETL , is there something like that in scriptella ?

Access data moved data in oracle , the last one(id=4) I filled in SqlDeveloper moved data in oracle , the last one(id=4) I filled it directly in SqlDeveloper

1

There are 1 answers

1
ejboy On

Try setting the charSet property introduced in Java 5:

<connection id="dbInput"  url="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=$MDB_FILE_NAME">
    charSet=UTF-8
</connection>