Skip to content

Commit 2a1205d

Browse files
committed
feat: support Elasticsearch datasource #108
1 parent 4436263 commit 2a1205d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backend/apps/datasource/crud/datasource.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ def preview(session: SessionDep, current_user: CurrentUser, id: int, data: Table
293293
sql = f"""SELECT "{'", "'.join(fields)}" FROM "{conf.dbSchema}"."{data.table.table_name}"
294294
{where}
295295
LIMIT 100"""
296+
elif ds.type == "es":
297+
sql = f"""SELECT "{'", "'.join(fields)}" FROM "{data.table.table_name}"
298+
{where}
299+
LIMIT 100"""
296300
return exec_sql(ds, sql, True)
297301

298302

0 commit comments

Comments
 (0)