Error message

  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1895 of /home/pierrere/www/www/includes/database/query.inc).

Distinguish between a base and a SPD library

In SAS, a library engine is an engine that accesses groups of files and puts them into a logical form for processing. The engine used by default is the base engine. In addition, you may come across other engines, such as the SPD engine.

The SAS Scalable Performance Data Engine (SPD Engine) provides parallel I/O as each SAS dataset is split over multiple disks. The structure of this engine allows a faster processing of large data.

A common production set-up may define different libraries with different purposes, and therefore different engines. A library with the base engine may be used for ad-hoc reporting and small data transformation, while the library with the SPD engine may be used to store a large data mart. From a user's perspective, the layer provided by the SAS meta-data server hides the underlying engines used by the various libraries. It is however useful to validate the type of engine being used without relying on the IT department.

Using XSL to convert a KML file to a static Google Map image

Maps provided by Google can be embedded into a website using three approaches. The first approach consists in simply creating a custom map via the custom map editor. It allows you to add placemarks, draw lines and shapes, and publish your map for public consumption. The map can be then embedded in your website. The second approach consists in customizing the map via javascript using the Google Maps JavaScript API. The downside of these two approaches is that it requires the client to download complex pieces of JavaScript. With mobiles, the bandwidth is always a bottleneck. Additional, the clients on some older mobiles may not be advanced or powerful enough to let the user interact, and in some cases, view the map.

The third option then consists in relying on static images to deliver maps. Google provides such a functionality via the Static Maps API. This service creates a map based on URL parameters sent through a standard HTTP request and returns the map as an image that can be displayed on the web page. Similarly to custom maps, placemarks and lines can be added via additional URL parameters.

A common scenario is to create and publish a custom map, and choose to convert it later to a static image for an easier consumption by mobiles. Unfortunately, there is no built-in mechanism to convert a custom map to an equivalent static map. The solution starts by downloading the KML file of your custom map. As KML is based on the XML standard, it can be processed by a XSL transformation to generate a static URL with a format compatible with the Google Static Maps API.

Scroll quickly to a column with SAS Entreprise Guide

Finding a specific column while browsing a wide table with SAS Entreprise Guide may be a little bit tricky.

One tip that will save you time is to use the shortcut Control + G with the data editor. It creates the "Go to Cell" pop-up window that allows you to go to a specific column by either specifying the column position or the column name. In addition, you can cycle through the columns starting with a particular letter by selecting the drop-down list and pressing the key corresponding to this letter.

Linking to a folder in SharePoint

Linking documents in SharePoint is a quite common task. For example, a local PowerPoint presentation may contain a link to a Word document stored in SharePoint. There may be also cases where the author needs to refer not only to a single document, but also to a folder stored in SharePoint. It turns out that the process of retrieving the URL of a folder in SharePoint is different than the method used for a document.

Coalesce in SAS

Coalescing refers to the process of checking the value of each input parameter in the order in which they are listed and returns the first non-missing value. In SAS, the behavior of each of the coalesce functions depends on the processing context, either in a data step or in a PROC SQL statement. These differences are important to acknowledge, especially when the code is migrated from PROC SQL to a data step.

Suppose, for example, that the following piece of code needs to be modified into a data step:

  1. proc sql;
  2. create table foo2 as
  3. select coalesce(colum1, column2) as coalesce_column
  4. from foo;
  5. quit;

The intuitive approach would be to simply rewrite the code as follows:

  1. data foo2;
  2. set foo;
  3. coalesce_column = coalesce(colum1, column2);
  4. run;

Although this approach seems to be correct at first glance, it may cause a potential issue: the coalesce function in the context of a data step treats parameters as numeric values. More specifically, if column1 and column2 are characters, the automatic SAS conversion kicks in by trying to convert these values to numerics. If such a conversion fails, a null value will be passed to the function. Simply switching to the character-compatible function, coalescec, may still have some side-effects as we will demonstrate in the following sections.

Pages

Subscribe to Front page feed