I have successfully created and added Dynamic partitions in an Internal table in hive. i.e. by using following steps:
1-created a sourc
The proper way to do it.
Create the table and mention it is partitioned.
create external table1 ( name string, age int, height int) partitioned by (age int) stored as ****(your format) location 'path/to/dataFile/in/HDFS';
Now you have to refresh the partitions in the hive metastore.
msck repair table table1
This will take care of loading all your partitions into the hive metastore.
You can use msck repair table at any point during your process to have the metastore updated.