Repository: StarRocks/dbt-starrocks (language: python)

Issue:
starrocks-adapter is not available
Use this starrocks-adapter:
envs: 
    python-3.7.4
    dbt-core-1.1.0
    starrocks-2.1.4

    
The following problems occur:

1. When creating a project (use 'dbt init'), there is no starrocks adapter to choose from
  1）install dbt-starrocks(use 'pip install .' )
  2）creating a project (use 'dbt init')
  3）There is no 'starrocks-adapter' option

2. sample_profiles.yml  format error(Indent error):
`
    default:
      outputs:
        dev:
          type: starrocks
            host: <host>
            port: <port_num>
            username: <user>
            password: <pass>
            database: <db>
      target: dev

`

3. executing 'dbt run', connection error:
`
  >Database Error
  (1064, "Unknown character set: 'latin1'")
`

  
4. When testing 'starrocks.dbtspec  test_dbt_base: base', the following exceptions occur
`
    Expected only one database in get_catalog
`
because of exists two 'information_schema'：
1) {database}.information_schema
2) information_schema

5. Execute RENAME when creating a view, that is, execute the following commands:
`
    create view {{ to_relation }} as {{ results[0]['Create View'].replace(from_relation.table, to_relation.table).split('AS',1)[1] }}
    drop view if exists {{ from_relation }};
`
'unknown error' appears. Two SQL statements cannot be executed at the same time


Discussion / hints:

Fix patch:
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..16da75f
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,13 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+recursive-include dbt/include *.sql *.yml *.md
\ No newline at end of file
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 959aa22..0000000
--- a/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-checkfiles = dbt/adapters test/ setup.py
-py_warn = PYTHONDEVMODE=1
-
-up:
-	@pip install -r requirements_dev.txt --upgrade
-
-deps: 
-	@pip install -r requirements_dev.txt
-
-style: deps
-	@isort -src $(checkfiles)
-	@black $(checkfiles)
-
-check: deps
-	@black --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
-	@flake8 $(checkfiles)
-	@bandit -x tests -r $(checkfiles)
-	@mypy $(checkfiles)
-
-test: deps
-	$(py_warn) pytest
-
-build:
-	@python setup.py bdist_wheel
-
-ci: check test
diff --git a/README.md b/README.md
index 3f6797e..83c03a9 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,41 @@
-# dbt-starrocks
+<!--- Licensed under the Apache License, Version 2.0 (the "License"); -->
+<!--- you may not use this file except in compliance with the License. -->
+<!--- You may obtain a copy of the License at -->
+
+<!---   http://www.apache.org/licenses/LICENSE-2.0 -->
+
+<!--- Unless required by applicable law or agreed to in writing, software -->
+<!--- distributed under the License is distributed on an "AS IS" BASIS, -->
+<!--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
+<!--- See the License for the specific language governing permissions and -->
+<!--- limitations under the License. -->
+## dbt-starrocks
 
 This project is **under development**.
+
+
+The `dbt-starrocks` package contains all of the code enabling dbt to work with a StarRocks database. For
+more information on using dbt with StarRocks.
+
+## Getting started
+Configuration your envs:
+
+- Python: 3.7.4
+- StarRocks: 2.1.4
+- DBT: 1.1.0
+
+Install the `dbt-starrocks` into the `plugin` directory, and
+```
+  pip install .
+```
+
+Create your project:
+```
+  dbt init
+```
+
+## Test Adapter
+consult [the project](https://github.com/dbt-labs/dbt-adapter-tests)
+
+## Notice
+1. Don't use the SQL: 'with ...' --> ('create table as (with ...)')
\ No newline at end of file
diff --git a/dbt/adapters/starrocks/__init__.py b/dbt/adapters/starrocks/__init__.py
index c32417e..8dfd17d 100644
--- a/dbt/adapters/starrocks/__init__.py
+++ b/dbt/adapters/starrocks/__init__.py
@@ -1,11 +1,24 @@
-from dbt.adapters.base import AdapterPlugin
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 
-from dbt.adapters.starrocks.connections import StarRocksAdapterCredentials
+from dbt.adapters.starrocks.connections import StarRocksConnectionManager
+from dbt.adapters.starrocks.connections import StarRocksCredentials
 from dbt.adapters.starrocks.impl import StarRocksAdapter
+
+from dbt.adapters.base import AdapterPlugin
 from dbt.include import starrocks
 
+
 Plugin = AdapterPlugin(
     adapter=StarRocksAdapter,
-    credentials=StarRocksAdapterCredentials,
-    include_path=starrocks.PACKAGE_PATH,
-)
+    credentials=StarRocksCredentials,
+    include_path=starrocks.PACKAGE_PATH)
diff --git a/dbt/adapters/starrocks/__version__.py b/dbt/adapters/starrocks/__version__.py
new file mode 100644
index 0000000..929b01a
--- /dev/null
+++ b/dbt/adapters/starrocks/__version__.py
@@ -0,0 +1,13 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version = "1.1.0"
diff --git a/dbt/adapters/starrocks/column.py b/dbt/adapters/starrocks/column.py
index 0ac7a8d..a05c7a8 100644
--- a/dbt/adapters/starrocks/column.py
+++ b/dbt/adapters/starrocks/column.py
@@ -1,8 +1,19 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 from dataclasses import dataclass
 
 from dbt.adapters.base.column import Column
 
