diff --git a/ansible/roles/stack-sunbird/templates/ml-analytics-service.conf b/ansible/roles/stack-sunbird/templates/ml-analytics-service.conf index 935085d36a..9787c1efe8 100644 --- a/ansible/roles/stack-sunbird/templates/ml-analytics-service.conf +++ b/ansible/roles/stack-sunbird/templates/ml-analytics-service.conf @@ -1,265 +1,265 @@ [ML_APP_NAME] -survey_app = {{ ml_analytics_survey_app_name }} +survey_app = "{{ ml_survey_app_name | default('sunbirdsurvey') }}" -integrated_app = {{ ml_analytics_integrated_app_name }} +integrated_app = "{{ ml_integrated_app_name | default('sunbird') }}" -integrated_portal = {{ ml_analytics_integrated_portal }} +integrated_portal = "{{ ml_integrated_portal | default('dev.sunbird.portal') }}" [API_ENDPOINTS] -base_url = {{ ml_analytics_api_base_url }} +base_url = "https://{{ domain_name }}/" [API_HEADERS] content_type = application/json -authorization = {{ ml_analytics_api_authorization_key }} +authorization = "{{ml_api_auth_token | default('sunbird_api_auth_token')}}" -internal_access_token = {{ ml_analytics_api_access_token }} +internal_access_token = "{{ml_api_access_token | default('ml_core_internal_access_token')}}" -authorization_access_token = {{ ml_analytics_authorization_access_token }} +authorization_access_token = "{{ ml_analytics_authorization_access_token }}" [ML_SURVEY_SERVICE_URL] -url = {{ ml_analytics_survey_service }} +url = "http://{{private_ingressgateway_ip}}/ml-survey" entity_related_end_point = assessment/api/v1/entities/relatedEntities/ user_profile_end_point = assessment/api/v1/userExtension/getProfile/ -evidence_base_url = {{ ml_analytics_evidence_base_url }} +evidence_base_url = "{{ cloud_storage_url }}/{{ ml_analytics_public_storage }}/" [MONGO] -url = mongodb://{{ ml_analytics_mongodb_url }} +url = "mongodb://{{ml_mongodb_host | default(groups['mongo_master'][0]+':27017')}}" -database_name = {{ ml_analytics_mongo_db_name }} +database_name = "{{ml_mongodb | default('ml-survey')}}" # ------ Mongo Collections ------- # -observation_sub_collection = {{ ml_analytics_mongo_observation_submission_collection }} +observation_sub_collection = observationSubmissions -solutions_collection = {{ ml_analytics_mongo_solution_collection }} +solutions_collection = solutions -observations_collection = {{ ml_analytics_mongo_observation_collection }} +observations_collection = observations -entity_type_collection = {{ ml_analytics_mongo_entity_type_collection }} +entity_type_collection = entityTypes -questions_collection = {{ ml_analytics_mongo_question_collection }} +questions_collection = questions -criteria_collection = {{ ml_analytics_mongo_criteria_collection }} +criteria_collection = criteria -entities_collection = {{ ml_analytics_mongo_entities_collection }} +entities_collection = entities -programs_collection = {{ ml_analytics_mongo_program_collection }} +programs_collection = programs -user_roles_collection = {{ ml_analytics_mongo_userroles_collection }} +user_roles_collection = userRoles -criteria_questions_collection = {{ ml_analytics_mongo_criteria_questions_collection }} +criteria_questions_collection = criteriaQuestions -projects_collection = {{ ml_analytics_mongo_projects_collection }} +projects_collection = projects -survey_submissions_collection = {{ ml_analytics_mongo_survey_submissions_collection }} +survey_submissions_collection = surveySubmissions -survey_collection = {{ ml_analytics_mongo_survey_collection }} +survey_collection = surveys [DRUID] -metadata_url = http://{{ ml_analytics_druid_url }}/druid/coordinator/v1/datasources/ +metadata_url = "http://{{groups['druid'][0]}}:8081/druid/coordinator/v1/datasources/" -batch_url = http://{{ ml_analytics_druid_url }}/druid/indexer/v1/task +batch_url = "http://{{groups['druid'][0]}}:8081/druid/indexer/v1/task" -metadata_rollup_url = http://{{ ml_analytics_druid_rollup_url }}/druid/coordinator/v1/datasources/ +metadata_rollup_url = "http://{{groups['druid'][0]}}:8081/druid/coordinator/v1/datasources/" -batch_rollup_url = http://{{ ml_analytics_druid_rollup_url }}/druid/indexer/v1/task +batch_rollup_url = "http://{{groups['druid'][0]}}:8081/druid/indexer/v1/task" -urlQuery = http://{{ ml_analytics_druid_query_url }}/druid/v2?pretty +urlQuery = "http://{{groups['druid'][0]}}:8082/druid/v2?pretty" -observation_status_injestion_spec = {{ ml_analytics_druid_observation_status_injestion_spec }} +observation_status_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-observation-status","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"auto"},"dimensionsSpec":{"dimensions":["status","entity_externalId","entity_id","entity_type","solution_id","solution_externalId","submission_id","entity_name","solution_name","role_title","school_name","school_code","school_externalId","state_name","state_code","state_externalId","district_name","district_code","district_externalId","block_name","block_code","block_externalId","cluster_name","cluster_code","cluster_externalId","completedDate","channel","parent_channel","program_id","program_externalId","program_name","app_name","user_id","private_program","solution_type","organisation_name","ecm_marked_na","board_name","updatedAt","organisation_id","user_type","observed_school_name","observed_school_id","observed_school_code","observed_state_name","observed_state_id","observed_state_code","observed_district_name","observed_district_id","observed_district_code","observed_block_name","observed_block_id","observed_block_code","observed_cluster_name","observed_cluster_id","observed_cluster_code","isRubricDriven","criteriaLevelReport"]},"metricsSpec":[]}}}' -project_injestion_spec = {{ ml_analytics_druid_project_injestion_spec }} +project_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-project","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"project_updated_date","format":"auto"},"dimensionsSpec":{"dimensions":[]},"metricsSpec":[]}}}' -ml_distinctCnt_obs_status_spec = {{ ml_analytics_druid_distinctCnt_obs_injestion_spec }} +ml_distinctCnt_obs_status_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"status"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}' -ml_distinctCnt_obs_domain_spec = {{ ml_analytics_druid_distinctCnt_obs_domain_injestion_spec }} +ml_distinctCnt_obs_domain_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-domain","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"string","name":"domain_name"},{"type":"string","name":"domain_externalId"},{"type":"string","name":"domain_level"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}' -ml_distinctCnt_obs_domain_criteria_spec = {{ ml_analytics_druid_distinctCnt_obs_domain_criteria_injestion_spec }} +ml_distinctCnt_obs_domain_criteria_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-domain-criteria","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"string","name":"domain_name"},{"type":"string","name":"domain_externalId"},{"type":"string","name":"domain_level"},{"type":"string","name":"criteria_name"},{"type":"string","name":"criteria_score"},{"type":"string","name":"criteria_id"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}' -ml_distinctCnt_projects_status_spec = {{ ml_analytics_druid_distinctCnt_projects_status_injestion_spec }} +ml_distinctCnt_projects_status_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"project_title"},{"type":"string","name":"solution_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"long","name":"no_of_imp_with_evidence_inprogress"},{"type":"string","name":"time_stamp"},{"type":"long","name":"no_of_certificate_issued"}]},"metricsSpec":[]}}}' -ml_distinctCnt_prglevel_projects_status_spec = {{ ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec }} +ml_distinctCnt_prglevel_projects_status_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-programLevel-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"string","name":"time_stamp"},{"type":"long","name":"no_of_certificate_issued"}]},"metricsSpec":[]}}}' -ml_distinctCnt_survey_status_spec ={{ ml_analytics_druid_distinctCnt_survey_injestion_spec }} +ml_distinctCnt_survey_status_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-surveydistinctCount-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"survey_name"},{"type":"string","name":"survey_id"},{"type":"string","name":"submission_status"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"private_program"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_submissions"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}' -observation_status_rollup_injestion_spec = {{ ml_analytics_druid_observation_status_rollup_injestion_spec }} +observation_status_rollup_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-observation-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["status","user_id","solution_id","submission_id","entity_name","completedDate","program_id","private_program","solution_type","updatedAt","role_title","solution_name","program_name","channel","parent_channel","block_name","district_name","school_name","cluster_name","state_name","organisation_name","board_name","district_externalId","state_externalId","block_externalId","cluster_externalId","school_externalId","organisation_id",{"type":"long","name":"status_code"}]},"metricsSpec":[{"type":"count","name":"count"},{"type":"longSum","name":"sum___v","fieldName":"__v","expression":null},{"type":"HLLSketchBuild","name":"count_distinct_solution","fieldName":"solution_id","lgK":12,"tgtHllType":"HLL_4","round":false},{"type":"HLLSketchBuild","name":"count_distinct_submission_id","fieldName":"submission_id","lgK":12,"tgtHllType":"HLL_4","round":false},{"type":"HLLSketchBuild","name":"count_distinct_user_id","fieldName":"user_id","lgK":12,"tgtHllType":"HLL_4","round":false}]}}}' -project_rollup_injestion_spec = {{ ml_analytics_druid_project_rollup_injestion_spec }} +project_rollup_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"project_updated_date","format":"iso"},"dimensionsSpec":{"dimensions":["project_title","project_goal","area_of_improvement","status_of_project","tasks_name","tasks_status","designation","task_evidence_status","project_id","task_id","project_created_type","parent_channel","program_id","program_name","project_updated_date","createdBy","program_externalId","private_program","task_deleted_flag","project_terms_and_condition","state_externalId","block_externalId","district_externalId","cluster_externalId","school_externalId","state_name","block_name","district_name","cluster_name","school_name","board_name","organisation_name","solution_id","organisation_id",{"name":"status_code","type":"long"}]},"metricsSpec":[{"name":"count","type":"count"},{"name":"sum___v","type":"longSum","fieldName":"__v"},{"name":"sum_status_code","type":"longMax","fieldName":"status_code"},{"type":"HLLSketchBuild","name":"count_of_createBy","fieldName":"createdBy"},{"type":"HLLSketchBuild","name":"count_of_project_id","fieldName":"project_id"},{"type":"HLLSketchBuild","name":"count_of_solution_id","fieldName":"solution_id"},{"type":"HLLSketchBuild","name":"count_of_program_id","fieldName":"program_id"}]}}}' -ml_survey_rollup_spec = {{ml_analytics_druid_survey_rollup_injestion_spec}} +ml_survey_rollup_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-survey-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":true,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["survey_submission_id", "submission_status", "user_id", "user_sub_type", "user_type", "state_externalId", "block_externalId", "district_externalId", "cluster_externalId", "school_externalId", "state_name", "block_name", "district_name", "cluster_name", "school_name", "board_name", "organisation_id", "organisation_name", "program_externalId", "program_id", "program_name", "survey_name", "survey_id", "survey_externalId", "created_date", "submission_date", "updatedAt", "parent_channel",{"type":"long","name":"status_code"}, "solution_name", "solution_id"]},"metricsSpec":[{"name":"count","type":"count"},{"name":"sum___v","type":"longSum","fieldName":"__v"},{"name":"sum_status_code","type":"longMax","fieldName":"status_code"},{"type":"HLLSketchBuild","name":"count_of_user_id","fieldName":"user_id"},{"type":"HLLSketchBuild","name":"count_of_survey_submission_id","fieldName":"survey_submission_id"},{"type":"HLLSketchBuild","name":"count_of_solution_id","fieldName":"solution_id"},{"type":"HLLSketchBuild","name":"count_of_program_id","fieldName":"program_id"}]}}}' -survey_status_injestion_spec = {{ ml_analytics_druid_survey_status_injestion_spec }} +survey_status_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-survey-status","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":true,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["survey_submission_id", "submission_status", "user_id", "user_sub_type", "user_type", "state_externalId", "block_externalId", "district_externalId", "cluster_externalId", "school_externalId", "state_name", "block_name", "district_name", "cluster_name", "school_name", "board_name", "organisation_id", "organisation_name", "program_externalId", "program_id", "program_name", "survey_name", "survey_id", "survey_externalId", "created_date", "submission_date", "updatedAt", "parent_channel", "solution_name", "solution_id","private_program","state_code","school_code","district_code","block_code","cluster_code"]},"metricsSpec":[]}}}' -observation_query_spec = {{ ml_analytics_druid_observation_query_spec }} +observation_query_spec = '{"queryType":"scan","dataSource":"sl-observation","resultFormat":"list","columns":["completedDate","createdAt","createdBy","criteriaExternalId","criteriaId","criteriaName","entityType","entityTypeId","observationId","observationName","observationSubmissionId","questionAnswer","questionECM","questionExternalId","questionId","questionName","questionResponseLabel","questionResponseType","solutionExternalId","solutionId","solutionName","updatedAt","instanceParentId","instanceId","instanceParentResponsetype","instanceParentQuestion","questionSequenceByEcm","maxScore","minScore","percentageScore","pointsBasedScoreInParent","totalScore","scoreAchieved","totalpercentage","instanceParentExternalId","instanceParentEcmSequence","remarks","total_evidences","evidence_count","school","block","district","cluster","state","schoolName","blockName","districtName","clusterName","stateName","schoolExternalId","blockExternalId","districtExternalId","clusterExternalId","stateExternalId","schoolTypes","administrationTypes","instanceParentCriteriaId","instanceParentCriteriaExternalId","instanceParentCriteriaName","role_title","location_validated_with_geotag","distance_in_meters","entity","entityExternalId","entityName","isAPrivateProgram","programId","programName","programExternalId","questionResponseLabel_number","criteriaLevel","criteriaScore","submissionNumber","submissionTitle","channel","parent_channel","user_districtName","user_blockName","user_clusterName","appName","evidences","user_stateName","domainName","domainExternalId","childName","childType","childExternalid","level","criteriaDescription","programDescription","solutionDescription","label","imp_project_id","imp_project_title","imp_project_goal","imp_project_externalId","ancestorName","scoringSystem","domainLevel","domainScore","criteriaLevelReport","user_schoolName","user_schoolId","user_schoolUDISE_code","solution_type","organisation_name","user_boardName","district_externalId","state_externalId","block_externalId","cluster_externalId","organisation_id","user_type"],"intervals":["1901-01-01T00:00:00+00:00/2101-01-01T00:00:00+00:00"]}' -observation_injestion_spec = {{ml_analytics_druid_observation_batch_ingestion_spec}} +observation_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-observation","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"completedDate","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"completedDate"},{"type":"string","name":"createdAt"},{"type":"string","name":"createdBy"},{"type":"string","name":"criteriaExternalId"},{"type":"string","name":"criteriaId"},{"type":"string","name":"criteriaName"},{"type":"string","name":"entityType"},{"type":"string","name":"entityTypeId"},{"type":"string","name":"observationId"},{"type":"string","name":"observationName"},{"type":"string","name":"observationSubmissionId"},{"type":"string","name":"questionAnswer"},{"type":"string","name":"questionECM"},{"type":"string","name":"questionExternalId"},{"type":"string","name":"questionId"},{"type":"string","name":"questionName"},{"type":"string","name":"questionResponseLabel"},{"type":"string","name":"questionResponseType"},{"type":"string","name":"solutionExternalId"},{"type":"string","name":"solutionId"},{"type":"string","name":"solutionName"},{"type":"string","name":"updatedAt"},{"type":"string","name":"instanceParentId"},{"type":"string","name":"instanceId"},{"type":"string","name":"instanceParentResponsetype"},{"type":"string","name":"instanceParentQuestion"},{"type":"string","name":"questionSequenceByEcm"},{"type":"string","name":"maxScore"},{"type":"string","name":"minScore"},{"type":"string","name":"percentageScore"},{"type":"string","name":"pointsBasedScoreInParent"},{"type":"string","name":"totalScore"},{"type":"string","name":"scoreAchieved"},{"type":"string","name":"totalpercentage"},{"type":"string","name":"instanceParentExternalId"},{"type":"string","name":"instanceParentEcmSequence"},{"type":"string","name":"remarks"},{"type":"string","name":"total_evidences"},{"type":"string","name":"evidence_count"},{"type":"string","name":"school"},{"type":"string","name":"block"},{"type":"string","name":"district"},{"type":"string","name":"cluster"},{"type":"string","name":"state"},{"type":"string","name":"schoolName"},{"type":"string","name":"blockName"},{"type":"string","name":"districtName"},{"type":"string","name":"clusterName"},{"type":"string","name":"stateName"},{"type":"string","name":"schoolExternalId"},{"type":"string","name":"blockExternalId"},{"type":"string","name":"districtExternalId"},{"type":"string","name":"clusterExternalId"},{"type":"string","name":"stateExternalId"},{"type":"string","name":"schoolTypes"},{"type":"string","name":"administrationTypes"},{"type":"string","name":"instanceParentCriteriaId"},{"type":"string","name":"instanceParentCriteriaExternalId"},{"type":"string","name":"instanceParentCriteriaName"},{"type":"string","name":"role_title"},{"type":"string","name":"location_validated_with_geotag"},{"type":"string","name":"distance_in_meters"},{"type":"string","name":"entity"},{"type":"string","name":"entityExternalId"},{"type":"string","name":"entityName"},{"type":"string","name":"isAPrivateProgram"},{"type":"string","name":"programId"},{"type":"string","name":"programName"},{"type":"string","name":"programExternalId"},{"name":"questionResponseLabel_number","type":"float"},{"type":"string","name":"criteriaLevel"},{"type":"string","name":"criteriaScore"},{"type":"string","name":"submissionNumber"},{"type":"string","name":"submissionTitle"},{"type":"string","name":"channel"},{"type":"string","name":"parent_channel"},{"type":"string","name":"user_districtName"},{"type":"string","name":"user_blockName"},{"type":"string","name":"user_clusterName"},{"type":"string","name":"appName"},{"type":"string","name":"evidences"},{"type":"string","name":"user_stateName"},{"type":"string","name":"domainName"},{"type":"string","name":"domainExternalId"},{"type":"string","name":"childName"},{"type":"string","name":"childType"},{"type":"string","name":"childExternalid"},{"type":"string","name":"level"},{"type":"string","name":"criteriaDescription"},{"type":"string","name":"programDescription"},{"type":"string","name":"solutionDescription"},{"type":"string","name":"label"},{"type":"string","name":"imp_project_id"},{"type":"string","name":"imp_project_title"},{"type":"string","name":"imp_project_goal"},{"type":"string","name":"imp_project_externalId"},{"type":"string","name":"ancestorName"},{"type":"string","name":"scoringSystem"},{"type":"string","name":"domainLevel"},{"type":"string","name":"domainScore"},{"name":"criteriaLevelReport","type":"boolean"},{"type":"string","name":"user_schoolName"},{"type":"string","name":"user_schoolId"},{"type":"string","name":"user_schoolUDISE_code"},{"type":"string","name":"solution_type"},{"type":"string","name":"organisation_name"},{"type":"string","name":"user_boardName"},{"type":"string","name":"district_externalId"},{"type":"string","name":"state_externalId"},{"type":"string","name":"block_externalId"},{"type":"string","name":"cluster_externalId"},{"type":"string","name":"organisation_id"},{"type":"string","name":"user_type"},{"type":"string","name":"isSubmissionDeleted"}]},"metricsSpec":[{"type":"floatSum","name":"question_response_number","fieldName":"questionResponseLabel_number"}]}}}' -survey_query_spec = {{ml_analytics_druid_survey_query_spec}} +survey_query_spec = '{"queryType":"scan","dataSource":"sl-survey","resultFormat":"list","columns":["completedDate","createdAt","createdBy","criteriaExternalId","criteriaId","criteriaName","surveyId","surveyName","surveySubmissionId","questionAnswer","questionECM","questionExternalId","questionId","questionName","questionResponseLabel","questionResponseType","solutionExternalId","solutionId","solutionName","updatedAt","instanceParentId","instanceId","instanceParentResponsetype","instanceParentQuestion","questionSequenceByEcm","maxScore","minScore","percentageScore","pointsBasedScoreInParent","totalScore","scoreAchieved","totalpercentage","instanceParentExternalId","instanceParentEcmSequence","remarks","total_evidences","evidence_count","instanceParentCriteriaId","instanceParentCriteriaExternalId","instanceParentCriteriaName","isAPrivateProgram","programId","programName","programExternalId","questionResponseLabel_number","channel","parent_channel","appName","organisation_name","user_subtype","user_type","board_name","district_code","district_name","district_externalId","block_code","block_name","block_externalId","school_code","school_name","school_externalId","cluster_code","cluster_name","cluster_externalId","state_code","state_name","state_externalId","organisation_id","evidences"],"intervals":["1901-01-01T00:00:00+00:00/2101-01-01T00:00:00+00:00"]}' -survey_injestion_spec = {{ml_analytics_druid_survey_batch_ingestion_spec}} +survey_injestion_spec = '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-survey","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"completedDate","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"completedDate"},{"type":"string","name":"createdAt"},{"type":"string","name":"createdBy"},{"type":"string","name":"criteriaExternalId"},{"type":"string","name":"criteriaId"},{"type":"string","name":"criteriaName"},{"type":"string","name":"surveyId"},{"type":"string","name":"surveyName"},{"type":"string","name":"surveySubmissionId"},{"type":"string","name":"questionAnswer"},{"type":"string","name":"questionECM"},{"type":"string","name":"questionExternalId"},{"type":"string","name":"questionId"},{"type":"string","name":"questionName"},{"type":"string","name":"questionResponseLabel"},{"type":"string","name":"questionResponseType"},{"type":"string","name":"solutionExternalId"},{"type":"string","name":"solutionId"},{"type":"string","name":"solutionName"},{"type":"string","name":"updatedAt"},{"type":"string","name":"instanceParentId"},{"type":"string","name":"instanceId"},{"type":"string","name":"instanceParentResponsetype"},{"type":"string","name":"instanceParentQuestion"},{"type":"string","name":"questionSequenceByEcm"},{"type":"string","name":"maxScore"},{"type":"string","name":"minScore"},{"type":"string","name":"percentageScore"},{"type":"string","name":"pointsBasedScoreInParent"},{"type":"string","name":"totalScore"},{"type":"string","name":"scoreAchieved"},{"type":"string","name":"totalpercentage"},{"type":"string","name":"instanceParentExternalId"},{"type":"string","name":"instanceParentEcmSequence"},{"type":"string","name":"remarks"},{"type":"string","name":"total_evidences"},{"type":"string","name":"evidence_count"},{"type":"string","name":"evidences"},{"type":"string","name":"instanceParentCriteriaId"},{"type":"string","name":"instanceParentCriteriaExternalId"},{"type":"string","name":"instanceParentCriteriaName"},{"type":"string","name":"isAPrivateProgram"},{"type":"string","name":"programId"},{"type":"string","name":"programName"},{"type":"string","name":"programExternalId"},{"name":"questionResponseLabel_number","type":"float"},{"type":"string","name":"channel"},{"type":"string","name":"parent_channel"},{"type":"string","name":"appName"},{"type":"string","name":"organisation_name"},{"type":"string","name":"user_subtype"},{"type":"string","name":"user_type"},{"type":"string","name":"board_name"},{"type":"string","name":"district_code"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_code"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"school_code"},{"type":"string","name":"school_name"},{"type":"string","name":"school_externalId"},{"type":"string","name":"cluster_code"},{"type":"string","name":"cluster_name"},{"type":"string","name":"cluster_externalId"},{"type":"string","name":"state_code"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"organisation_id"},{"type":"string","name":"isSubmissionDeleted"}]},"metricsSpec":[{"type":"floatSum","name":"question_response_number","fieldName":"questionResponseLabel_number"}]}}}' -intervals = {{ml_analytics_druid_interval_list}} +intervals = '["1901-01-01T00:00:00+00:00/2020-01-01T00:00:00+00:00","2020-01-01T00:00:00+00:00/2020-06-01T00:00:00+00:00","2020-06-01T00:00:00+00:00/2021-01-01T00:00:00+00:00","2021-01-01T00:00:00+00:00/2021-06-01T00:00:00+00:00","2021-06-01T00:00:00+00:00/2022-01-01T00:00:00+00:00","2022-01-01T00:00:00+00:00/2022-03-01T00:00:00+00:00","2022-03-01T00:00:00+00:00/2022-06-01T00:00:00+00:00","2022-06-01T00:00:00+00:00/2022-09-01T00:00:00+00:00","2022-09-01T00:00:00+00:00/2023-01-01T00:00:00+00:00"]' [KAFKA] -url = {{ ml_analytics_kafka_url }} +url = "{{ml_kafka_host | default(groups['processing-cluster-kafka'][0]+':9092')}}" -observation_raw_topic = {{ ml_analytics_kafka_observation_topic_name }} +observation_raw_topic = "{{ env_name }}.ml.observation.raw" -observation_druid_topic = {{ ml_analytics_kafka_observation_druid_topic_name }} +observation_druid_topic = "{{ env_name }}.ml.observation.druid" -observation_evidence_druid_topic = {{ ml_analytics_kafka_observation_evidence_topic_name }} +observation_evidence_druid_topic = "{{ env_name }}.ml.observation.evidence.druid" -survey_evidence_druid_topic = {{ ml_analytics_kafka_survey_evidence_topic_name }} +survey_evidence_druid_topic = "{{ env_name }}.ml.survey.evidence.druid" -survey_raw_topic = {{ ml_analytics_kafka_survey_topic_name }} +survey_raw_topic = "{{ env_name }}.ml.survey.raw" -survey_druid_topic = {{ ml_analytics_kafka_survey_druid_topic_name }} +survey_druid_topic = "{{ env_name }}.ml.survey.druid" [LOGS] -observation_streaming_success_error = {{ ml_analytics_observation_log_folder_path }}/ +observation_streaming_success_error = /opt/sparkjobs/logs/observation/ -observation_streaming_evidence_success_error = {{ ml_analytics_observation_log_folder_path }}/evidence/ +observation_streaming_evidence_success_error = /opt/sparkjobs/logs/observation/evidence/ -observation_status_success_error = {{ ml_analytics_observation_log_folder_path }}/status/ +observation_status_success_error = /opt/sparkjobs/logs/observation/status/ -project_success_error = {{ ml_analytics_project_log_folder_path }}/ +project_success_error = /opt/sparkjobs/logs/project/ -survey_evidence_streaming_success_error = {{ ml_analytics_survey_log_folder_path }}/evidence/ +survey_evidence_streaming_success_error = /opt/sparkjobs/logs/project/evidence/ -survey_streaming_success_error = {{ ml_analytics_survey_log_folder_path }}/ +survey_streaming_success_error = /opt/sparkjobs/logs/survey -survey_status_success_error = {{ ml_analytics_survey_log_folder_path }}/status/ +survey_status_success_error = /opt/sparkjobs/logs/survey/status/ [CLOUD] -container_name = {{ cloud_storage_telemetry_bucketname }} +container_name = "{{ cloud_storage_telemetry_bucketname }}" [OUTPUT_DIR] -project = {{ ml_analytics_project_output_dir }} +project = "/opt/sparkjobs/source/projects/output" -observation_status = {{ ml_analytics_observation_status_output_dir }} +observation_status = "/opt/sparkjobs/source/observations/status/output" -observation_distinctCount_status = {{ ml_analytics_obs_distinctCnt_output_dir }} +observation_distinctCount_status = /opt/sparkjobs/source/observations/distinctCount/output -observation_distinctCount_domain = {{ ml_analytics_obs_distinctCnt_domain_output_dir }} +observation_distinctCount_domain = /opt/sparkjobs/source/observations/distinctCount_domain/output -observation_distinctCount_domain_criteria = {{ ml_analytics_obs_distinctCnt_domain_criteria_output_dir }} +observation_distinctCount_domain_criteria = /opt/sparkjobs/source/observations/distinctCount_domain_criteria/output -projects_distinctCount = {{ ml_analytics_projects_distinctCnt_output_dir }} +projects_distinctCount = /opt/sparkjobs/source/projects/distinctCount/output -projects_distinctCount_prgmlevel = {{ ml_analytics_projects_distinctCnt_prglevel_output_dir }} +projects_distinctCount_prgmlevel = /opt/sparkjobs/source/projects/distinctCountPrglevel/output -survey_distinctCount_status = {{ ml_analytics_survey_distinctCnt_output_dir }} +survey_distinctCount_status = /opt/sparkjobs/source/survey/distinctCount/output -project_rollup = {{ ml_analytics_project_rollup_output_dir }} +project_rollup = /opt/sparkjobs/source/projects/output_rollup -observation_status_rollup = {{ ml_analytics_observation_status_rollup_output_dir }} +observation_status_rollup = /opt/sparkjobs/source/observations/output_rollup -survey_rollup = {{ ml_analytics_survey_rollup_output_dir }} +survey_rollup = /opt/sparkjobs/source/survey/output -survey_status = {{ ml_analytics_survey_status_output_dir }} +survey_status = /opt/sparkjobs/source/survey/status/output -observation_sub_ids = {{ ml_analytics_observation_submission_id_filepath }} +observation_sub_ids = /opt/sparkjobs/ml-analytics-service/observations/submissions.csv -observation_druid_data = {{ ml_analytics_observation_batchupdate_output_dir }} +observation_druid_data = /opt/sparkjobs/source/observations/ -survey_sub_ids = {{ml_analytics_survey_submission_id_filepath}} +survey_sub_ids = /opt/sparkjobs/ml-analytics-service/survey/submissions.csv -survey_druid_data = {{ml_analytics_survey_batchupdate_output_dir}} +survey_druid_data = /opt/sparkjobs/source/survey/ -program_text_file = {{ml_analytics_project_program}} +program_text_file = /opt/sparkjobs/ml-analytics-service/projects/program_ids.txt [SLACK] -token = {{ml_slack_token}} +token = "{{ ml_analytics_slack_token | default('') }}" -channel = {{ml_slack_channel}} +channel = "{{ ml_analytics_slack_channel | default('') }}" [VAM] -druid_query_url = {{ ml_druid_query_data }} +druid_query_url = "{{ ml_druid_query | default('') }}" -program_dashboard_data = {{ ml_program_dashboard_data }} +program_dashboard_data = "{{ ml_program_data | default('') }}" [COMMON] -cloud_module_path = {{ ml_analytics_cloud_package_path }} +cloud_module_path = "/opt/sparkjobs/ml-analytics-service/cloud_storage" -observation_blob_path = {{ ml_analytics_observation_cloud_blob_path }} +observation_blob_path = "observation/status/" -projects_blob_path = {{ ml_analytics_project_cloud_blob_path }} +projects_blob_path = "projects/" -observation_distinctCount_blob_path = {{ ml_analytics_obs_distinctCnt_cloud_blob_path }} +observation_distinctCount_blob_path = "observation/distinctCount/" -observation_distinctCount_domain_blob_path = {{ ml_analytics_obs_distinctCnt_domain_cloud_blob_path }} +observation_distinctCount_domain_blob_path = "observation/distinctCount_domain/" -observation_distinctCount_domain_criteria_blob_path = {{ ml_analytics_obs_distinctCnt_domain_criteria_cloud_blob_path }} +observation_distinctCount_domain_criteria_blob_path = "observation/distinctCount_domain_criteria/" -projects_distinctCnt_blob_path = {{ ml_analytics_projects_distinctCnt_cloud_blob_path }} +projects_distinctCnt_blob_path = "projects/distinctCount/" -projects_distinctCnt_prgmlevel_blob_path = {{ ml_analytics_projects_distinctCnt_prglevel_cloud_blob_path }} +projects_distinctCnt_prgmlevel_blob_path = "projects/distinctCountPrglevel/" -survey_distinctCount_blob_path = {{ ml_analytics_survey_distinctCnt_cloud_blob_path }} +survey_distinctCount_blob_path = "survey/distinctCount/" -projects_rollup_blob_path = {{ ml_analytics_project_rollup_cloud_blob_path }} +projects_rollup_blob_path = "projects/rollup" -observation_rollup_blob_path = {{ ml_analytics_observation_rollup_cloud_blob_path }} +observation_rollup_blob_path = "observation/rollup" -survey_rollup_blob_path = {{ ml_analytics_survey_rollup_cloud_blob_path }} +survey_rollup_blob_path = "survey/rollup/" -survey_blob_path = {{ ml_analytics_survey_cloud_blob_path }} +survey_blob_path = "survey/status/" -projects_program_csv = {{ ml_analytics_program_dashboard_cloud_blob_path }} +projects_program_csv = "{{ ml_program_blob_path | default('') }}" -observation_batch_ingestion_data_del = {{ ml_analytics_observation_batchupdate_cloud_blob_path }} +observation_batch_ingestion_data_del = "observation/batchDeletion" -survey_batch_ingestion_data_del = {{ ml_analytics_survey_batchupdate_cloud_blob_path}} +survey_batch_ingestion_data_del = "survey/batchDeletion" -cname_url = {{ ml_analytics_cname_url }} +cname_url = "{{ cloud_storage_url }}/{{ cloud_storage_samiksha_bucketname }}" -nvsk_imp_projects_data_local_path = {{ ml_analytics_nvsk_imp_projects_data_local_path }} +nvsk_imp_projects_data_local_path = "{{ config_path }}/urgent_data_metrics/output/" -nvsk_imp_projects_data_blob_path = {{ ml_analytics_nvsk_imp_projects_data_blob_path }} +nvsk_imp_projects_data_blob_path = "Manage_Learn_Data/micro_improvement/" [API_CREDENTIALS] -client_id = {{ ml_analytics_client_id }} +client_id = "{{ ml_analytics_client_id }}" -client_secret = {{ ml_analytics_client_secret }} +client_secret = "{{ ml_analytics_client_secret }}" -username = {{ ml_analytics_username }} +username = "{{ ml_analytics_username }}" -password = {{ ml_analytics_password }} +password = "{{ ml_analytics_password }}" [JSON_VARIABLE] -createdBy = {{ ml_analytics_createdBy }} +createdBy = "{{ ml_analytics_createdBy }}" -container = {{ ml_analytics_reports_container }} +container = "{{ ml_analytics_reports_container }}" -store = {{ ml_analytics_reports_store }} +store = "{{ ml_analytics_reports_store }}" [ML_CORE_SERVICE_URL] -url = {{ ml_analytics_core_service }} +url = "http://{{private_ingressgateway_ip}}/ml-core"