# Pipeline Errors

**URL:** <https://www.singlestore.com/forum/t/pipeline-errors/1178>\
**Category:** Connectors and Pipelines\
**Created:** [August 27, 2019, 4:22pm UTC](https://www.singlestore.com/forum/t/pipeline-errors/1178 "2019-08-27T16:22:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.singlestore.com/forum/u/scott)\
**Post date:** [August 27, 2019, 4:22pm UTC](https://www.singlestore.com/forum/t/pipeline-errors/1178/1 "2019-08-27T16:22:22Z")

</div>

I am currently receiving error:

```auto
Leaf Error (leaf1:3306): Cannot compile pipeline plan for `incoming_sfdc_v2`.`contact` because reference db is out of sync on this leaf

```

It seems I can run my data pipeline about one time before MemSQL starts complaining about subsequent runs.

The SQL statement looks as follows:

```auto
CREATE DATABASE IF NOT EXISTS incoming_sfdc_v2;

DROP PIPELINE IF EXISTS contact;
DROP TABLE IF EXISTS contact;
CREATE TABLE `incoming_sfdc_v2`.`contact` ( `attributes` TEXT , `id` TEXT , `isdeleted` bigint , `masterrecordid` TEXT , `accountid` TEXT , `lastname` TEXT , `firstname` TEXT , `salutation` TEXT , `middlename` TEXT , `suffix` TEXT , `name` TEXT , `mailingstreet` TEXT , `mailingcity` TEXT , `mailingstate` TEXT , `mailingpostalcode` TEXT , `mailingcountry` TEXT , `mailingstatecode` TEXT , `mailingcountrycode` TEXT , `mailinglatitude` double , `mailinglongitude` double , `mailinggeocodeaccuracy` TEXT , `mailingaddress` TEXT , `phone` TEXT , `fax` TEXT , `mobilephone` TEXT , `reportstoid` TEXT , `email` TEXT , `title` TEXT , `department` TEXT , `currencyisocode` TEXT , `ownerid` TEXT , `hasoptedoutofemail` bigint , `createddate` TEXT , `createdbyid` TEXT , `lastmodifieddate` TEXT , `lastmodifiedbyid` TEXT , `systemmodstamp` TEXT , `lastactivitydate` TEXT , `lastcurequestdate` TEXT , `lastcuupdatedate` TEXT , `lastvieweddate` TEXT , `lastreferenceddate` TEXT , `emailbouncedreason` TEXT , `emailbounceddate` TEXT , `isemailbounced` bigint , `photourl` TEXT , `jigsaw` TEXT , `jigsawcontactid` TEXT , `ip_country __c` TEXT , `ip_state__ c` TEXT , `lid __linkedin_company_id__ c` TEXT , `lid __linkedin_member_token__ c` TEXT , `last_email_name __c` TEXT , `last_registered_event__ c` TEXT , `ip_address __c` TEXT , `ip_city__ c` TEXT , `email_opt_out_marketing_information __c` bigint , `culture_amp_email_subscription__ c` TEXT , `outreach_persona __c` TEXT , `outbound_personalised_note__ c` TEXT , `chat_result __c` TEXT , `network_interested__ c` TEXT , `hubspot_score __c` double , `email_opt_out_people_geek_events__ c` bigint , `original_source_drill_down_2 __c` TEXT , `original_source_drill_down_1__ c` TEXT , `first_page_seen __c` TEXT , `last_page_seen__ c` TEXT , `first_conversion __c` TEXT , `team_for_views__ c` TEXT , `became_a_marketing_qualified_lead_date __c` TEXT , `net_promoter_score_nps__ c` double , `last_registered_event_date __c` TEXT , `first_conversion_date__ c` TEXT , `last_email_click_date __c` TEXT , `contact_id_18_char__ c` TEXT , `eventbritesync __eventbriteid__ c` TEXT , `eventbritesync __eventbritetype__ c` TEXT , `eventbritesync __uniquepersonid__ c` TEXT , `time_first_seen_contact __c` TEXT , `converted_campaign__ c` TEXT , `date_of_last_chat __c` TEXT , `outreach_stage__ c` TEXT , `clearbit_company_metrics_employees __c` double , `recent_campaign_touch__ c` TEXT , `recent_campaign_source_contact __c` TEXT , `outreach_notes__ c` TEXT , `campaign_influence_lead __c` TEXT , `most_recent_campaign_touch_date__ c` TEXT , `contact_previous_campaign_touch __c` TEXT , `previous_campaign_touch_date_contact__ c` TEXT , `account_abm_stage __c` TEXT , `account_owner_for_views__ c` TEXT , `contact_tweet __c` TEXT , `recent_campaign__ c` double , `became_a_demo_date_contact __c` TEXT , `recent_campaign_id_contact__ c` TEXT , `campaign_member __c` TEXT , `leandata__ ld_segment __c` TEXT , `leandata__ matched_buyer_persona __c` TEXT , `leandata__ routing_action __c` TEXT , `linkedin_page__ c` TEXT , `persona __c` TEXT , `last_nps_date__ c` TEXT , `master_class_date __c` TEXT , `people_geekly_subscriber__ c` bigint , `abm_source __c` TEXT , `level_of_influence__ c` TEXT , `meeting_type_cp __c` TEXT , `email_opt_out_newsletter__ c` bigint , `product_admin_status __c` TEXT , `recent_conversion_date__ c` TEXT , `individual_view __c` TEXT , `employee_size_segment__ c` TEXT , `country_calling_code __c` TEXT , `actively_being_sequenced__ c` bigint , `job_change __c` TEXT , `email_product_events_opt_in__ c` bigint , `email_receives_events __c` bigint , `account_owner_email__ c` TEXT , `account_owner_logged_in_user __c` bigint , `sdr_owner_manager__ c` TEXT , `logged_in_user_sdr_owner_manager __c` bigint , `logged_in_user_leadership_role__ c` bigint , `account_owner_lookup __c` TEXT , `champion__ c` TEXT , `email_product_newsletter_opt_in __c` bigint , `email_product_insights_opt_in__ c` bigint , `email_receives_insights __c` bigint , `email_receives_newsletter__ c` bigint , `date_of_last_geekup __c` TEXT , `date_of_last_workshop__ c` TEXT , `zendesk __create_in_zendesk__ c` bigint , `zendesk __last_sync_date__ c` TEXT , `zendesk __last_sync_status__ c` TEXT , `zendesk __result__ c` TEXT , `zendesk __tags__ c` TEXT , `zendesk __zendesk_outofsync__ c` bigint , `zendesk __zendesk_oldtags__ c` TEXT , `zendesk __iscreatedupdatedflag__ c` bigint , `zendesk __notes__ c` TEXT , `zendesk __zendesk_id__ c` TEXT , `last_tc_lead __c` TEXT , `tc_clock_active__ c` bigint , `contact_status __c` TEXT , `inactive_reason__ c` TEXT , `import_notes __c` TEXT , `cloudingoagent__ ces __c` double , `cloudingoagent__ mar __c` TEXT , `cloudingoagent__ mas __c` double , `cloudingoagent__ mav __c` TEXT , `cloudingoagent__ mrdi __c` TEXT , `cloudingoagent__ mtz __c` TEXT , `cloudingoagent__ oar __c` TEXT , `cloudingoagent__ oas __c` double , `cloudingoagent__ oav __c` TEXT , `cloudingoagent__ ordi __c` TEXT , `cloudingoagent__ otz __c` TEXT , `became_mql_date_time__ c` TEXT , `leandata_inactive_merge __c` TEXT , `bizible2__ ad_campaign_name_ft __c` TEXT , `bizible2__ ad_campaign_name_lc __c` TEXT , `bizible2__ bizibleid __c` TEXT , `bizible2__ landing_page_ft __c` TEXT , `bizible2__ landing_page_lc __c` TEXT , `bizible2__ marketing_channel_ft __c` TEXT , `bizible2__ marketing_channel_lc __c` TEXT , `bizible2__ touchpoint_date_ft __c` TEXT , `bizible2__ touchpoint_date_lc __c` TEXT , `bizible2__ touchpoint_source_ft __c` TEXT , `bizible2__ touchpoint_source_lc __c` TEXT , `slack_notification_text__ c` TEXT , `customer_status __c` TEXT , `recent_conversion_event__ c` TEXT , `marketing_qualified_reason __c` TEXT , `last_outreach_sequence__ c` TEXT , `clearbit_timestamp __c` TEXT , `converted_from_lead__ c` bigint , `account_address __c` TEXT , `address_validation__ c` TEXT , `last_salesforce_campaign __c` TEXT , `wm4sf3__ walkme_engagement_score __c` TEXT , `sourced_by__ c` TEXT , `current_sequence_task_due_date __c` TEXT , `current_outreach_sequence_new__ c` TEXT , `dfox __account__ c` TEXT , `dfox __company_alexa_rank__ c` double , `dfox __company_city__ c` TEXT , `dfox __company_country__ c` TEXT , `dfox __company_crunchbase_url__ c` TEXT , `dfox __company_datafox_id__ c` TEXT , `dfox __company_datafox_score__ c` double , `dfox __company_datafox_url__ c` TEXT , `dfox __company_finance_score__ c` double , `dfox __company_growth_score__ c` double , `dfox __company_hr_score__ c` double , `dfox __company_influence_score__ c` double , `dfox __company_investors__ c` TEXT , `dfox __company_last_founding_type__ c` TEXT , `dfox __company_last_funding_amount__ c` double , `dfox __company_last_funding_date__ c` TEXT , `dfox __company_last_funding_type__ c` TEXT , `dfox __company_linkedin_url__ c` TEXT , `dfox __company_long_description__ c` TEXT , `dfox __company_name__ c` TEXT , `dfox __company_number_of_employees__ c` double , `dfox __company_phone_number__ c` TEXT , `dfox __company_private_funding__ c` double , `dfox __company_revenue_estimate__ c` double , `dfox __company_short_description__ c` TEXT , `dfox __company_stage__ c` TEXT , `dfox __company_state__ c` TEXT , `dfox __company_stock_ticker__ c` TEXT , `dfox __company_street_address__ c` TEXT , `dfox __company_techstack__ c` TEXT , `dfox __company_top_keywords__ c` TEXT , `dfox __company_twitter_followers__ c` double , `dfox __company_twitter_handle__ c` TEXT , `dfox __company_website__ c` TEXT , `dfox __company_zip_code__ c` TEXT , `dfox __id__ c` TEXT , `dfox __last_synced_date__ c` TEXT , `dfox __middle_name__ c` TEXT , `dfox __sourced_from_datafox__ c` bigint , `brighttalk __user_id__ c` double , `community_score_engaging __c` double , `account_owner_pipeline_pod__ c` TEXT , `last_salesforce_campaign_status __c` TEXT , `cbit__ clearbitready __c` bigint , `cbit__ clearbit __c` TEXT , `cbit__ createdbyclearbit __c` bigint , `cbit__ facebook __c` TEXT , `cbit__ linkedin __c` TEXT , `cbit__ twitter __c` TEXT , `glid__ c` TEXT , `xuid __c` TEXT , `community_score_learning__ c` double , `community_score_listening __c` double , `community_score_overall__ c` double , `hubspot_sync_inclusion_list __c` bigint , `hubspot_sfdc_sync_master__ c` bigint , `how_did_you_hear __c` TEXT , `how_did_you_hear_details__ c` TEXT , `date_of_qualified_opportunity __c` TEXT , `date_last_contact_status_change__ c` TEXT , `time_in_contact_status_days __c` double , `slack_notification_text_backup__ c` TEXT , `region_contact __c` TEXT , `qualified_ntc_opp__ c` bigint , `qualified_tc_opp __c` bigint , `customer_mql__ c` bigint , `lead_notes __c` TEXT , `count_of_activities_last_90_days__ c` double , `abm_sourced_by __c` TEXT , `website_interest__ c` TEXT , `sdr_owner_locked __c` bigint , `sdr_owner__ c` TEXT , `logged_in_user_sdr_owner __c` bigint , `unique_contacts__ c` double , `count_of_activities_since_mql_date __c` double , `hubspot_sync_testing__ c` TEXT , `recent_campaign_history __c` TEXT , `website_interest_sales_multiselect__ c` TEXT , `original_source_drill_down_1_del __c` TEXT , `description` TEXT , `pathfactory_last_topic_seen__ c` TEXT , `account_owner_id __c` TEXT , `sdr_owner_s_manager_team__ c` TEXT , `time` bigint , KEY(`time`) USING CLUSTERED COLUMNSTORE );;

CREATE OR REPLACE PIPELINE contact
AS LOAD DATA S3 "<bucket-name>/31155e34-96b8-400c-9477-d442ef4dbc5d/incoming_sfdc_v2/contact/"
CONFIG "{\"region\": \"us-west-2\"}"
SKIP DUPLICATE KEY ERRORS
INTO TABLE contact
FIELDS TERMINATED BY "\t"
LINES TERMINATED BY "\r\n"
IGNORE 1 LINES
( attributes,id,isdeleted,masterrecordid,accountid,lastname,firstname,salutation,middlename,suffix,name,mailingstreet,mailingcity,mailingstate,mailingpostalcode,mailingcountry,mailingstatecode,mailingcountrycode,mailinglatitude,mailinglongitude,mailinggeocodeaccuracy,mailingaddress,phone,fax,mobilephone,reportstoid,email,title,department,currencyisocode,ownerid,hasoptedoutofemail,createddate,createdbyid,lastmodifieddate,lastmodifiedbyid,systemmodstamp,lastactivitydate,lastcurequestdate,lastcuupdatedate,lastvieweddate,lastreferenceddate,emailbouncedreason,emailbounceddate,isemailbounced,photourl,jigsaw,jigsawcontactid,ip_country __c,ip_state__ c,lid __linkedin_company_id__ c,lid __linkedin_member_token__ c,last_email_name __c,last_registered_event__ c,ip_address __c,ip_city__ c,email_opt_out_marketing_information __c,culture_amp_email_subscription__ c,outreach_persona __c,outbound_personalised_note__ c,chat_result __c,network_interested__ c,hubspot_score __c,email_opt_out_people_geek_events__ c,original_source_drill_down_2 __c,original_source_drill_down_1__ c,first_page_seen __c,last_page_seen__ c,first_conversion __c,team_for_views__ c,became_a_marketing_qualified_lead_date __c,net_promoter_score_nps__ c,last_registered_event_date __c,first_conversion_date__ c,last_email_click_date __c,contact_id_18_char__ c,eventbritesync __eventbriteid__ c,eventbritesync __eventbritetype__ c,eventbritesync __uniquepersonid__ c,time_first_seen_contact __c,converted_campaign__ c,date_of_last_chat __c,outreach_stage__ c,clearbit_company_metrics_employees __c,recent_campaign_touch__ c,recent_campaign_source_contact __c,outreach_notes__ c,campaign_influence_lead __c,most_recent_campaign_touch_date__ c,contact_previous_campaign_touch __c,previous_campaign_touch_date_contact__ c,account_abm_stage __c,account_owner_for_views__ c,contact_tweet __c,recent_campaign__ c,became_a_demo_date_contact __c,recent_campaign_id_contact__ c,campaign_member __c,leandata__ ld_segment __c,leandata__ matched_buyer_persona __c,leandata__ routing_action __c,linkedin_page__ c,persona __c,last_nps_date__ c,master_class_date __c,people_geekly_subscriber__ c,abm_source __c,level_of_influence__ c,meeting_type_cp __c,email_opt_out_newsletter__ c,product_admin_status __c,recent_conversion_date__ c,individual_view __c,employee_size_segment__ c,country_calling_code __c,actively_being_sequenced__ c,job_change __c,email_product_events_opt_in__ c,email_receives_events __c,account_owner_email__ c,account_owner_logged_in_user __c,sdr_owner_manager__ c,logged_in_user_sdr_owner_manager __c,logged_in_user_leadership_role__ c,account_owner_lookup __c,champion__ c,email_product_newsletter_opt_in __c,email_product_insights_opt_in__ c,email_receives_insights __c,email_receives_newsletter__ c,date_of_last_geekup __c,date_of_last_workshop__ c,zendesk __create_in_zendesk__ c,zendesk __last_sync_date__ c,zendesk __last_sync_status__ c,zendesk __result__ c,zendesk __tags__ c,zendesk __zendesk_outofsync__ c,zendesk __zendesk_oldtags__ c,zendesk __iscreatedupdatedflag__ c,zendesk __notes__ c,zendesk __zendesk_id__ c,last_tc_lead __c,tc_clock_active__ c,contact_status __c,inactive_reason__ c,import_notes __c,cloudingoagent__ ces __c,cloudingoagent__ mar __c,cloudingoagent__ mas __c,cloudingoagent__ mav __c,cloudingoagent__ mrdi __c,cloudingoagent__ mtz __c,cloudingoagent__ oar __c,cloudingoagent__ oas __c,cloudingoagent__ oav __c,cloudingoagent__ ordi __c,cloudingoagent__ otz __c,became_mql_date_time__ c,leandata_inactive_merge __c,bizible2__ ad_campaign_name_ft __c,bizible2__ ad_campaign_name_lc __c,bizible2__ bizibleid __c,bizible2__ landing_page_ft __c,bizible2__ landing_page_lc __c,bizible2__ marketing_channel_ft __c,bizible2__ marketing_channel_lc __c,bizible2__ touchpoint_date_ft __c,bizible2__ touchpoint_date_lc __c,bizible2__ touchpoint_source_ft __c,bizible2__ touchpoint_source_lc __c,slack_notification_text__ c,customer_status __c,recent_conversion_event__ c,marketing_qualified_reason __c,last_outreach_sequence__ c,clearbit_timestamp __c,converted_from_lead__ c,account_address __c,address_validation__ c,last_salesforce_campaign __c,wm4sf3__ walkme_engagement_score __c,sourced_by__ c,current_sequence_task_due_date __c,current_outreach_sequence_new__ c,dfox __account__ c,dfox __company_alexa_rank__ c,dfox __company_city__ c,dfox __company_country__ c,dfox __company_crunchbase_url__ c,dfox __company_datafox_id__ c,dfox __company_datafox_score__ c,dfox __company_datafox_url__ c,dfox __company_finance_score__ c,dfox __company_growth_score__ c,dfox __company_hr_score__ c,dfox __company_influence_score__ c,dfox __company_investors__ c,dfox __company_last_founding_type__ c,dfox __company_last_funding_amount__ c,dfox __company_last_funding_date__ c,dfox __company_last_funding_type__ c,dfox __company_linkedin_url__ c,dfox __company_long_description__ c,dfox __company_name__ c,dfox __company_number_of_employees__ c,dfox __company_phone_number__ c,dfox __company_private_funding__ c,dfox __company_revenue_estimate__ c,dfox __company_short_description__ c,dfox __company_stage__ c,dfox __company_state__ c,dfox __company_stock_ticker__ c,dfox __company_street_address__ c,dfox __company_techstack__ c,dfox __company_top_keywords__ c,dfox __company_twitter_followers__ c,dfox __company_twitter_handle__ c,dfox __company_website__ c,dfox __company_zip_code__ c,dfox __id__ c,dfox __last_synced_date__ c,dfox __middle_name__ c,dfox __sourced_from_datafox__ c,brighttalk __user_id__ c,community_score_engaging __c,account_owner_pipeline_pod__ c,last_salesforce_campaign_status __c,cbit__ clearbitready __c,cbit__ clearbit __c,cbit__ createdbyclearbit __c,cbit__ facebook __c,cbit__ linkedin __c,cbit__ twitter __c,glid__ c,xuid __c,community_score_learning__ c,community_score_listening __c,community_score_overall__ c,hubspot_sync_inclusion_list __c,hubspot_sfdc_sync_master__ c,how_did_you_hear __c,how_did_you_hear_details__ c,date_of_qualified_opportunity __c,date_last_contact_status_change__ c,time_in_contact_status_days __c,slack_notification_text_backup__ c,region_contact __c,qualified_ntc_opp__ c,qualified_tc_opp __c,customer_mql__ c,lead_notes __c,count_of_activities_last_90_days__ c,abm_sourced_by __c,website_interest__ c,sdr_owner_locked __c,sdr_owner__ c,logged_in_user_sdr_owner __c,unique_contacts__ c,count_of_activities_since_mql_date __c,hubspot_sync_testing__ c,recent_campaign_history __c,website_interest_sales_multiselect__ c,original_source_drill_down_1_del __c,description,pathfactory_last_topic_seen__ c,account_owner_id __c,sdr_owner_s_manager_team__ c,time );

START PIPELINE contact FOREGROUND;

```

---

<div class="post-metadata">

**Author:** ![JoYo](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/65b543/32.png) [@JoYo](https://www.singlestore.com/forum/u/JoYo)\
**Post date:** [August 27, 2019, 8:33pm UTC](https://www.singlestore.com/forum/t/pipeline-errors/1178/2 "2019-08-27T20:33:19Z")

</div>

This is a transient error caused by an out of sync ref db, in other words, that leaf hasn’t yet received the metadata for that pipeline (it maybe have been offline at the time you ran create pipeline, for instance, or replication may have been very far behind). If you run `_SYNC2 <your_db_name>` on the master aggregator and try again, it should work. Also 6.8.4 and later doesn’t have this issue (unless replication is extremely behind), as it will wait for the reference database replication to get in sync while compiling the query.

---

<div class="post-metadata">

**Author:** ![scott](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.singlestore.com/forum/u/scott)\
**Post date:** [August 27, 2019, 10:26pm UTC](https://www.singlestore.com/forum/t/pipeline-errors/1178/3 "2019-08-27T22:26:32Z")

</div>

Thanks JoYo. I will try adding that statement. It would be great if MemSQL will just block when this occurs, but I can build in automatic retries.

This is a cluster running 6.8.7 so seems to be an ongoing issue.
