Private: Classes in this package are intended to be used by the SAS Query Services Model only.

This package supports creating an Information Map directly from a specific path. The Information Map corresponds to a single relational table within the path with a data item to represent each column in the table.

Currently OLAP is not supported in this package.

com.sas.iquery.dataservices.FileBaseInformationMapFactory is the class provided to access the elements of this package. The factory class must reside in the data services jar because it must execute against a server.  It is necessary to have a factory class because creating this map is a multi step process. And it may be necessary in the future to add support for additional ways to connect or create these maps. The steps to use the factory are simple:

Here is a code example for the calling application.   In order to make it easiest on the calling application I think this should be a class with state information. Because we require connection info, file path and LIBNAME info before the application can then prompt for the table to use.

        // Create the factory.
        FileBaseInformationMapFactory factory = new FileBaseInformationMapFactory();

        // Set the information we need to automatically create an information map
        factory.setConnectionInformation( host, port, username, password );
        factory.setLibnameInformation( filePath, libnameEngine, libnameOptions );

        // An Excel file can contain multiple sheets. Each sheet translates to
        // a table.
        List tables = factory.getTables();

        // Pick a table name from the list
        ...

        // Create an information map on the fly for our table.
        InformationMap map = factory.newInformationMap( tableName );

        // Use the map.
        ...

        // We are finished with the map, cleanup the factory.
        factory.dispose();
        factory = null;

Creating Multiple Maps

Once the required information is supplied this factory can produce multiple Information Maps. It is possible to create a map for each table defined in the local file. It is also possible to create multiple maps from a single table.  Maps are not cached and the maps will be different physical objects each time the factory is asked to be create one.

Server and Path

Normally this is a local SAS server and a local path but these can reside on other machines. The client process, the file and the SAS server can each reside on different machines. The server specified must be a SAS IOM server. This is the only supported protocol. Only relational data is supported.  The file must meet SAS's requirements for creating a LIBNAME. The user information used to connect to the SAS server must have access to the requested file.  Examples of a path are: "file:///c:/test.xls" or "\\someMachine\sharedDirectory\test.xls".

Data Items

A set of data items will be created. Each data item will match a column in the table. Here are the details about what is created for the data item. 

Other Items

No filters will be created. No prompts will be created. 

Persistence

The information map is not persisted by this class. When used within a data selection, these maps are persisted as part of the selection. The calling application is responsible for persisting this these maps either though the standard XML persistence of a map or the standard XML persistence of a data selection.

Objects

In order to create a file based information map we must model the information that is normally defined in an OMA repository. Here is a diagram of the objects that must be created.