CREATE FOREIGN DATA WRAPPER
As in other SQL-based systems, foreign data wrappers handle access to external objects from s-Server. Two commonly referenced data wrappers are ECDA, a wrapper that handles connections to a variety of data sources, including the file system, Kafka topics, network sockets, Kinesis streams, and AMQP; and SYS/JDBC, which handles connections to RDBMS systems.
Syntax Chart for CREATE FOREIGN DATA WRAPPER
Example of specifying a library and a language:
CREATE FOREIGN DATA WRAPPER probeWrapper
Example of option specification:
OPTIONS ( protocol'TCP/IP')
1.If a data wrapper specifies a JAR file rather than a class file, then the JAR is automatically added to CLASSPATH. (It is not necessary to register it with the SQLstream engine by adding it into the file $SQLSTREAM_HOME/bin/classpath.gen.) This is the effect, for example, of using statement A below instead of statement B:
b.LIBRARY 'class net.sf.farrago.namespace.jdbc.MedJdbcForeignDataWrapper'
2. CREATE FOREIGN DATA WRAPPER is unnecessary when defining a server for a JDBC peer using a JDBC client driver that matches the RDBMS, such as those that come with SQLstream for SQLServer, Oracle, MySQL, and SQLstream.
For these RDBMS, you can define the server for a JDBC peer using the CREATE SERVER command, specifying FOREIGN DATA WRAPPER "SYS_JDBC.
•See also the examples in the SQL/MED discussions in the Getting Started Guide.
•The topic DROP FOREIGN DATA WRAPPER in this guide.