GO Loader Aviation 1.2 is here! Take a look at what's new.
Skip to end of metadata
Go to start of metadata

Example Agent Calls

Prior to running GO Loader Aviation Agent you should have edited the GO Loader Agent environment variable script

Accessing Command Line Help

The easiest method to check that you've got everything setup correctly is to run Agent to look at the command line help, on Windows:

GOLoader.bat AGENT help

Creating Tables

In most scenarios you would have already used GO Loader Studio to create your database tables, if not you can use create_all_tables command, on Windows:

GOLoader.bat AGENT create_all_tables -project "C:\example\my_project.glp" -load_log_dir "C:\example\my_log_dir"

Loading Data

With tables created you can load data is two ways:

Load typeGO Loader Agent Example
Single File
GOLoader.bat AGENT load C:\example\my_file.gml -project "C:\example\my_project.glp" -load_log_dir "C:\example\my_log_dir"
All files in a directory
GOLoader.bat AGENT load C:\example\my_data_dir -project "C:\example\my_project.glp" -load_log_dir "C:\example\my_log_dir"

Creating Indices

With the data load you will need to create the indices, on windows:

GOLoader.bat AGENT create_all_indices -project "C:\gl_data\my_project.glp" -load_log_dir "C:\example\my_log_dir"

These are the three most popular Agent commands, here's a full list:

Agent Command Reference

Table Management

create_table <tablename>

Creates the named table in the database. The table must exist in the project being used.

create_all_tables

Creates all tables specified in the project file.

drop_table <tablename>

Drops the named table from the database. The table must exist in the project being used.

drop_all_tables

Drops the all tables specified in the project file from the database.

Loading Files

load <gml file|directory>

Loads data, according to the translation specified in a project file. If a GML file name is specified then that file is loaded. If a directory is specified then GO Loader will search that directory and all sub-directories for GML files and load them all.

load_url <gml source specified by URL>

Loads data from the url specified, according to the translation specified in a project file. Differs from the 'load' command in that the gml source is specified as a URL.

remove_duplicates

This command deletes all features where the feature ids (fids) are duplicated in your data. This duplication can occur if you are supplied with data where the same fid occurs in multiple files. Before running the duplicate removal process you should first create all the indices required for duplicated removal using the create_indicies remove_duplicates command.

If you have a large amount of data and do not have the appropriate indices in place the remove_duplicates process will be very slow.

create_index <indexname>

Creates the named index in the database. The index must exist in the project being used.

create_all_indices

Creates all indices specified in the project file.

create_indices <index_type>

Creates all of the indexes of the index type specified. Valid values of <index_type> are:

  • 'all' : All types of index,
  • 'remove_duplicates' : All indices required for duplicate removal ,
  • 'fid' : Feature Id Indexes,
  • 'spatial' : All Spatial indices,
  • 'foreign_key' : All Foreign Key indices,
  • 'primary_key' : All primary key constraints,
  • 'feature_reference' : All Reference To Feature indices,
  • 'archive' : All Archive Start date and Archive End date indices,
  • 'primary_key_copy' : All primary copy key indices.

drop_index <indexname>

Drops the named index from the database. The index must exist in the project being used.

drop_all_indices

Drops the all indices specified in the project file from the database.

drop_indices <index_type>

Drops all of the indexes of the index type specified.

  • 'all' : All types of index,
  • 'remove_duplicates' : All indices required for duplicate removal ,
  • 'fid' : Feature Id Indexes,
  • 'spatial' : All Spatial indices,
  • 'foreign_key' : All Foreign Key indices,
  • 'primary_key' : All primary key constraints,
  • 'feature_reference' : All Reference To Feature indices,
  • 'archive' : All Archive Start date and Archive End date indices,
  • 'primary_key_copy' : All primary copy key indices.

Agent Command Line Parameters

The example we started this page with used two GO Loader Agent command line parameters -project and -load_log_dir.  

Parameters are prefixed with '-' and the value, separated by a space. Parameter are after the command.

For example:
GOLoader.bat AGENT load C:\data\mydatafile.gml -project C:\goloaderprojects\myproject.glp -load_log_dir C:\logdirectory

Here's a full list of parameters:

-project <project file path>

The file name of the project file to be used. This parameter is mandatory.

The following command line parameter has been deprecated. Logging is now configured by a configuration file. Details can be found on the Logging in GO Loader Aviation page. If you continue to use this parameter it will change the location of the file lists and log a warning that the log directory is being configured somewhere else.

-load_log_dir <log directory path>

Log files will be placed directly into the directory specified in this parameter. If this parameter is not specified the values set up in the GO Loader Studio 'Loader Configuration' are used.

-load_list_dir <directory path>

Generated list files from a load will be placed into the directory specified in the parameter. If this parameter is not specified the values set up in the GO Loader Studio 'Loader Configuration' are used.

-load_method <load method>

Valid values for this parameter are "jdbc" and "sqlloader". If "jdbc" is specified GO Loader Agent will load directly to the database. If "sqlloader" is specified SQL*Loader files will be produced. If this parameter is not specified the settings from GO Loader Studio 'Loader Configuration' are used.

  • No labels