Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create the RegisteredFile object (This API fetches the Registered File object and sets column details in the Fetch step)

    Code Block
    languagejava
    /**
    * method to create Registered File object in Repository Manager.
    * @param folderPath: Full path of the datasource file.
    * @param userInfo: Object of type UserInfo containing information about logged in user.
    * @return RegisteredFile: Object of type RegisteredFile.
    */
    public RegisteredFile registerCSVFile(String folderPath, UserInfo userInfo);
  2. Create the RegisteredFile object using HCatalogSource.

    Code Block
    languagejava
    /**
    * method to create Registered File object in Repository Manager.
    * @param hcatalog: Object of type HCatalogSource.
    * @param userInfo: Object of type UserInfo containing information about logged in user.
    * @return RegisteredFile: Object of type RegisteredFile.
    */
    public RegisteredFile registerHCatalogDataSource(HCatalogSource hcatalog, UserInfo userInfo);
    /**
    * method to create Registered File object using HCatalog database and table name.
    * @param dbName: Name of the hCatalog database.
    * @param tableName: Name of the hCatalog table.
    * @param userInfo: Object of type UserInfo containing information about logged in user
    * @return RegisteredFile: Object of type RegisteredFile.
    * @throws ReportObjectException.
    */
    public RegisteredFile registerHCatalogDataSource(String dbName, String tableName, UserInfo userInfo);
  3. Fetch columns from the RegisteredFile object.

    Code Block
    languagejava
    /*
    * @return ArrayList<FetchColumn>: ArrayList of FetchColumn objects.
    */
    public ArrayList<FetchColumn> getColumnDetails();
    /*
     * On iterating this ArrayList, user will get a FetchColumn object for each column.
    */
    public void setName(String columnName);
    public void setDataType(String dataType);
    public void setFieldFormat(String fieldFormat);
    public void setColumnDetails(ArrayList <FetchColumn> columnList);
  4. Add the RegisteredFile object to the repository.

    Code Block
    languagejava
    /**
    * method to add new Registered File in Repository Manager.
    * @param regFileObj: Object of type RegisteredFile.
    * @return ResponseStatus: Object of type ResponseStatus.
    */
    public ResponseStatus addRegisteredFileObject(RegisteredFile regFileObj);
    /**  
    * method to add new Registered File inside a folder in Repository Manager.
    * @param regFileObj: Object of type RegisteredFile.
    * @param folderName: Name of the folder in which RegisteredFile has to be added.
    * @return ResponseStatus: Object of type ResponseStatus.
    */
    public ResponseStatus addRegisteredFileObject(RegisteredFile regFileObj,String folderName);
  5. Retrieve existing RegisteredFile object from repository.

    Code Block
    languagejava
    /**
    * method to get RegisteredFile object by Registered File name in Repository Manager.
    * @param registeredFileName: name of the Registered File.
    * @param userInfo: Object of type UserInfo containing information about logged in user.
    * @return regFileObj: Object of type RegisteredFile.
    */
    public RegisteredFile getRegisteredFileByName(String registeredFileName, UserInfo userInfo);
    /**
    * method to get RegisteredFile object by Registered File name and folder name in Repository Manager.
    * @param registeredFileName: Name of the Registered File.
    * @param folderName: Name of the folder that contains the Registered File.
    * @param userInfo: Object of type UserInfo containing information about logged in user.
    * @return regFileObj: Object of type RegisteredFile.
    */
    public RegisteredFile getRegisteredFileByName(String registeredFileName,String folderName,UserInfo userInfo);
  6. Update CSV properties of existing RegisteredFile object.

    1. Update CSV file path

      Code Block
      languagejava
      /**
      * method to update CSV file path of existing Registered File.
      * @param csvPath: Full path of the CSV file.
      */
      public void updateCSVPath(String csvPath);
    2. Update line separator character.

      Code Block
      languagejava
      /**
      * method to update line separator of existing Registered File.
      * @param lineSeparator: Line separator used within the Registered File.
      */
      public void updateLineSeparator(String lineSeparator);
    3. Update field separator character.

      Code Block
      languagejava
      /**
      * method to update field separator of existing Registered File.
      * @param fieldSeparator: Field separator used within the Registered File.
      */
      public void updateFieldSeparator(String fieldSeparator);
    4. Update escape character

      Code Block
      languagejava
      /**
      * method to update Escape Character of existing Registered File.
      * @param escapeChar: Escape character used within the Registered File.
      */
      public void updateEscapeCharacter(String escapeChar);
    5. Update enclosed by character.

      Code Block
      languagejava
      /**
      * method to update enclosure of existing Registered File.
      * @param enclosedBy: Enclosed-by character used within the Registered File.
      */
      public void updateEnclosedBy(String enclosedBy);
      
    6. Update skip toplines.

      Code Block
      languagejava
      /**
      * method to update skip top lines of existing Registered File.
      * @param skipTopLine: Specify whether to skip top line of the Registered File or not. ‘1’: to skip, else ‘0’ to include top line.
      */
      public void updateSkipTopLines(int skipTopLine); 
    7. Update encoding style.

      Code Block
      /**
      * method to update encoding of existing Registered File.
      * @param encoding: Encoding style of the Registered File.
      */
      public void updateEncoding(String encoding);
    8. Update if file contains header.

      Code Block
      languagejava
      /**
      * method to update contains header of existing Registered File.
      * @param header: Specify whether to include header of the Registered File or not.
      */
      public void updateHeader(boolean header);
    9. Update if need to ignore empty rows

      Code Block
      /**
      * method to update ignoreEmptyRows of existing Registered File.
      * @param ignoreEmptyRows: Specify whether to ignore empty rows of the Registered File or not.
      */
      public void updateIgnoreEmptyRows(boolean ignoreEmptyRows);
    10. Update to include file name as column.

      Code Block
      languagejava
      /**
      * method to update nameAsColumn of existing Registered File.
      * @param nameAsColumn: Specify whether to include file name as column of the Registered File or not.
      */
      public void updateNameAsColumn(boolean nameAsColumn);
  7. Refresh RegisteredFile columns upon updating CSV properties.

    Code Block
    languagejava
    /**
    * method to refresh Registered File Column.
    */
    public void refreshRegisteredFileColumn();
  8. Update the RegisteredFile object in the repository.

    Code Block
    languagejava
    /**
    * method to update existing Registered File in Repository Manager.
    * @param regFileObj: Object of type RegisteredFile.
    */
    public void updateRegisteredFileObject(RegisteredFile regFileObj);
    
  9. Preview on Register Files.

    Code Block
    languagejava
    /* method to preview on Register File 
    @return iResultSet: Type of object IResultSet 
    */ 
    public preview() code
  10. Data profile for File with ONCE option.

    Code Block
    languagejava
    /**
    * method to add ONCE Data profile schedule for file object
    * @param qo: Object of type QueryObject containing file info
    * @param onceDateTime: date time in format mm/dd/yyyy hh:mm
    * @param profile: Object of type DataProfile containing field information
    * @param userInfo: Object of type UserInfo containing information about logged in user
    * @param buildConnectionName: name of buildprocess connection
    * @throws ClientException
    */
    public void profileFileOnce(QueryObject qo, String onceDateTime, DataProfile profile, UserInfo userInfo, String buildConnectionName) throws ClientException
  11. Data profile for File with NOW option. 

    Code Block
    languagejava
    /**  
    * method to add NOW Data profile schedule for file object  
    * @param qo: Object of type Query Object containing file info
    * @param profile: Object of type DataProfile containing field information  
    * @param userInfo: Object of type UserInfo containing information about logged in user 
    * @param buildConnectionName: name of buildprocess connection  
    * @throws ClientException
    */
    public void profileFileNow(QueryObject qo, DataProfile profile, UserInfo userInfo, String buildConnectionName) throws ClientException
  12.  Constructor to create a blank file containing a fetch step and a filter step linked together.

    Code Block
    /**
    * RegisteredFile's default constructor - to create RegisteredFile object with empty fetch and filter step linked to each other.
    */
    public RegisteredFile() throws Exception
  13. Set an ID of the registered file.

    Code Block
    /** Method to add registered file id.
    * @param id The id to set.*/public void setId(String id)
  14. Get a registered file id.   

    Code Block
    /** Method to get registered file id
    * @return Returns the id.
    */
    public String getId()
  15.  Set a folder id of the registered file.   

    Code Block
    /**
    * This method to set folder id for File.
    * @param String id;
    */
    public void setFolderId(String folderId)
  16. Set a folder name of the registered file.

    Code Block
    /**
    * This method to set folder name for File.
    * @param String name;
     */
    public void setFolderName(String folderName)
  17. Set a connection name in the registered file to connect with the data source.

    Code Block
    /**
     * method to set connection name of existing Registered File
     * @param connectionName String
     */
    public void setConnectionName(String connectionName)
  18.  Set input type in a file.

    Code Block
    /**
    * Method to create data source and update fetch step as per the provided input type.
    * @param RFInputTypes: Input Type for File.
    */
    public void setConnectionName(String connectionName)
  19. Add a filter in the registered file. 

    Code Block
    /**
    * Method to add filters in the filter step.
    * @param fieldName
    * @param operation
    * @param firstValue
    * @param secondValue
    * @param fieldDataType
    */
    public void addFilter(String fieldName, String operation , String firstValue, String secondValue, String fieldDataType)
  20. Add or update a user parameter. 

    Code Block
    /**
    * Method to add or update a parameter. if a parameter with given name already exists then it will update it, else will add a new parameter.
    * @param name
    * @param value
    * @param description
    */
    public void addOrUpdateQOPrameter(String name, String value, String description)
  21. Remove a user parameter from the file. 

    Code Block
    /**
    * Method to remove a parameter by it's name.
    * @param name
    */
    public void removeParameter(String name)
  22. Set column metadata into the file.

    Code Block
    /**
    * This method is used to column details into a Registered file object
    * @param ArrayList of FetchColumn
    */
    public void setColumnDetails(List columnDetails) 
  23. Get the input type of the file.

    Code Block
    /**
    * Method to return inputType
    * @return RFInputTypes: Input Type for File.
    */
    public RFInputTypes getInputType()
  24. Get FilterStep from the registered file.

    Code Block
    /**
    * method to get FilterStep from registered file
    * @return FilterStep object.
    */
    public FilterStep getFilterStep()
  25. Set and get partition column details on the registered File.

    1. Get incremental identifier column name.

      Code Block
      /**
      * This method to get incremental identifier column name.
      * @return incremental identifier column name.
      */
      public void setPartitionColumnName(String val)
    2. Set partition table name.

      Code Block
      /**
      * This method to set partition table name.
      * @param String name.
      */
      public void setPartitionTableName(String val)
    3. Set the partition column's metadata mode. 

      Code Block
      /**
      * This method to set partition column's metadata mode
      * @param mode
      */
      public void setPartitionColumnMetadataMode(String mode)
    4. Set the partition column's minimum value.

      Code Block
      /**
      * This method to set partition column's min value
      * @param minvalue
      */
      public void setPartitionColumnMinValue(String minvalue)
    5. Set the partition column's maximum value.

      Code Block
      /**
      * This method to set partition column's max value
      * @param maxvalue
      */
      public void setPartitionColumnMaxValue(String max)
    6. Set the partition column's record count.

      Code Block
      /**
      * This method to set partition column's record count
      * @param recordCount
      */
      public void setPartitionTableRecordCount(String count)
    7. Set the number of partitions.

      Code Block
      /**
      * This method to set number of partitions
      * @param partitions
      */
      public void setNumberOfPartitions(String val)
  26. Set incremental identifier column in the registered file.

    Code Block
    /**
    * This method to set incremental identifier column in registered file.
    * @param String identifier column name;
    */
    public void setIncrementalIDColumnName(String val)

...