Repository: sqlfluff/sqlfluff
Issue category: Feature Request

[Snowflake] Add new `TYPE` property to user object
### Search before asking

- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.


### Description

Snowflake has recently added a new `TYPE` property to its users.

This affects [CREATE USER](https://docs.snowflake.com/en/sql-reference/sql/create-user) or [ALTER USER](https://docs.snowflake.com/en/sql-reference/sql/alter-user).

Example:
```sql
CREATE USER IF NOT EXISTS some_user
  TYPE = PERSON
  FIRST_NAME = 'First'
  LAST_NAME = 'Last'
  LOGIN_NAME = 'test@email.com'
  EMAIL = 'test@email.com';
```

Error: `Line 2, Position 3: Found unparsable section: "TYPE = PERSON/n  FIRST_NAME = 'First'/n  L..."sqlfluff(PRS)`

### Use case

_No response_

### Dialect

Snowflake

### Are you willing to work on and submit a PR to address the issue?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/sqlfluff/sqlfluff/blob/main/CODE_OF_CONDUCT.md)



Functions to edit:
src/sqlfluff/dialects/dialect_snowflake.py:CreateUserSegment

Patch:
diff --git a/src/sqlfluff/dialects/dialect_snowflake.py b/src/sqlfluff/dialects/dialect_snowflake.py
index a0ce7e49ac7..8f5e02e296b 100644
--- a/src/sqlfluff/dialects/dialect_snowflake.py
+++ b/src/sqlfluff/dialects/dialect_snowflake.py
@@ -4995,6 +4995,14 @@ class CreateUserSegment(BaseSegment):
                 Ref("EqualsSegment"),
                 Ref("ObjectReferenceSegment"),
             ),
+            Sequence(
+                "TYPE",
+                Ref("EqualsSegment"),
+                OneOf(
+                    Ref("ObjectReferenceSegment"),
+                    Ref("QuotedLiteralSegment"),
+                ),
+            ),
             Ref("CommentEqualsClauseSegment"),
         ),
         Dedent,

Test patch: diff --git a/test/fixtures/dialects/snowflake/alter_user_set_values.sql b/test/fixtures/dialects/snowflake/alter_user_set_values.sql
index a0eb65fb9e4..e3de5ecbca5 100644
--- a/test/fixtures/dialects/snowflake/alter_user_set_values.sql
+++ b/test/fixtures/dialects/snowflake/alter_user_set_values.sql
@@ -1,1 +1,1 @@
-ALTER USER my_user SET password = 'abc123', DEFAULT_ROLE = user_role;
+ALTER USER my_user SET password = 'abc123', DEFAULT_ROLE = user_role, type = person;
diff --git a/test/fixtures/dialects/snowflake/alter_user_set_values.yml b/test/fixtures/dialects/snowflake/alter_user_set_values.yml
index b7d5aca738d..1e58ee02081 100644
--- a/test/fixtures/dialects/snowflake/alter_user_set_values.yml
+++ b/test/fixtures/dialects/snowflake/alter_user_set_values.yml
@@ -3,7 +3,7 @@
 # computed by SQLFluff when running the tests. Please run
 # `python test/generate_parse_fixture_yml.py`  to generate them after adding or
 # altering SQL files.
-_hash: 76a544b5e2171a7f7b36125275635082014c8b6e883fec398e9ae091664ec4a2
+_hash: fcf8d08229c7a0c16c14d292937cc549b891f6999f97f413db0a375b4d3cf7d0
 file:
   statement:
     alter_user_statement:
@@ -22,4 +22,10 @@ file:
         raw_comparison_operator: '='
     - object_reference:
         naked_identifier: user_role
+    - comma: ','
+    - parameter: type
+    - comparison_operator:
+        raw_comparison_operator: '='
+    - object_reference:
+        naked_identifier: person
   statement_terminator: ;
diff --git a/test/fixtures/dialects/snowflake/alter_user_unset_values.sql b/test/fixtures/dialects/snowflake/alter_user_unset_values.sql
index d035471c497..185168cc076 100644
--- a/test/fixtures/dialects/snowflake/alter_user_unset_values.sql
+++ b/test/fixtures/dialects/snowflake/alter_user_unset_values.sql
@@ -1,1 +1,1 @@
-ALTER USER my_user unset USE_CACHED_RESULT, must_change_password;
+ALTER USER my_user unset USE_CACHED_RESULT, must_change_password, type;
diff --git a/test/fixtures/dialects/snowflake/alter_user_unset_values.yml b/test/fixtures/dialects/snowflake/alter_user_unset_values.yml
index 60c90ce2bbf..44d88b9e885 100644
--- a/test/fixtures/dialects/snowflake/alter_user_unset_values.yml
+++ b/test/fixtures/dialects/snowflake/alter_user_unset_values.yml
@@ -3,7 +3,7 @@
 # computed by SQLFluff when running the tests. Please run
 # `python test/generate_parse_fixture_yml.py`  to generate them after adding or
 # altering SQL files.
-_hash: 0f94d2bdd6cb9b528654db6db7089ccddaf9cf20433b8060906ebdaa76da603a
+_hash: 90bdf9e61084b14732900e3db2b7689a29e712085b61a8320499c62033945a0d
 file:
   statement:
     alter_user_statement:
@@ -15,4 +15,6 @@ file:
     - parameter: USE_CACHED_RESULT
     - comma: ','
     - parameter: must_change_password
+    - comma: ','
+    - parameter: type
   statement_terminator: ;
diff --git a/test/fixtures/dialects/snowflake/create_user.sql b/test/fixtures/dialects/snowflake/create_user.sql
index ae275e3a84e..643b8cf3a6d 100644
--- a/test/fixtures/dialects/snowflake/create_user.sql
+++ b/test/fixtures/dialects/snowflake/create_user.sql
@@ -1,4 +1,5 @@
 create user user1
+    type = person
     password='abc123'
     default_role = myrole
     display_name = user1
@@ -12,6 +13,7 @@ create user user1
     must_change_password = true;
 
 create user user2
+    type = 'service'
     password='abc123'
     default_role = 'myrole'
     display_name = 'user 2'
diff --git a/test/fixtures/dialects/snowflake/create_user.yml b/test/fixtures/dialects/snowflake/create_user.yml
index c03763fbb33..dd0daf80d58 100644
--- a/test/fixtures/dialects/snowflake/create_user.yml
+++ b/test/fixtures/dialects/snowflake/create_user.yml
@@ -3,7 +3,7 @@
 # computed by SQLFluff when running the tests. Please run
 # `python test/generate_parse_fixture_yml.py`  to generate them after adding or
 # altering SQL files.
-_hash: 22283b573b8035fbf38494b02509411ee71d9b5493e78f1c4c88b09998ca16e8
+_hash: c16501055dbb5932b274caf0eeebbe4e45641f82a95b58957d4a49b13139031e
 file:
 - statement:
     create_user_statement:
@@ -11,6 +11,11 @@ file:
     - keyword: user
     - object_reference:
         naked_identifier: user1
+    - keyword: type
+    - comparison_operator:
+        raw_comparison_operator: '='
+    - object_reference:
+        naked_identifier: person
     - keyword: password
     - comparison_operator:
         raw_comparison_operator: '='
@@ -73,6 +78,10 @@ file:
     - keyword: user
     - object_reference:
         naked_identifier: user2
+    - keyword: type
+    - comparison_operator:
+        raw_comparison_operator: '='
+    - quoted_literal: "'service'"
     - keyword: password
     - comparison_operator:
         raw_comparison_operator: '='