...
Create the RegisteredFile object (This API fetches the Registered File object and sets column details in the Fetch step)
Code Block language java /** * 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);
Create the RegisteredFile object using HCatalogSource.
Code Block language java /** * 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);
Fetch columns from the RegisteredFile object.
Code Block language java /* * @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);
Add the RegisteredFile object to the repository.
Code Block language java /** * 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);
Retrieve existing RegisteredFile object from repository.
Code Block language java /** * 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);
Update CSV properties of existing RegisteredFile object.
Update CSV file path
Code Block language java /** * method to update CSV file path of existing Registered File. * @param csvPath: Full path of the CSV file. */ public void updateCSVPath(String csvPath);
Update line separator character.
Code Block language java /** * method to update line separator of existing Registered File. * @param lineSeparator: Line separator used within the Registered File. */ public void updateLineSeparator(String lineSeparator);
Update field separator character.
Code Block language java /** * method to update field separator of existing Registered File. * @param fieldSeparator: Field separator used within the Registered File. */ public void updateFieldSeparator(String fieldSeparator);
Update escape character
Code Block language java /** * method to update Escape Character of existing Registered File. * @param escapeChar: Escape character used within the Registered File. */ public void updateEscapeCharacter(String escapeChar);
Update enclosed by character.
Code Block language java /** * method to update enclosure of existing Registered File. * @param enclosedBy: Enclosed-by character used within the Registered File. */ public void updateEnclosedBy(String enclosedBy);
Update skip toplines.
Code Block language java /** * 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);
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);
Update if file contains header.
Code Block language java /** * 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);
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);
Update to include file name as column.
Code Block language java /** * 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);
Refresh RegisteredFile columns upon updating CSV properties.
Code Block language java /** * method to refresh Registered File Column. */ public void refreshRegisteredFileColumn();
Update the RegisteredFile object in the repository.
Code Block language java /** * method to update existing Registered File in Repository Manager. * @param regFileObj: Object of type RegisteredFile. */ public void updateRegisteredFileObject(RegisteredFile regFileObj);
Preview on Register Files.
Code Block language java /* method to preview on Register File @return iResultSet: Type of object IResultSet */ public preview() code
Data profile for File with ONCE option.
Code Block language java /** * 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
Data profile for File with NOW option.
Code Block language java /** * 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
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
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)
Get a registered file id.
Code Block /** Method to get registered file id * @return Returns the id. */ public String getId()
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)
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)
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)
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)
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)
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)
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)
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)
Get the input type of the file.
Code Block /** * Method to return inputType * @return RFInputTypes: Input Type for File. */ public RFInputTypes getInputType()
Get FilterStep from the registered file.
Code Block /** * method to get FilterStep from registered file * @return FilterStep object. */ public FilterStep getFilterStep()
Set and get partition column details on the registered File.
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)
Set partition table name.
Code Block /** * This method to set partition table name. * @param String name. */ public void setPartitionTableName(String val)
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)
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)
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)
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)
Set the number of partitions.
Code Block /** * This method to set number of partitions * @param partitions */ public void setNumberOfPartitions(String val)
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)
...