public String toPigScript ( Descriptor msgDescriptor , String loaderClassName ) { StringBuffer sb = new StringBuffer ( ) ; final int initialTabOffset = 3 ; sb . append ( "raw_data = load '$INPUT_FILES' using " + loaderClassName + "()" ) . append ( "\n" ) ; sb . append ( tabs ( initialTabOffset ) ) . append ( "as (" ) . append ( "\n" ) ; sb . append ( toPigScriptInternal ( msgDescriptor , initialTabOffset ) ) ; sb . append ( tabs ( initialTabOffset ) ) . append ( ");" ) . append ( "\n" ) . append ( "\n" ) ; return sb . toString ( ) ; }
Turn a generic message descriptor into a loading schema for a pig script .