-
 @dataclass
 class StarRocksColumn(Column):
     @property
@@ -11,3 +22,41 @@ def quoted(self) -> str:
 
     def __repr__(self) -> str:
         return f"<StarRocksColumn {self.name} ({self.data_type})>"
+
+    def is_string(self) -> bool:
+        return self.dtype.lower() in ["text", "character varying", "character", "varchar",
+                                      # starrocks
+                                      "char", "string"]
+
+    def is_float(self):
+        return self.dtype.lower() in [
+            # floats
+            "real",
+            "float4",
+            "float",
+            "double precision",
+            "float8",
+            # starrocks
+            "double",
+        ]
+
+    def is_integer(self) -> bool:
+        return self.dtype.lower() in [
+            # real types
+            "smallint",
+            "integer",
+            "bigint",
+            "smallserial",
+            "serial",
+            "bigserial",
+            # aliases
+            "int2",
+            "int4",
+            "int8",
+            "serial2",
+            "serial4",
+            "serial8",
+            # starrocks
+            "largeint",
+            "tinyint",
+        ]
diff --git a/dbt/adapters/starrocks/connections.py b/dbt/adapters/starrocks/connections.py
index b089995..70f8826 100644
--- a/dbt/adapters/starrocks/connections.py
+++ b/dbt/adapters/starrocks/connections.py
@@ -1,99 +1,172 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 from contextlib import contextmanager
+
+import mysql.connector
+
+import dbt.exceptions
 from dataclasses import dataclass
-from typing import ContextManager, Optional, Union
 
-import MySQLdb
-import MySQLdb.cursors
 from dbt.adapters.base import Credentials
 from dbt.adapters.sql import SQLConnectionManager
-from dbt.contracts.connection import AdapterResponse, Connection, ConnectionState
+from dbt.contracts.connection import AdapterResponse
+from dbt.contracts.connection import Connection
 from dbt.events import AdapterLogger
-
-from dbt import exceptions
+from typing import Optional
 
 logger = AdapterLogger("starrocks")
 
-
 @dataclass
-class StarRocksAdapterCredentials(Credentials):
-    host: str = "127.0.0.1"
-    port: int = 9030
-    username: str = "root"
-    password: str = ""
+class StarRocksCredentials(Credentials):
+    host: Optional[str] = None
+    port: Optional[int] = None
     database: Optional[str] = None
     schema: Optional[str] = None
+    username: Optional[str] = None
+    password: Optional[str] = None
+    charset: Optional[str] = None
 
-    @property
-    def type(self):
-        return "starrocks"
-
-    def _connection_keys(self):
-        return "host", "port", "user", "schema"
-
-    @property
-    def unique_field(self) -> str:
-        return self.host
+    def __init__(self, **kwargs):
+        for k, v in kwargs.items():
+            setattr(self, k, v)
 
     def __post_init__(self):
