Solved

SQL Reserved words


Userlevel 2
Badge +5

hi,

During the Creation steps in Deployment, I’ve had some problems because I used preserved SQL names (check, revoke) in the data model. How come the SF does not validate this during Creation? Or am I missing something?

The list of preserved words is getting bigger and bigger..

icon

Best answer by Mark Jongeling 17 May 2022, 12:37

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +23

Hi Tejo,

The Software Factory does have a number of Validations that validate the data model to see if any reserved keywords are used. 

The SQL keywords you mentioned are in the reserved keyword list:

Reserved keywords

Can you check if you received any validation messages about the usage of these names? And if not, what type of objects where using these keywords?

Userlevel 2
Badge +5

hi Mark,

Ah, I see the validation now, but it is only a warning (in testing I normally skip these warnings 😬 ). Shouldn’t this be an error as the sql code breaks when executing?

 

Userlevel 7
Badge +23

hi Mark,

Ah, I see the validation now, but it is only a warning (in testing I normally skip these warnings 😬 ). Shouldn’t this be an error as the sql code breaks when executing?

 

We did change the way the Software Factory handles these object names from 2022.1. When rolling out your model, object names are escaped using quotes ("”) around the name. This prevent an error from occurring and thus make it possible to roll out. We made this change due to Upcycled projects possibly having these object names. So the Warning severity is correct in this case.

I suppose you are working on the 2021.3 version which did not have these changes yet, then the severity may not be entirely correct. Many reserved keywords can be used in object names but indeed some are problematic.

Userlevel 2
Badge +5

Ah, jep, 2021.3 here. Thanks, we need to update :-)