Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues with reserved keywords while syncing Salesforce to Snowflake #133

Open
dlouseiro opened this issue Nov 23, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dlouseiro
Copy link
Contributor

While testing a Salesforce -> Snowflake synchronisation I had two issues related to reserved keywords:

  1. While synchronising the socialpersona entity, the sync failed while creating the target table due to the field called FOLLOWING being a reserved keyword. Error message was SQL compilation error: syntax error line 26 at position 1 unexpected 'following'..
  2. While synchronising the GROUP entity, the sync failed due to GROUP being a reserved keyword. It seems that the table identifier was properly quoted in other SQL command executed in the process though, as the CREATE statement for example.

I'd overall expect reserved keywords to be quoted!

@dlouseiro
Copy link
Contributor Author

Create statement produced for SOCIALPERSONA:

CREATE TABLE "SALESFORCE"."SOCIALPERSONA" (
	id VARCHAR NOT NULL, 
	isdeleted BOOLEAN, 
	name VARCHAR, 
	createddate TIMESTAMP_NTZ, 
	createdbyid VARCHAR, 
	lastmodifieddate TIMESTAMP_NTZ, 
	lastmodifiedbyid VARCHAR, 
	systemmodstamp TIMESTAMP_NTZ, 
	lastvieweddate TIMESTAMP_NTZ, 
	☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺ TIMESTAMP_NTZ, 
	parentid VARCHAR, 
	provider VARCHAR, 
	externalid VARCHAR, 
	isdefault BOOLEAN, 
	☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺ VARCHAR, 
	profileurl VARCHAR, 
	topictype VARCHAR, 
	isblacklisted BOOLEAN, 
	realname VARCHAR, 
	isfollowingus BOOLEAN, 
	arewefollowing BOOLEAN, 
	mediatype VARCHAR, 
	bio VARCHAR, 
	followers DECIMAL, 
	following DECIMAL, 
	numberoffriends DECIMAL, 
	listedcount DECIMAL, 
	mediaprovider VARCHAR, 
	profiletype VARCHAR, 
	r6sourceid VARCHAR, 
	numberoftweets DECIMAL, 
	sourceapp VARCHAR, 
	authorlabels VARCHAR, 
	isverified BOOLEAN, 
	influencerscore DECIMAL, 
	avatarurl VARCHAR, 
	_sdc_extracted_at TIMESTAMP_NTZ, 
	_sdc_received_at TIMESTAMP_NTZ, 
	_sdc_batched_at TIMESTAMP_NTZ, 
	_sdc_deleted_at TIMESTAMP_NTZ, 
	_sdc_sequence DECIMAL, 
	_sdc_table_version DECIMAL, 
	PRIMARY KEY (id)
)

@dlouseiro
Copy link
Contributor Author

dlouseiro commented Nov 23, 2023

DELETE command that failed while syncing GROUP entity:

DELETE FROM <my-database>.SALESFORCE.GROUP WHERE _sdc_table_version <= 1700711182454

Where <my-database> is the name of my target database.

@edgarrmondragon edgarrmondragon self-assigned this Oct 22, 2024
@edgarrmondragon edgarrmondragon added the bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants