Skip to content

Commit 7f24c2b

Browse files
cleanup dead code
1 parent e8f0e9a commit 7f24c2b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

data/notebooks/Export_Table_ACLs.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,6 @@ def create_grants_df(database_name: str,object_type: str, object_key: str):
135135

136136

137137
def create_table_ACLSs_df_for_databases(database_names: List[str], include_catalog: bool):
138-
139-
# TODO check Catalog heuristic:
140-
# if all databases are exported, we include the Catalog grants as well
141-
#. if only a few databases are exported: we exclude the Catalog
142-
# if database_names is None or database_names == '':
143-
# database_names = get_database_names()
144-
# include_catalog = True
145-
# else:
146-
# include_catalog = False
147-
148138
num_databases_processed = len(database_names)
149139
num_tables_or_views_processed = 0
150140

@@ -211,10 +201,13 @@ def chunks(lst, n):
211201
output_path = dbutils.widgets.get("OutputPath")
212202

213203
if databases_raw.rstrip() == '':
204+
# TODO check Catalog heuristic:
205+
# if all databases are exported, we include the Catalog grants as well
214206
databases = get_database_names()
215207
include_catalog = True
216208
print(f"Exporting all databases")
217209
else:
210+
#. if only a few databases are exported: we exclude the Catalog
218211
databases = [x.rstrip().lstrip() for x in databases_raw.split(",")]
219212
include_catalog = False
220213
print(f"Exporting the following databases: {databases}")

0 commit comments

Comments
 (0)