Basic Functions
Use the following basic functions to get basic OFSAA Metadata details, basic Model details and basic Run details:
- ofs_get_log_handle()
- ofs_get_model_id()
- ofs_get_model_version()
- ofs_get_model_name()
- ofs_get_batch_run_id()
- ofs_get_task_id()
- ofs_get_infodom()
- ofs_get_dataset_codes()
- ofs_get_dataset_names()
- ofs_get_dataset_queries()
- ofs_get_output_names()
- ofs_get_meta_data_info()
- ofs_get_hive_schema_name()
Examples:
model_id = OFSAAIRunnerHDFS::ofs_get_model_id(); batch_run_id =
OFSAAIRunnerHDFS::ofs_get_batch_run_id(); meta_data_list =
OFSAAIRunnerHDFS::ofs_get_meta_data_info(); ofs_get_meta_data_info() is a special
function for getting dataset and variable and its mapping info. This function
returns a list for each of the dataset.
Sample list for a single dataset looks like as given:
variable.names - contains all the script variables mapped for the dataset.
variable.index - contains the index of each selected variable in the dataset query.
variable.entity.attributes - contains actual base entity and attributes for the
selected mata-data variable. dataset.base.entities - contains all the base entities
part of the dataset. dataset.query - contains dataset query for fetching data.
Note:
All these attributes are available as vectors within the list.print( meta_data_list );
$`Dataset_Name
$`Dataset_Name`$variable.names
[1] "x" "y" "z"
$`Dataset_Name`$variable.index [1] "1" "2:3" "4"
$`Dataset_Name`$variable.entity.attributes
[1] "DATASET_TABLE_1.DATASET_COLUMN1"
"DATASET_TABLE_2.DATASET_COLUMN2"
"DATASET_TABLE_2.DATASET_COLUMN3" "DATASET_TABLE_3.DATASET_COLUMN4"
$`Dataset_Name`$dataset.base.entities
[1] "DATASET_TABLE_1" "DATASET_TABLE_2" "DATASET_TABLE_3"
$`Dataset_Name`$dataset.query
[1] "Dataset Query"
Note:
For multiple datasets, preceding lists get appended.ofs_get_log_handle() : returns, handle to an existing log handle.
ofs_get_model_id() : returns, ID of the Model, as character/string.
ofs_get_model_version() : returns, Version of the Model, as numeric.
ofs_get_model_name() : returns, Name of the Model, as
character/string.
ofs_get_batch_run_id() : returns, Batch Run Id of the Current Batch, in
which model is added for the execution, as character/string.
ofs_get_task_id() : returns, Task Id of the Model in current Batch,
character/string
ofs_get_infodom() : returns, OFSAA information Domain (Infodom ) Name, as
character/string.
ofs_get_dataset_codes() : returns, Dataset-Codes for all the selected datasets,
as character vector.
ofs_get_dataset_names() : returns, Dataset-Names for all the selected datasets,
as character vector.
ofs_get_dataset_queries() : returns, Dataset-Queries for all the selected
datasets, as character vector.
ofs_get_output_names() : returns, selected Output names, as character
vector.
ofs_get_hive_schema_name() : returns, Hive schema name, as character/string.