File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
CosmoTech_Acceleration_Library
cosmotech/coal/cli/commands Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11# Copyright (c) Cosmo Tech corporation.
22# Licensed under the MIT license.
33
4- __version__ = '0.8.1 '
4+ __version__ = '0.8.2 '
Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ def tdl_send_files(
208208 LOGGER .info ("Sent all data found" )
209209
210210 dataset_info .ingestion_status = "SUCCESS"
211+ dataset_info .twincache_status = "FULL"
211212
212213 api_ds .update_dataset (organization_id ,
213214 dataset_id ,
Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ def dump_to_postgresql(
7878 replace : bool
7979):
8080 """Running this command will dump your store to a given postgresql database
81-
81+
8282 Tables names from the store will be prepended with table-prefix in target database
83-
83+
8484 The postgresql user must have USAGE granted on the schema for this script to work due to the use of the command `COPY FROM STDIN`
85-
85+
8686 You can simply give him that grant by running the command :
8787 `GRANT USAGE ON SCHEMA <schema> TO <username>`
8888 """
@@ -105,7 +105,11 @@ def dump_to_postgresql(
105105 with conn .cursor () as curs :
106106 _s_time = perf_counter ()
107107 target_table_name = f"{ table_prefix } { table_name } "
108+ LOGGER .info (f" - [yellow]{ target_table_name } [/]:" )
108109 data = _s .get_table (table_name )
110+ if not len (data ):
111+ LOGGER .info (f" -> [cyan bold]0[/] rows (skipping)" )
112+ continue
109113 _dl_time = perf_counter ()
110114 rows = curs .adbc_ingest (
111115 target_table_name ,
@@ -114,7 +118,7 @@ def dump_to_postgresql(
114118 db_schema_name = postgres_schema )
115119 total_rows += rows
116120 _up_time = perf_counter ()
117- LOGGER .info (f" - [yellow] { target_table_name } [/] : [cyan bold]{ rows } [/] rows" )
121+ LOGGER .info (f" -> [cyan bold]{ rows } [/] rows" )
118122 LOGGER .debug (f" -> Load from datastore took [blue]{ _dl_time - _s_time :0.3} s[/]" )
119123 LOGGER .debug (f" -> Send to postgresql took [blue]{ _up_time - _dl_time :0.3} s[/]" )
120124 _process_end = perf_counter ()
You can’t perform that action at this time.
0 commit comments