Unable to import Geo Data with TDGeoImport

Extensibility
Enthusiast

Unable to import Geo Data with TDGeoImport

Hi all,

I have exported GEO Data succesfully with TDGeoExport, but I'm not able to import this data into another System:

Z:\Geo_Test\bin>java -classpath .;"Z:\Geo_Test\bin\terajdbc4.jar";"Z:\Geo_Test\bin\tdgssjava.jar";"Z:\Geo_Test\bin\tdgssconfig.jar";. com.teradata.geo.TDGeoExport -l source_sys/user,user_pw -s dwh_pprd_lab -t Geom_Municipal_200 -f "ESRI Shapefile" MULTIPOLYGON -o Z:\Geo_Test\test2 -n Geo_Test

Coordinate System defaulting to NAD83.

Logon        = source_sys/user,user_pw

DatabaseName = DWH_PPRD_LAB

Table Name   = GEOM_MUNICIPAL_200

Export to    = Z:\GEO_TEST\TEST2\GEO_TEST

File Format  = ESRI Shapefile

Shape Type   = MULTIPOLYGON

Only 1 Type  = FALSE

-------------------------------------------

connecting to source_sys ... connected!

-------------------------------------------

exporting table GEOM_MUNICIPAL_200 to layer GEO_TEST ...

Warning 6: Normalized/laundered field name: 'Municipality_Id' to 'Municipali'

(100/100)

===========================================

Data exporting finished successfully!

Exporting time is 6.593

Z:\Geo_Test\bin>java -classpath .;"Z:\Geo_Test\bin\terajdbc4.jar";"Z:\Geo_Test\bin\tdgssjava.jar";"Z:\Geo_Test\bin\tdgssconfig.jar";. com.teradata.geo.TDGeoImport -l target_sys/user,user_pw -s dwh_ddev_lab -f Z:\Geo_Test\test2 -n Geo_Test

Logon       = target_sys/user,user_pw

DatabaseName = dwh_ddev_lab

Data Source = Z:\Geo_Test\test2

LayerName = Geo_Test

connecting to target_sys ... connected!

Validating layer: GEO_TEST

All layers successfully validated.

-------------------------------------------

Importing layer GEO_TEST to table GEO_TEST... create table:GEO_TEST failed:

CREATE TABLE GEO_TEST ( MUNICIPALI INTEGER, GEOM ST_GEOMETRY);

com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 13.00.00.06] [Error 3798]

 [SQLState 42000] A column or character expression is larger than the max size.

        at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDatabaseSQLException(ErrorFactory.java:277)

        at com.teradata.jdbc.jdbc_4.statemachine.ReceiveInitSubState.action(ReceiveInitSubState.java:102)

        at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.subStateMachine(StatementReceiveState.java:285)

        at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:176)

        at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:108)

        at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:99)

        at com.teradata.jdbc.jdbc_4.Statement.executeStatement(Statement.java:331)

        at com.teradata.jdbc.jdbc_4.Statement.executeUpdate(Statement.java:506)

        at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalStatement.executeUpdate(TeraLocalStatement.java:155)

        at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalStatement.executeUpdate(TeraLocalStatement.java:126)

        at com.teradata.geo.TDGeoImport.LayerToTable(TDGeoImport.java:478)

        at com.teradata.geo.TDGeoImport.ProcessLayer(TDGeoImport.java:393)

        at com.teradata.geo.TDGeoImport.importAllData(TDGeoImport.java:931)

        at com.teradata.geo.TDGeoImport.main(TDGeoImport.java:1185)

java.io.IOException: LayerToTable failed

        at com.teradata.geo.TDGeoImport.LayerToTable(TDGeoImport.java:488)

        at com.teradata.geo.TDGeoImport.ProcessLayer(TDGeoImport.java:393)

        at com.teradata.geo.TDGeoImport.importAllData(TDGeoImport.java:931)

        at com.teradata.geo.TDGeoImport.main(TDGeoImport.java:1185)

Importing data failed.

===========================================

Data importing failed!

Anybody an idea?

Thanks

2 REPLIES
Enthusiast

Re: Unable to import Geo Data with TDGeoImport

We're facing this exact same situation - it's TD13.1, I'm able to create tables with geospatial data types and run SQLs with geospatial functions, but the import fails with the same reason as above. In my case, I'm importing ESRI shape files which are fairly standard (from US Consensus website) and I was able to import this on a Teradata 13 express edition I installed on my personal laptop.

Need urgent help - any inputs?

Teradata Employee

Re: Unable to import Geo Data with TDGeoImport

3798 error is returned when character data size specified in a USING clause exceeds 32000 bytes and a session

character set is set to UTF8. Try changing user default character set to LATIN.