I am in development mode. I loaded some data, then significantly changed my match rules. How do I delete the data and reload?
Best Answer
S
Subham Dixit
said
about 2 years ago
What you can do is to truncate the data to let you start afresh.
The following SQL for PostgreSQL will allow you to generate the necessary statements for all the tables related to your entity and safely remove the data. By running this it also ensures that you don't miss any of the tables.
/* Truncate statement for PostgreSQL for use during development */
select 'truncate table semarchy_dloc1.' || tablename || ';' generated_statements
from pg_catalog.pg_tables
where schemaname = 'semarchy_dloc1' /* set this to your data location schema */
and tablename not like 'dl_%' /* do not truncate these system tables */
and tablename not like 'ext_%' /* do not truncate these system tables */
and tablename like '%customer' /* add filters as reqd for entities */
order by substr(tablename,3), tablename
;
Once you have generated the truncate statements then run all of them to delete your data.
1 Comment
S
Subham Dixit
said
about 2 years ago
Answer
What you can do is to truncate the data to let you start afresh.
The following SQL for PostgreSQL will allow you to generate the necessary statements for all the tables related to your entity and safely remove the data. By running this it also ensures that you don't miss any of the tables.
/* Truncate statement for PostgreSQL for use during development */
select 'truncate table semarchy_dloc1.' || tablename || ';' generated_statements
from pg_catalog.pg_tables
where schemaname = 'semarchy_dloc1' /* set this to your data location schema */
and tablename not like 'dl_%' /* do not truncate these system tables */
and tablename not like 'ext_%' /* do not truncate these system tables */
and tablename like '%customer' /* add filters as reqd for entities */
order by substr(tablename,3), tablename
;
Once you have generated the truncate statements then run all of them to delete your data.
Subham Dixit
I am in development mode. I loaded some data, then significantly changed my match rules. How do I delete the data and reload?
What you can do is to truncate the data to let you start afresh.
The following SQL for PostgreSQL will allow you to generate the necessary statements for all the tables related to your entity and safely remove the data. By running this it also ensures that you don't miss any of the tables.
Once you have generated the truncate statements then run all of them to delete your data.
Subham Dixit
What you can do is to truncate the data to let you start afresh.
The following SQL for PostgreSQL will allow you to generate the necessary statements for all the tables related to your entity and safely remove the data. By running this it also ensures that you don't miss any of the tables.
Once you have generated the truncate statements then run all of them to delete your data.
-
Import Data Into Entities via Azure Data Lake
-
Recover Deleted(soft Delete) Record and Configure in Application
-
Data Quality in batch mode and real-time integration
-
Integration with analytics tools
-
Query/Load/Delete data with the REST API
-
Does the Done Tab in Inbox have a limit?
-
How Can I Trigger Enricher or Sql Procedure when deleting?
-
Matching Rules But Only The Latest Record Creates a Golden Record
-
Unstructured and Semi Structured Data in Semarchy?
-
Read CSV files from AWS S3
See all 73 topics