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

NEW TSQL (ASA) Rule Suggestion: flag deprecated "LOCATION = USER_DB" clause #1753

Open
jpers36 opened this issue Oct 25, 2021 · 0 comments
Open
Labels
enhancement New feature or request new rule A new linting rule to add to the library t-sql Issues related to the T-SQL/TSQL/Transact SQL dialect

Comments

@jpers36
Copy link
Contributor

jpers36 commented Oct 25, 2021

The location clause within a table creation statement is deprecated and ignored ("LOCATION = USER_DB"). We can flag and automatically remove this.

This can be applied across the whole TSQL dialect as this specific formulation of the location clause will only be seen within Azure Synapse Analytics.

Anti-pattern

CREATE TABLE #UserDB
WITH (DISTRIBUTION = ROUND_ROBIN, HEAP, LOCATION = User_db)
AS
SELECT 1

Pattern

CREATE TABLE #UserDB
WITH (DISTRIBUTION = ROUND_ROBIN, HEAP)
AS
SELECT 1
@jpers36 jpers36 added the enhancement New feature or request label Oct 25, 2021
@tunetheweb tunetheweb added t-sql Issues related to the T-SQL/TSQL/Transact SQL dialect new rule A new linting rule to add to the library labels Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new rule A new linting rule to add to the library t-sql Issues related to the T-SQL/TSQL/Transact SQL dialect
Projects
None yet
Development

No branches or pull requests

2 participants