Without Unity Catalog using table history :
- Call "SHOW TABLES FROM db_name" to collect all tables names
- Loop on tables identifying the table creator using the next command : spark.sql('DESCRIBE HISTORY db_name.table_name').where('operation like "CREATE TABLE%"').select('userName').first()['userName']
- Filter the result obtained in p.2 to obtain the target list of tables
Without Unity Catalog using owner field :
- Enable table access control for a cluster (https://docs.databricks.com/security/access-control/table-acls/table-acl.html)
- Set owner for each table that you need : ALTER TABLE db_name.my_table_name OWNER TO `abc@gmail.com`
- Call "SHOW TABLES FROM db_name" to collect all tables names
- Loop on tables identifying the table owner spark.sql('DESCRIBE EXTENDED db_name.table_name').filter('col_name = "Owner" and data_type = "abc@gmail.com"')
- Filter the result obtained in p.4 to obtain the target list of tables
With Unity Catalog tables, you can use created_by or table_owner column from information_schema.tables :
SELECT *
FROM my_unity_catalog_name.information_schema.tables
WHERE created_by LIKE '%my_username_name_part%'