@@ -71,8 +71,7 @@ def extract_and_convert(
7171 validator = ChrononRepoValidator (
7272 chronon_root , os .path .join (chronon_root_path , "production" ), log_level = log_level
7373 )
74-
75- successful_writes = {}
74+
7675 compile_errors = {}
7776
7877 for obj_folder_name in obj_folder_names :
@@ -88,7 +87,6 @@ def extract_and_convert(
8887 raise ValueError (f"Error in file { target_object_file } : \n { target_file_error } " )
8988
9089 compile_errors .update (obj_folder_errors )
91- num_written_objs = 0
9290
9391 full_output_root = os .path .join (chronon_root_path , output_root )
9492 teams_path = os .path .join (chronon_root_path , TEAMS_FILE_PATH )
@@ -106,12 +104,6 @@ def extract_and_convert(
106104 if obj_write_errors :
107105 compile_errors [origin_file ] = obj_write_errors
108106 else :
109- num_written_objs += 1
110-
111- # TODO -- handle target object file and logging in case of failure.
112- if obj == target_object :
113- target_object_written = True
114-
115107 # In case of online join, we need to materialize the underlying online group_bys.
116108 if obj_class is Join and obj .metaData .online :
117109 online_group_bys = {}
@@ -126,10 +118,6 @@ def extract_and_convert(
126118 " You can do this by passing the `online=True` argument to the GroupBy constructor."
127119 " Fix the following: {}" .format (offline_gbs )
128120 )
129-
130- if num_written_objs > 0 :
131- obj_class_name = obj_class .__name__
132- successful_writes [obj_class_name ] = successful_writes .get (obj_class_name , 0 ) + num_written_objs
133121
134122 if compile_errors :
135123 create_error_logs (compile_errors , chronon_root )
@@ -155,8 +143,8 @@ def show_lineage_and_schema(target_object):
155143 raise NotImplementedError ("TODO" )
156144 except Exception as e :
157145
158- _print_warning ("Failed to connect to ZiplineHub (check connection and VPN settings). \n \n " +
159- "Showing output column names, but cannot show schema/lineage without ZiplineHub.\n \n " )
146+ _print_warning (f "Failed to connect to ZiplineHub: { str ( e ) } \n \n " +
147+ "Showing output column names, but cannot show schema/lineage without ZiplineHub.\n \n " )
160148
161149 obj_class = target_object .__class__
162150
@@ -293,7 +281,3 @@ def _print_error(left, right):
293281def _print_warning (string ):
294282 # print in yellow - \u001b[33m
295283 print (f"\u001b [33m{ string } \u001b [0m" )
296-
297-
298- if __name__ == "__main__" :
299- extract_and_convert ()
0 commit comments