Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Importing WFS tables into Earthlight is more often than not, a two-stage affairprocess. That is why we have split this documentation into: 1 – creating a list of tables held by WFS service, 2 – importing the table from WFS service to Earthlight database.

...

As you can see the script structure is similar to a typical import script. In the <Action> section we are providing information about Source and Destination. However, there are few changes which I would like to discuss:

Source

...

  1. Please indicate the cartridge type (in all cases it will be: cartridge=wfs),

...

  1. In data source="" (WFS address in quotes) we need to provide the URL to the chosen WFS service:
    * Please remember to never specify the "request" and "typeName" parameters in the URL. Data Pump needs to set them explicitly and it won't be able to do this if they are already provided in URL,
    * If there is no VERSION parameter provided in URL, then DataPump will set it automatically to 2.0.0,
    * Because the script file is parsed into XML, it is crucial to replace the “&” with “&amp;” otherwise the import operation will fail.

...

  1. Finally, we need to specify the table name="" parameter:
    * In this case, please leave the parameter empty in order to list all tables held by the WFS service.
Info

Please remember that only the script file is parsed into XML. Therefore when you are using the 3 file scenario (.script, .destination, .source), then the .source file shouldn’t have escaped &amp; inside of it (leave the “&” as they were original).

...

.


Destination

We need to provide a path to the location where the CSV file will be created with a list of all tables held by the WFS service (used only in conjunction with empty table name=""parameter from <source>)

...

Stage II - When we know the names of the available tables, we can ca n proceed to stage two – importing the data into Earthlight.

...

First, please take a look on at an example .script file which can be used to import the "ea-wfs-areas_public_face_inspire"table to database:

...

Code Block
languagexml
<?xml version="1.0" encoding="utf-8"?>
<Script>
 <Actions>
    <Action p3:type="Load" xmlns:p3="http://www.w3.org/2001/XMLSchema-instance">
      <Source>cartridge=wfs;data source="http://www.geostore.com/OGC/OGCInterface?SERVICE=WFS&UID=UDATAGOV2011id&PASSWORD=datagov2011password&INTERFACE=ENVIRONMENTWFS&VERSION=1.0.0";table name="ea-wfs-areas_public_face_inspire"</Source>
      <Destination>database=statmap;user id=your_id;password=your_password;timeout=15;pooling=True;enlist=False;integrated security=False;initial catalog=gisdb;custom port=1033;data source=your_datasource\sqlexpress;cartridge=SqlServer;table name=areas_of_onb_inspire;schema=dbo</Destination>
    </Action>
 </Actions>
</Script>

Source

...

  1. Please indicate the cartridge type (in all cases it will be: cartridge=wfs),

...

  1. In data source="" (WFS address in quotes) we need to provide the URL to the chosen WFS service:
    * Please remember to never specify the "request" and "typeName" parameters in the URL. Data Pump needs to set them explicitly and it won't be able to do this if they are already provided in URL,
    * If there is no VERSION parameter provided in URL, then DataPump will set it automatically to 2.0.0,
    * Because the script file is parsed into XML, it is crucial to replace the “&” with “&amp;” otherwise the import operation will fail.

...

  1. Finally, we need to specify the table name="" parameter:
    * In this case, please leave the parameter empty in order to list all tables held by the WFS service.


Info

Please remember that only the script file is parsed into XML. Therefore when you are using the 3 file scenario (.script, .destination, .source), then the .source file shouldn’t have escaped &amp; inside of it (leave the “&” as they were original).

...


* Enter the table name (copy it from the CSV file) in quotes in order to import the specified table. E.g.: table name="ea-wfs-areas_public_face_inspire"

Destination

- The connection string to the database syntax is same as for the typical import scripts. In this case, the name under which data will be held in the database needs to be provided in table nameparameter (e.g.: table name=areas_of_onb_inspire), as part of the entire connection string.

Info
titleIMPORTANTImportant

Please note that we are not providing quotes in table name parameter within destination section.

...