-        if self.database is not None and self.database != self.schema:
-            raise exceptions.RuntimeException(
+        # starrocks classifies database and schema as the same thing
+        if (
+            self.database is not None and
+            self.database != self.schema
+        ):
+            raise dbt.exceptions.RuntimeException(
                 f"    schema: {self.schema} \n"
                 f"    database: {self.database} \n"
                 f"On StarRocks, database must be omitted or have the same value as"
                 f" schema."
             )
 
+    @property
+    def type(self):
+        return 'starrocks'
+
+    @property
+    def unique_field(self):
+        return self.schema
+
+    def _connection_keys(self):
+        """
+        Returns an iterator of keys to pretty-print in 'dbt debug'
+        """
+        return (
+            "host",
+            "port",
+            "database",
+            "schema",
+            "username",
+        )
 
-class StarRocksAdapterConnectionManager(SQLConnectionManager):
-    TYPE = "starrocks"
+class StarRocksConnectionManager(SQLConnectionManager):
+    TYPE = 'starrocks'
 
     @classmethod
-    def open(cls, connection: Connection) -> Connection:
-        if connection.state == "open":
-            logger.debug("Connection is already open, skipping open")
+    def open(cls, connection):
+        if connection.state == 'open':
+            logger.debug('Connection is already open, skipping open.')
             return connection
-        credentials = connection.credentials
-        kwargs = {
-            "host": credentials.host,
-            "port": credentials.port,
-            "user": credentials.username,
-            "password": credentials.password,
-            "database": "information_schema",  # we need special a default database when connecting
-        }
+
+        credentials = cls.get_credentials(connection.credentials)
+        kwargs = {}
+
+        kwargs["host"] = credentials.host
+        kwargs["username"] = credentials.username
+        kwargs["password"] = credentials.password
+        kwargs["database"] = credentials.schema
+
+        if credentials.port:
+            kwargs["port"] = credentials.port
+
         try:
-            connection.handle = MySQLdb.connect(**kwargs)
-            connection.state = ConnectionState.OPEN
-        except MySQLdb.Error as e:
-            logger.debug(f"Error connecting to database: {e}")
-            connection.handle = None
-            connection.state = ConnectionState.FAIL
-            raise exceptions.FailedToConnectException(str(e))
+            connection.handle = mysql.connector.connect(**kwargs)
+            connection.state = 'open'
+        except mysql.connector.Error:
+
+            try:
+                logger.debug("Failed connection without supplying the `database`. "
+                             "Trying again with `database` included.")
+
+                # Try again with the database included
+                kwargs["database"] = "information_schema"
+
+                connection.handle = mysql.connector.connect(**kwargs)
+                connection.state = 'open'
+            except mysql.connector.Error as e:
+
+                logger.debug("Got an error when attempting to open a StarRocks "
+                             "connection: '{}'"
+                             .format(e))
+
+                connection.handle = None
+                connection.state = 'fail'
+
+                raise dbt.exceptions.FailedToConnectException(str(e))
+
         return connection
 
+    @classmethod
+    def get_credentials(cls, credentials):
+        return credentials
+
     def cancel(self, connection: Connection):
         connection.handle.close()
 
-    @classmethod
-    def get_response(
-        cls, cursor: MySQLdb.cursors.Cursor
-    ) -> Union[AdapterResponse, str]:
-        code = "Unknown cursor state/status"
-        rows = cursor.rowcount
-        return AdapterResponse(
-            code=code,
-            _message=f"{rows} rows affected",
-            rows_affected=rows,
-        )
-
-    @contextmanager  # type: ignore
-    def exception_handler(self, sql: str) -> ContextManager:  # type: ignore
+    @contextmanager
+    def exception_handler(self, sql):
         try:
             yield
-        except MySQLdb.DatabaseError as e:
-            logger.debug(f"StarRocks database error: {e}, sql: {sql}")
-            raise exceptions.DatabaseException(str(e)) from e
+
+        except mysql.connector.DatabaseError as e:
+            logger.debug('StarRocks error: {}'.format(str(e)))
+
+            try:
+                self.rollback_if_open()
+            except mysql.connector.Error:
+                logger.debug("Failed to release connection!")
+                pass
+
+            raise dbt.exceptions.DatabaseException(str(e).strip()) from e
+
         except Exception as e:
-            logger.debug(f"Error running SQL: {sql}")
-            if isinstance(e, exceptions.RuntimeException):
-                raise e
-            raise exceptions.RuntimeException(str(e)) from e
+            logger.debug("Error running SQL: {}", sql)
+            logger.debug("Rolling back transaction.")
+            self.rollback_if_open()
+            if isinstance(e, dbt.exceptions.RuntimeException):
+                # during a sql query, an internal to dbt exception was raised.
+                # this sounds a lot like a signal handler and probably has
+                # useful information, so raise it without modification.
+                raise
+
+            raise dbt.exceptions.RuntimeException(e) from e
+
+    @classmethod
+    def get_response(cls, cursor) -> AdapterResponse:
+        code = "SUCCESS"
+        num_rows = 0
+
+        if cursor is not None and cursor.rowcount is not None:
+            num_rows = cursor.rowcount
+
+        # There's no real way to get the status from the mysql-connector-python driver.
+        # So just return the default value.
+        return AdapterResponse(
+            _message="{} {}".format(code, num_rows),
+            rows_affected=num_rows,
+            code=code
+        )
diff --git a/dbt/adapters/starrocks/impl.py b/dbt/adapters/starrocks/impl.py
index cc22e63..aa9bd26 100644
--- a/dbt/adapters/starrocks/impl.py
+++ b/dbt/adapters/starrocks/impl.py
@@ -1,3 +1,15 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 from concurrent.futures import Future
 from enum import Enum
 from typing import Callable, Dict, List, Optional, Set, Tuple
@@ -15,7 +27,7 @@
 from dbt.utils import executor
 
 from dbt.adapters.starrocks.column import StarRocksColumn
-from dbt.adapters.starrocks.connections import StarRocksAdapterConnectionManager
+from dbt.adapters.starrocks.connections import StarRocksConnectionManager
 from dbt.adapters.starrocks.relation import StarRocksRelation
 
 
@@ -38,7 +50,7 @@ class StarRocksConfig(AdapterConfig):
 
 
 class StarRocksAdapter(SQLAdapter):
-    ConnectionManager = StarRocksAdapterConnectionManager
+    ConnectionManager = StarRocksConnectionManager
     Relation = StarRocksRelation
     AdapterSpecificConfigs = StarRocksConfig
     Column = StarRocksColumn
diff --git a/dbt/adapters/starrocks/relation.py b/dbt/adapters/starrocks/relation.py
index c083717..01467cb 100644
--- a/dbt/adapters/starrocks/relation.py
+++ b/dbt/adapters/starrocks/relation.py
@@ -1,3 +1,15 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 from dataclasses import dataclass
 
 from dbt.adapters.base.relation import BaseRelation, Policy
@@ -25,7 +37,7 @@ class StarRocksRelation(BaseRelation):
     quote_character: str = "`"
 
     def __post_init__(self):
-        if self.database != self.schema and self.database:
+        if self.database is not None:
             raise RuntimeException(f"Cannot set database {self.database} in StarRocks!")
 
     def render(self):
@@ -33,4 +45,4 @@ def render(self):
             raise RuntimeException(
                 "Got a StarRocks relation with schema and database set to include, but only one can be set"
             )
-        return super().render()
+        return super().render()
\ No newline at end of file
diff --git a/dbt/include/starrocks/__init__.py b/dbt/include/starrocks/__init__.py
index b177e5d..bb049b7 100644
--- a/dbt/include/starrocks/__init__.py
+++ b/dbt/include/starrocks/__init__.py
@@ -1,3 +1,14 @@
-import os
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 
+import os
 PACKAGE_PATH = os.path.dirname(__file__)
diff --git a/dbt/include/starrocks/dbt_project.yml b/dbt/include/starrocks/dbt_project.yml
index ea133e6..f914a89 100644
--- a/dbt/include/starrocks/dbt_project.yml
+++ b/dbt/include/starrocks/dbt_project.yml
@@ -1,3 +1,15 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 name: dbt_starrocks
 version: 1.0
 config-version: 2
diff --git a/dbt/include/starrocks/macros/adapters/columns.sql b/dbt/include/starrocks/macros/adapters/columns.sql
index 3e1dcca..bbb2930 100644
--- a/dbt/include/starrocks/macros/adapters/columns.sql
+++ b/dbt/include/starrocks/macros/adapters/columns.sql
@@ -1,14 +1,34 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__get_columns_in_relation(relation) -%}
-    {% call statement('get_columns_in_relation', fetch_result=True) %}
-        select column_name              as `column`,
-       data_type                as 'dtype',
-       character_maximum_length as char_size,
-       numeric_precision,
-       numeric_scale
-from information_schema.columns
-where table_schema = '{{ relation.schema }}'
-  and table_name = '{{ relation.identifier }}'
-    {% endcall %}
-    {% set table = load_result('get_columns_in_relation').table %}
-    {{ return(sql_convert_columns_in_relation(table)) }}
-{%- endmacro %}
+  {% call statement('get_columns_in_relation', fetch_result=True) %}
+    select
+        column_name,
+        data_type,
+        character_maximum_length,
+        numeric_precision,
+        numeric_scale
+
+    from INFORMATION_SCHEMA.columns
+    where table_name = '{{ relation.identifier }}'
+      {% if relation.schema %}
+      and table_schema = '{{ relation.schema }}'
+      {% endif %}
+    order by ordinal_position
+
+  {% endcall %}
+  {% set table = load_result('get_columns_in_relation').table %}
+  {{ return(sql_convert_columns_in_relation(table)) }}
+{% endmacro %}
\ No newline at end of file
diff --git a/dbt/include/starrocks/macros/adapters/freshness.sql b/dbt/include/starrocks/macros/adapters/freshness.sql
index de9644c..5129582 100644
--- a/dbt/include/starrocks/macros/adapters/freshness.sql
+++ b/dbt/include/starrocks/macros/adapters/freshness.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__current_timestamp() -%}
   current_timestamp()
 {%- endmacro %}
