Hi Manikkam,
Check the DMFDimensionHelper::generateDefaultDimension method to see how system get the list of dimension attribute and dimension value from your input. Then use the
dimensionAttributeValue::findByDimensionAttributeAndValue method to check for existing record (set the 4th parameter to true will create a record if not found.)
For DefaultDimension, check the DMFDimensionHelper::generateDefaultDimension method instead. It populate the Dimension Attribute list by looking at the paramter setup of DMF source data format settings.
Then do the same as above.