-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update sync_table_with_pandas flow and tests
- Loading branch information
1 parent
058a313
commit 2819192
Showing
5 changed files
with
167 additions
and
45 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
forklift/forklift/pipeline/flow_schedules/sync_table_with_pandas.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"source_database","query_filepath","schema","table_name","backend","geom_col","destination_database","destination_table","ddl_script_path","post_processing_script_path","final_table","cron_string" | ||
"monitorenv_remote",,"public","amp_cacem","geopandas","geom","monitorenv","amp_cacem_tmp","monitorenv/create_amp_cacem_tmp.sql","post_process_amp_cacem.sql","amp_cacem", | ||
"monitorenv_remote","monitorenv_remote/analytics_actions.sql",,,"pandas","geom","monitorenv","analytics_actions","monitorenv/create_analytics_actions.sql",,, | ||
"monitorfish_remote","monitorfish_remote/analytics_controls_full_data.sql",,,"pandas","geom","monitorfish","analytics_controls_full_data","monitorfish/create_analytics_controls_full_data.sql",,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
forklift/forklift/pipeline/sql_scripts/data_flows/post_process_amp_cacem.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE monitorenv.amp_cacem ENGINE MergeTree ORDER BY id AS | ||
SELECT | ||
* EXCEPT(geom), | ||
readWKTMultiPolygon(geom) AS geom | ||
FROM monitorenv.amp_cacem_tmp | ||
ORDER BY id |
12 changes: 12 additions & 0 deletions
12
forklift/forklift/pipeline/sql_scripts/ddl/monitorenv/create_amp_cacem_tmp.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE {database:Identifier}.{table:Identifier} ( | ||
id Int32, | ||
geom String, | ||
mpa_oriname String, | ||
des_desigfr String, | ||
row_hash Nullable(String), | ||
mpa_type Nullable(String), | ||
ref_reg Nullable(String), | ||
url_legicem Nullable(String) | ||
) | ||
ENGINE MergeTree | ||
ORDER BY mpa_oriname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters