In my PostgreSQL/PostGIS I need to create FDW to an instance of Teradata Database. My aim is to get attributic-nonspatial data from the Teradata. I opted to use OGR_FDW instead of ODBC_FDW as this article recommends OGR_FDW as the performance is generally better, and the fact that I am using PostGIS in my PostgreSQL DB.
In order to create the FDW with OGR_FDW I have to do several steps that include CREATE SERVER, CREATE USER MAPPING, and IMPORT FOREIGN SCHEMA. Unfortunately I can not find example specifically for Teradata ODBC. I need to now what are the accepted OPTIONS values for Teradata ODBC.
The one from Paul Ramsey states that we can use command
ogr_fdw_info to generate server and table definition, but I do not understand what is the
datasource used in the
I have the config for the Teradata in my PostgreSQL server. As the PostgreSQL server is with Windows Server i made it in the ODBC Data Source Administrator 64-bit, as system Data Sources:
And subsequent connection test was a success:
However, when I tried to use this
tdprod in the
ogr_fdw_info call, but the
ogr_fdw_info does not recognize it:
I tried to create th remote server anyway, but failed:
Can anyone :
- show me how to issue ogr_fdw_info with my Teradata ODBC so i can get the CREATE SERVER scripts? or
- point me to example of setting up OGR_FDW to Teradata ODBC?
My environment is:
- PostgreSQL 9.6.1 64-bit & PostGIS 2.3.3
- Windows Server 2016 Standard, 64-bit
- Remote datasource: Teradata Database version 16.00.00.14
- Teradata ODBC Driver 16.20 64-bit