diff --git a/dbt/include/starrocks/macros/adapters/metadata.sql b/dbt/include/starrocks/macros/adapters/metadata.sql
index 1433376..6f64da8 100644
--- a/dbt/include/starrocks/macros/adapters/metadata.sql
+++ b/dbt/include/starrocks/macros/adapters/metadata.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__list_relations_without_caching(schema_relation) -%}
   {% call statement('list_relations_without_caching', fetch_result=True) %}
     select
@@ -14,30 +28,30 @@
 {%- endmacro %}
 
 {% macro starrocks__get_catalog(information_schema, schemas) -%}
-    {%- call statement('catalog', fetch_result=True) -%}
+  {%- call statement('catalog', fetch_result=True) -%}
     with tables as (
-        select
-            null as "table_database",
-            table_schema,
-            table_name,
-            case when table_type = 'BASE TABLE' then 'table'
-                 when table_type = 'VIEW' then 'view'
-                 else table_type
-            end as table_type,
-            null as table_owner
-        from {{ information_schema }}.tables
+      select
+          null as "table_database",
+          table_schema,
+          table_name,
+          case when table_type = 'BASE TABLE' then 'table'
+               when table_type = 'VIEW' then 'view'
+               else table_type
+          end as table_type,
+          null as table_owner
+      from {{ information_schema }}.tables
     ),
     columns as (
-        select
-            null as "table_database",
-            table_schema as "table_schema",
-            table_name as "table_name",
-            null as "table_comment",
-            column_name as "column_name",
-            ordinal_position as "column_index",
-            data_type as "column_type",
-            null as "column_comment"
-        from {{ information_schema }}.columns
+      select
+          null as "table_database",
+          table_schema as "table_schema",
+          table_name as "table_name",
+          null as "table_comment",
+          column_name as "column_name",
+          ordinal_position as "column_index",
+          data_type as "column_type",
+          null as "column_comment"
+      from {{ information_schema }}.columns
     )
     select
         columns.table_database,
