Skip to content

Commit 0a4d6cf

Browse files
committed
updated hive_schemas_csv.py
1 parent cbe5a86 commit 0a4d6cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hive_schemas_csv.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,17 @@ def process_table(self, database, table):
188188
#column_cursor.execute('describe %(table)s', {'table': table})
189189
column_cursor.execute('use `{}`'.format(database))
190190
column_cursor.execute('describe `{}`'.format(table))
191+
column_count = 0
191192
for column_row in column_cursor:
192193
column = column_row[0]
193194
column_type = column_row[1]
194-
self.column_count += 1
195+
column_count += 1
195196
self.csv_writer.writerow({'database': database,
196197
'table': table,
197198
'column': column,
198199
'type': column_type})
200+
log.info("found %s columns in table '%s.%s'", column_count, database, table)
201+
self.column_count += column_count
199202

200203

201204
if __name__ == '__main__':

0 commit comments

Comments
 (0)