Registering nicknames for HDFS data source

For each HDFS server definition that you register, you must register a nickname for each collection that you want to access. Use these nicknames, instead of the names of the data source objects, when you query the HDFS data source servers.

About this task

When you register a nickname on a parquet file, the federated server establishes a mapping between the federated server columns and the columns of parquet data. The mapping is created automatically by federation server. This is similar to relational database except the mapping is created in ODBC or JDBC driver. Nickname is a mechanism to resolve Db2 column and parquet column mapping.


  1. Find the location of the parquet file you want to federate. The location meaning the file path in hadoop file system. For example, /data/spark/file1.parquet.
  2. Create nickname for this specific parquet file by issuing command:
    create nickname nick_name for server server_name options (filepath '/data/spark/file1.parquet')
    where filepath is a special option for hdfsparquet type of server. It indicates the file path on hadoop file system. Nicknames can be up to 128 characters in length.

What to do next

Repeat this step for each of the parquet file that you want to create a nickname for. Next, you can test query data using these nick names.