@@ -59,18 +73,20 @@
     {%- endfor -%}
     )
     order by column_index
-    {%- endcall -%}
+  {%- endcall -%}
 
-    {{ return(load_result('catalog').table) }}
+  {{ return(load_result('catalog').table) }}
 
 {%- endmacro %}
 
 {% macro starrocks__check_schema_exists(database, schema) -%}
-{%- endmacro %}
+    {# no-op #}
+    {# see starrocksAdapter.check_schema_exists() #}
+{% endmacro %}
 
 {% macro starrocks__list_schemas(database) -%}
     {% call statement('list_schemas', fetch_result=True, auto_begin=False) -%}
-    select distinct schema_name from information_schema.schemata
+      select distinct schema_name from information_schema.schemata
     {%- endcall %}
     {{ return(load_result('list_schemas').table) }}
 {%- endmacro %}
diff --git a/dbt/include/starrocks/macros/adapters/relation.sql b/dbt/include/starrocks/macros/adapters/relation.sql
index 2716f15..b2469d0 100644
--- a/dbt/include/starrocks/macros/adapters/relation.sql
+++ b/dbt/include/starrocks/macros/adapters/relation.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__engine() -%}
     {% set label = 'ENGINE' %}
     {% set engine = config.get('engine', validator=validation.any[basestring]) %}
@@ -58,36 +72,29 @@
   {% set properties = config.get('properties', validator=validation.any[dict]) or {"replication_num":"1"} %}
   {% if properties is not none %}
     PROPERTIES (
-        {% for key, value in properties.items() %}
-          "{{ key }}" = "{{ value }}"{% if not loop.last %},{% endif %}
-        {% endfor %}
+      {% for key, value in properties.items() %}
+        "{{ key }}" = "{{ value }}"{% if not loop.last %},{% endif %}
+      {% endfor %}
     )
   {% endif %}
 {%- endmacro%}
 
 {% macro starrocks__drop_relation(relation) -%}
-    {% call statement('drop_relation', auto_begin=False) %}
+  {% call statement('drop_relation', auto_begin=False) %}
     drop {{ relation.type }} if exists {{ relation }}
-    {% endcall %}
-{%- endmacro %}
-
-{% macro starrocks__truncate_relation(relation) -%}
-    {% call statement('truncate_relation') %}
-      truncate table {{ relation }}
-    {% endcall %}
+  {% endcall %}
 {%- endmacro %}
 
 {% macro starrocks__rename_relation(from_relation, to_relation) -%}
-  {% call statement('drop_relation') %}
-    drop {{ to_relation.type }} if exists {{ to_relation }}
-  {% endcall %}
   {% call statement('rename_relation') %}
     {% if to_relation.is_view %}
-    {% set results = run_query('show create view ' + from_relation.render() ) %}
-    create view {{ to_relation }} as {{ results[0]['Create View'].replace(from_relation.table, to_relation.table).split('AS',1)[1] }}
-    drop view if exists {{ from_relation }};
-    {% else %}
-    alter table {{ from_relation }} rename {{ to_relation.table }}
+      {% set results = run_query('show create view ' + from_relation.render() ) %}
+        create view {{ to_relation }} as {{ results[0]['Create View'].replace(from_relation.table, to_relation.table).split('AS',1)[1] }}
+        {% call statement('drop_view') %}
+          drop view if exists {{ from_relation }}
+        {% endcall %}
+      {% else %}
+      alter table {{ from_relation }} rename {{ to_relation.table }}
     {% endif %}
   {% endcall %}
 {%- endmacro %}
diff --git a/dbt/include/starrocks/macros/adapters/schema.sql b/dbt/include/starrocks/macros/adapters/schema.sql
index b5c0b8d..94c1cef 100644
--- a/dbt/include/starrocks/macros/adapters/schema.sql
+++ b/dbt/include/starrocks/macros/adapters/schema.sql
@@ -1,5 +1,19 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__drop_schema(relation) -%}
-    {% call statement('drop_schema') %}
+  {% call statement('drop_schema') %}
     drop schema if exists {{ relation.without_identifier() }}
