Skip to content

Commit aa842fc

Browse files
committed
feat: support Apache Doris datasource
1 parent c15e693 commit aa842fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/apps/db/db_sql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def get_field_sql(ds: CoreDatasource, conf: DatasourceConf, table_name: str = No
115115
sql2 = f" AND C.TABLE_NAME = '{table_name}'" if table_name is not None and table_name != "" else ""
116116
return sql1 + sql2
117117
elif ds.type == "pg" or ds.type == "excel":
118-
sql1 = """
118+
sql1 = f"""
119119
SELECT a.attname AS COLUMN_NAME,
120120
pg_catalog.format_type(a.atttypid, a.atttypmod) AS DATA_TYPE,
121121
col_description(c.oid, a.attnum) AS COLUMN_COMMENT
@@ -124,7 +124,7 @@ def get_field_sql(ds: CoreDatasource, conf: DatasourceConf, table_name: str = No
124124
pg_catalog.pg_class c ON a.attrelid = c.oid
125125
JOIN
126126
pg_catalog.pg_namespace n ON n.oid = c.relnamespace
127-
WHERE n.nspname = current_schema()
127+
WHERE n.nspname = '{conf.dbSchema}'
128128
AND a.attnum > 0
129129
AND NOT a.attisdropped \
130130
"""

0 commit comments

Comments
 (0)