input1:

create external table db.emp(id int,name string)
row formatted fields terminated by ','
location 'hadfs:.../';

create external table db.emp1(id int,name string)
row formatted fields terminated by ','
location 'hadfs:.../';
input2:

create table db.emp(id int,name string)
location 'hadfs:.../';;
create table db.emp1(id int,name string)
location 'hadfs:.../';
requeried output:

create external table db.emp(id int,name string)
row formatted fields terminated by ','
location 'hadfs:.../';
create table db.emp(id int,name string)
location 'hadfs:.../';
these two files stored under file1.hql

create external table db.emp1(id int,name string)
row formatted fields terminated by ','
location 'hadfs:.../';
create table db.emp1(id int,name string)
location 'hadfs:.../';
These two files stored under file2.hql and so on

Because that doesn't look like Python code to me I suggest you do two things.

  1. Read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question
  2. Supply your first coding attempt and ask why it fails on what line. That way we get a full look at the rest of the code and work the issue you are facing.

Also, those look like databases, not files. You're a programmer now so grammer matters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.