-    {% endcall %}
+  {% endcall %}
 {%- endmacro %}
diff --git a/dbt/include/starrocks/macros/get_custom_name/get_custom_database.sql b/dbt/include/starrocks/macros/get_custom_name/get_custom_database.sql
index fb6e1ba..95d1a50 100644
--- a/dbt/include/starrocks/macros/get_custom_name/get_custom_database.sql
+++ b/dbt/include/starrocks/macros/get_custom_name/get_custom_database.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__generate_database_name(custom_database_name=none, node=none) -%}
   {% do return(None) %}
 {%- endmacro %}
diff --git a/dbt/include/starrocks/macros/materializations/models/table/create_table_as.sql b/dbt/include/starrocks/macros/materializations/models/table/create_table_as.sql
new file mode 100644
index 0000000..b5c5408
--- /dev/null
+++ b/dbt/include/starrocks/macros/materializations/models/table/create_table_as.sql
@@ -0,0 +1,23 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{% macro starrocks__create_table_as(temporary, relation, sql) -%}
+  {% set sql_header = config.get('sql_header', none) %}
+
+  {{ sql_header if sql_header is not none }}
+  create table {{ relation.include(database=False) }}
+    {{ starrocks__partition_by() }}
+    {{ starrocks__distributed_by() }}
+    {{ starrocks__properties() }} as {{ sql }}
+{%- endmacro %}
diff --git a/dbt/include/starrocks/macros/materializations/models/view/create_view_as.sql b/dbt/include/starrocks/macros/materializations/models/view/create_view_as.sql
new file mode 100644
index 0000000..257a0ce
--- /dev/null
+++ b/dbt/include/starrocks/macros/materializations/models/view/create_view_as.sql
@@ -0,0 +1,20 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{% macro starrocks__create_view_as(relation, sql) -%}
+  {%- set sql_header = config.get('sql_header', none) -%}
+
+  {{ sql_header if sql_header is not none }}
+  create view {{ relation }} as {{ sql }};
+{%- endmacro %}
diff --git a/dbt/include/starrocks/macros/materializations/seed/helpers.sql b/dbt/include/starrocks/macros/materializations/seeds/helpers.sql
similarity index 63%
rename from dbt/include/starrocks/macros/materializations/seed/helpers.sql
rename to dbt/include/starrocks/macros/materializations/seeds/helpers.sql
index 214db7e..91851a8 100644
--- a/dbt/include/starrocks/macros/materializations/seed/helpers.sql
+++ b/dbt/include/starrocks/macros/materializations/seeds/helpers.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__create_csv_table(model, agate_table) -%}
     {% set column_override = model['config'].get('column_types', {}) %}
     {% set quote_seed_column = model['config'].get('quote_columns', None) %}
diff --git a/dbt/include/starrocks/macros/materializations/snapshot/strategies.sql b/dbt/include/starrocks/macros/materializations/snapshot/strategies.sql
deleted file mode 100644
index 5ad3801..0000000
--- a/dbt/include/starrocks/macros/materializations/snapshot/strategies.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-{% macro starrocks__snapshot_hash_arguments(args) -%}
-    md5(concat_ws('|', {%- for arg in args -%}
-        coalesce(cast({{ arg }} as char), '')
-        {% if not loop.last %}, {% endif %}
-    {%- endfor -%}))
-{%- endmacro %}
diff --git a/dbt/include/starrocks/macros/materializations/snapshot/snapshot.sql b/dbt/include/starrocks/macros/materializations/snapshots/snapshot.sql
similarity index 90%
rename from dbt/include/starrocks/macros/materializations/snapshot/snapshot.sql
rename to dbt/include/starrocks/macros/materializations/snapshots/snapshot.sql
index e95921b..198c7ab 100644
--- a/dbt/include/starrocks/macros/materializations/snapshot/snapshot.sql
+++ b/dbt/include/starrocks/macros/materializations/snapshots/snapshot.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__snapshot_string_as_time(timestamp) -%}
     {%- set result = "str_to_date('" ~ timestamp ~ "', '%Y-%m-%d %T')" -%}
     {{ return(result) }}
diff --git a/dbt/include/starrocks/macros/materializations/snapshot/snapshot_merge.sql b/dbt/include/starrocks/macros/materializations/snapshots/snapshot_merge.sql
similarity index 61%
rename from dbt/include/starrocks/macros/materializations/snapshot/snapshot_merge.sql
rename to dbt/include/starrocks/macros/materializations/snapshots/snapshot_merge.sql
index 4589ea7..95046ce 100644
--- a/dbt/include/starrocks/macros/materializations/snapshot/snapshot_merge.sql
+++ b/dbt/include/starrocks/macros/materializations/snapshots/snapshot_merge.sql
@@ -1,3 +1,17 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 {% macro starrocks__snapshot_merge_sql_update(target, source, insert_cols) -%}
     update {{ target }}, (select dbt_scd_id, dbt_change_type, dbt_valid_to from {{ source }}) as DBT_INTERNAL_SOURCE
     set {{ target }}.dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to
diff --git a/dbt/include/starrocks/macros/materializations/snapshots/strategies.sql b/dbt/include/starrocks/macros/materializations/snapshots/strategies.sql
new file mode 100644
index 0000000..0740d46
--- /dev/null
+++ b/dbt/include/starrocks/macros/materializations/snapshots/strategies.sql
@@ -0,0 +1,20 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{% macro starrocks__snapshot_hash_arguments(args) -%}
+    md5(concat_ws('|', {%- for arg in args -%}
+        coalesce(cast({{ arg }} as char), '')
+        {% if not loop.last %}, {% endif %}
+    {%- endfor -%}))
+{%- endmacro %}
diff --git a/dbt/include/starrocks/macros/materializations/table/create_table_as.sql b/dbt/include/starrocks/macros/materializations/table/create_table_as.sql
deleted file mode 100644
index bac9835..0000000
--- a/dbt/include/starrocks/macros/materializations/table/create_table_as.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-{% macro starrocks__create_table_as(temporary, relation, sql) -%}
-  {% set sql_header = config.get('sql_header', none) %}
-
-  {{ sql_header if sql_header is not none }}
-  create table {{ relation.include(database=False) }}
-    {{ starrocks__partition_by() }}
-    {{ starrocks__distributed_by() }}
-    {{ starrocks__properties() }} as {{ sql }}
-{%- endmacro %}
diff --git a/dbt/include/starrocks/macros/materializations/view/create_view_as.sql b/dbt/include/starrocks/macros/materializations/view/create_view_as.sql
deleted file mode 100644
index 23885c1..0000000
--- a/dbt/include/starrocks/macros/materializations/view/create_view_as.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-{% macro starrocks__create_view_as(relation, sql) -%}
-  {%- set sql_header = config.get('sql_header', none) -%}
-
-  {{ sql_header if sql_header is not none }}
-  create view {{ relation }} as {{ sql }};
-{%- endmacro %}
diff --git a/dbt/include/starrocks/profile_template.yml b/dbt/include/starrocks/profile_template.yml
new file mode 100644
index 0000000..7393396
--- /dev/null
+++ b/dbt/include/starrocks/profile_template.yml
@@ -0,0 +1,29 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+fixed:
+  type: starrocks
+prompts:
+  host:
+    hint: 'hostname for the instance'
+  port:
+    default: 9030
+    type: 'int'
+  schema:
+    hint: 'default schema that dbt will build objects in'
+  username:
+    hint: 'username'
+  password:
+    hint: 'password'
+    hide_input: true
+    default: ''
+
diff --git a/dbt/include/starrocks/sample_profiles.yml b/dbt/include/starrocks/sample_profiles.yml
index 63b106d..b4faaa9 100644
--- a/dbt/include/starrocks/sample_profiles.yml
+++ b/dbt/include/starrocks/sample_profiles.yml
@@ -1,10 +1,29 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 default:
   outputs:
     dev:
       type: starrocks
-        host: <host>
-        port: <port_num>
-        username: <user>
-        password: <pass>
-        database: <db>
+      host: <host>
+      port: <port>  # optional
+      schema: <schema>
+      username: <username>
+      password: <password>
+    prod:
+      type: starrocks
+      host: <host>
+      port: <port>  # optional
+      schema: <schema>
+      username: <username>
+      password: <password>
   target: dev
diff --git a/requirements_dev.txt b/requirements_dev.txt
deleted file mode 100644
index 92faaac..0000000
--- a/requirements_dev.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-# Test tools
-coveralls
-pytest
-pytest-xdist
-pytest-cov
-pytest-dbt-adapter
-# Linter tools
-mypy
-flake8
-flake8-comprehensions
-darglint
-pylint
-pygments
-bandit
-black
diff --git a/setup.py b/setup.py
index 140a5e4..8c44663 100644
--- a/setup.py
+++ b/setup.py
@@ -1,36 +1,50 @@
-from setuptools import setup
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 
-packages = ["dbt", "dbt.adapters.starrocks", "dbt.include.starrocks"]
+#!/usr/bin/env python
+from setuptools import find_namespace_packages, setup
 
-package_data = {
-    "": ["*"],
-    "dbt.include.starrocks": [
-        "macros/adapters/*",
-        "macros/get_custom_name/*",
-        "macros/materializations/seed/*",
-        "macros/materializations/snapshot/*",
-        "macros/materializations/table/*",
-        "macros/materializations/view/*",
-    ],
-}
+package_name = "dbt-starrocks"
+# make sure this always matches dbt/adapters/starrocks/__version__.py
+package_version = "1.1.0"
+description = """The starrocks adapter plugin for dbt"""
 
-install_requires = ["dbt-core", "mysqlclient"]
+setup(
+    name=package_name,
+    version=package_version,
+    description=description,
+    long_description=description,
+    author="fujianhj, long2ice",
+    author_email="fujianhj@gmail.com, long2ice@gmail.com",
+    url="",
+    packages=find_namespace_packages(include=['dbt', 'dbt.*']),
+    include_package_data=True,
+    install_requires=[
+        "dbt-core==1.1.0",
+        "mysql-connector-python>=8.0.0,<8.1",
+    ],
+    zip_safe=False,
+    classifiers=[
+        'Development Status :: 5 - Production/Stable',
 
-setup_kwargs = {
-    "name": "dbt-starrocks",
-    "version": "0.1.0",
-    "description": "The starrocks adapter plugin for dbt",
-    "long_description": None,
-    "author": "long2ice",
-    "author_email": "long2ice@gmail.com",
-    "maintainer": None,
-    "maintainer_email": None,
-    "url": None,
-    "packages": packages,
-    "package_data": package_data,
-    "install_requires": install_requires,
-    "python_requires": ">=3.7,<4.0",
-}
+        'License :: OSI Approved :: Apache Software License',
 
+        'Operating System :: Microsoft :: Windows',
+        'Operating System :: MacOS :: MacOS X',
+        'Operating System :: POSIX :: Linux',
 
-setup(**setup_kwargs)
+        'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
+    ],
+    python_requires=">=3.7,<3.10",
+)


Test patch:
diff --git a/test/__init__.py b/test/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/test/starrocks.dbtspec b/test/starrocks.dbtspec
index d96c2bb..9120693 100644
--- a/test/starrocks.dbtspec
+++ b/test/starrocks.dbtspec
@@ -1,17 +1,33 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# See https://github.com/dbt-labs/dbt-adapter-tests
+# for installation and use
+
 target:
   type: starrocks
+  # Add CI credentials here, like:
   host: 127.0.0.1
   port: 9030
   username: root
-  schema: "dbt_{{ var('_dbt_random_suffix') }}"
-
+  password: ''
+  schema: dbt_test_{{ var('_dbt_random_suffix') }}
 sequences:
   test_dbt_empty: empty
   test_dbt_base: base
-  test_dbt_ephemeral: ephemeral
+  # test_dbt_ephemeral: ephemeral
   test_dbt_incremental: incremental
-  test_dbt_snapshot_strategy_timestamp: snapshot_strategy_timestamp
-  test_dbt_snapshot_strategy_check_cols: snapshot_strategy_check_cols
+  # test_dbt_snapshot_strategy_timestamp: snapshot_strategy_timestamp
+  # test_dbt_snapshot_strategy_check_cols: snapshot_strategy_check_cols
   test_dbt_data_test: data_test
   test_dbt_schema_test: schema_test
-  test_dbt_ephemeral_data_tests: data_test_ephemeral_models
+  # test_dbt_ephemeral_data_tests: data_test_ephemeral_models