Code Monkey home page Code Monkey logo

wrenai's Introduction

CannerCMS has pivoted to CannerData - The Data Access Layer for Analytics Data Applications.

Canner now provides solution designs for data teams so that data owners, stewards, and consumers can easily collaborate in one interface. It is an ease-of-use, scalable, secure platform for querying and analyzing information across multiple databases, file systems, and other storage formats. Unlike current solutions that data is often manually integrated and transferred across different tools and sources, resulting in time-consuming and error-prone processes.

wrenai's People

Contributors

andreashimin avatar chilijung avatar cyyeh avatar fredalai avatar goldmedal avatar imastersun avatar kpman avatar onlyjackfrost avatar paopa avatar wwwy3y3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wrenai's Issues

Show internal server error message

Currently when a internal server error occurs, we only show 'internal server error'.
In this use case, this error occurs because wifi is down:
SCR-20240429-mmgv

Should show error message(e.g. network error, unable to connect to network....) to let users know what is wrong.

failed to deploy model if I apply the auto-generated table relationships

Describe the bug
I used the instructions here to dump pagila database to my local postgresql db. If I skip the relationship connection step, the model is deployed successfully; however, the model is failed to deploy if I apply the auto-generated table relationships

error message:

{
    "errors": [
        {
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": [
                "saveRelations"
            ],
            "message": "insert into `relation` (`from_column_id`, `join_type`, `name`, `project_id`, `to_column_id`) select 184 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.addressPublic.city' as `name`, 4 as `project_id`, 191 as `to_column_id` union all select 193 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.cityPublic.country' as `name`, 4 as `project_id`, 195 as `to_column_id` union all select 203 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.customerPublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` union all select 199 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.customerPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 221 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.filmPublic.language' as `name`, 4 as `project_id`, 249 as `to_column_id` union all select 222 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.filmPublic.language' as `name`, 4 as `project_id`, 249 as `to_column_id` union all select 231 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_actorPublic.actor' as `name`, 4 as `project_id`, 172 as `to_column_id` union all select 232 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_actorPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 235 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_categoryPublic.category' as `name`, 4 as `project_id`, 188 as `to_column_id` union all select 234 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_categoryPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 246 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.inventoryPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 247 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.inventoryPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 267 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 269 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 268 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 273 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 275 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 274 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 279 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 281 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 280 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 285 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 287 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 286 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 291 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 293 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 292 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 297 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 299 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 298 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 311 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 310 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.inventory' as `name`, 4 as `project_id`, 245 as `to_column_id` union all select 313 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 323 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.staffPublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` union all select 325 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.staffPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 341 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.storePublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` returning * - UNIQUE constraint failed: relation.name",
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR",
                "message": "insert into `relation` (`from_column_id`, `join_type`, `name`, `project_id`, `to_column_id`) select 184 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.addressPublic.city' as `name`, 4 as `project_id`, 191 as `to_column_id` union all select 193 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.cityPublic.country' as `name`, 4 as `project_id`, 195 as `to_column_id` union all select 203 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.customerPublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` union all select 199 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.customerPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 221 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.filmPublic.language' as `name`, 4 as `project_id`, 249 as `to_column_id` union all select 222 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.filmPublic.language' as `name`, 4 as `project_id`, 249 as `to_column_id` union all select 231 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_actorPublic.actor' as `name`, 4 as `project_id`, 172 as `to_column_id` union all select 232 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_actorPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 235 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_categoryPublic.category' as `name`, 4 as `project_id`, 188 as `to_column_id` union all select 234 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_categoryPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 246 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.inventoryPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 247 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.inventoryPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 267 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 269 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 268 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 273 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 275 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 274 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 279 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 281 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 280 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 285 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 287 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 286 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 291 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 293 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 292 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 297 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 299 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 298 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 311 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 310 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.inventory' as `name`, 4 as `project_id`, 245 as `to_column_id` union all select 313 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 323 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.staffPublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` union all select 325 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.staffPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 341 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.storePublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` returning * - UNIQUE constraint failed: relation.name",
                "shortMessage": "Internal server error",
                "stacktrace": [
                    "SqliteError: insert into `relation` (`from_column_id`, `join_type`, `name`, `project_id`, `to_column_id`) select 184 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.addressPublic.city' as `name`, 4 as `project_id`, 191 as `to_column_id` union all select 193 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.cityPublic.country' as `name`, 4 as `project_id`, 195 as `to_column_id` union all select 203 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.customerPublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` union all select 199 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.customerPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 221 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.filmPublic.language' as `name`, 4 as `project_id`, 249 as `to_column_id` union all select 222 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.filmPublic.language' as `name`, 4 as `project_id`, 249 as `to_column_id` union all select 231 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_actorPublic.actor' as `name`, 4 as `project_id`, 172 as `to_column_id` union all select 232 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_actorPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 235 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_categoryPublic.category' as `name`, 4 as `project_id`, 188 as `to_column_id` union all select 234 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.film_categoryPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 246 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.inventoryPublic.film' as `name`, 4 as `project_id`, 217 as `to_column_id` union all select 247 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.inventoryPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 267 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 269 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 268 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_01Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 273 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 275 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 274 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_02Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 279 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 281 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 280 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_03Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 285 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 287 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 286 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_04Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 291 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 293 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 292 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_05Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 297 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 299 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.rental' as `name`, 4 as `project_id`, 308 as `to_column_id` union all select 298 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.payment_p2022_06Public.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 311 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.customer' as `name`, 4 as `project_id`, 198 as `to_column_id` union all select 310 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.inventory' as `name`, 4 as `project_id`, 245 as `to_column_id` union all select 313 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.rentalPublic.staff' as `name`, 4 as `project_id`, 320 as `to_column_id` union all select 323 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.staffPublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` union all select 325 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.staffPublic.store' as `name`, 4 as `project_id`, 339 as `to_column_id` union all select 341 as `from_column_id`, 'ONE_TO_MANY' as `join_type`, 'Public.storePublic.address' as `name`, 4 as `project_id`, 180 as `to_column_id` returning * - UNIQUE constraint failed: relation.name",
                    "    at Client_BetterSQLite3._query (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/dialects/better-sqlite3/index.js:39:40)",
                    "    at executeQuery (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)",
                    "    at Client_BetterSQLite3.query (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/client.js:154:12)",
                    "    at Runner.query (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/execution/runner.js:141:36)",
                    "    at ensureConnectionCallback (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)",
                    "    at Runner.ensureConnection (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/execution/runner.js:318:20)",
                    "    at runMicrotasks (<anonymous>)",
                    "    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
                    "    at async Runner.run (/Users/cyyeh/Desktop/canner/repos/WrenAI/wren-ui/node_modules/knex/lib/execution/runner.js:30:19)",
                    "    at async RelationRepository.createMany (webpack-internal:///(api)/./src/apollo/server/repositories/baseRepository.ts:87:24)",
                    "    at async ModelService.saveRelations (webpack-internal:///(api)/./src/apollo/server/services/modelService.ts:200:32)",
                    "    at async ProjectResolver.saveRelations (webpack-internal:///(api)/./src/apollo/server/resolvers/projectResolver.ts:229:32)"
                ]
            }
        }
    ],
    "data": null
}

Expected behavior
I can successfully deploy the model if I apply the auto-generated table relationships

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Brave

WrenAI Information

  • Version: 0.2.1

we can't successfully deploy the model with 200+ PostgreSQL tables

Describe the bug
we can't successfully deploy the model with 200+ PostgreSQL tables. the ui will show apollo error and I am not clear what's the problem. I've tested the same connection using just a few tables is ok.

To Reproduce

PostgreSQL connection information, and choose all tables.

  • Hostname: hh-pgsql-public.ebi.ac.uk
  • Port: 5432
  • Database: pfmegrnargs
  • User: reader
  • Password: NWDMCE5xdipIjRrp

Expected behavior
we should enable users to deploy the model with 200+ PostgreSQL tables

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Brave

WrenAI Information

  • Version: 0.2.1

Feature: Support Trino as data source

Feature Background
A great addition for WrenAI would be to integrate Trino as a supported data source.
Trino is a very common query engine for running distributed analytical queries over various data sources.
This integration would enable users to leverage Trino's capabilities for distributed SQL queries, enhancing the flexibility and scalability of data querying within WrenAI.
Additionally because Trino support many data sources as a federated query engine, it will allow to extend the coverage of supported data stores of this project by pri

we can’t connect to PostgreSQL database with ssl

Describe the bug
we can’t connect to PostgreSQL database with ssl. and it seems that we haven't handle this condition. related code location:
wren-ui/src/apollo/server/connectors/postgresConnector.ts at 207th line

To Reproduce

please contact Jimmy to get the password

import pg from 'pg';
const { Client } = pg;
 
const client = new Client({
  user: 'test_owner',
  host: 'ep-blue-leaf-a1xwqzaf.ap-southeast-1.aws.neon.tech',
  database: 'pagila',
  password: 'xxxxx',
  port: 5432,
  // ssl: true, // comment out this, and we can connect to the db
});
 
await client.connect();
 
console.log(await client.query('SELECT NOW()'));
 
await client.end();

Expected behavior
We should enable users to connect to PostgresSQL database with ssl. It can also help us do demos using Neon!

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Brave

WrenAI Information

  • Version: 0.2.1

Additional context

Refine ask pipeline - version 1

  • refine ask pipeline based on diversity, cost and latency
  • can filter out logically duplicate results to prevent confusion
  • executable sql queries
  • fix llm treating relationship as column
  • improve follow-up performance by designing another prompt
  • improve wren-engine sql execution efficiency and reduce cost

Enable Release Workflow Commits on Protected Main Branch

Following issue #59, we've run into a problem where commits cannot be pushed to the main branch due to the enabled branch protection, preventing any direct pushes to main. A potential solution could involve creating a GitHub app specifically for the release workflow to update the version in pyproject.toml. This app would have permissions to bypass the branch protection, allowing commits to be pushed as part of the release process.

Refine evaluation process

In the current evaluation process, there are some issues for further refinement

  • reproducibility: there is no dvc.lock related file to make sure the pipelines are reproducible in evaluation.(we can directly reference this to spider-benchmark repo; however, if it's not that important as of now, we can skip this right now.)
  • evaluation report:
    • adding cost/latency
    • adding pipeline metadata so that we can easily understand what parameters cause the differences among different reports

ask_details pipeline evaluation process

We need to come up with some rules to evaluate the ask_details pipeline. Something we can think about:

  1. What is a good ask_details pipeline from user's perspective?
    • Summery text in each step is easily understandable?
    • SQL query in each step is executable?
    • SQL query should semantically correspond to respective summary text?
  2. Is there any public benchmark we can reference with?

related issue: #4

Failed to ask a question, if import a sample dataset before start the AI service

Describe the bug
If a sample dataset is imported before the AI service has finished starting up, the AI service may respond with an error when asked a question.

To Reproduce
Steps to reproduce the behavior:

  1. install from wren-launcher-darwin binary v0.2.0
  2. selecting a sample dataset as soon as the WrenAI UI opens. (usually AI service has not finished starting up)
  3. ask question from WrenAI UI
  4. See error "Failed to create asking task"

Screenshots
wrenai_ui_log
wrenai_ai_log
wrenai_browser

Desktop (please complete the following information):

  • OS: MacOS 14.4.1
  • Docker: v4.29.0
  • Browser: Chrome

WrenAI Information

  • Version: 0.2.0

Automatically re-run the CI after pushing the new commits to PR

Currently, we trigger the CI in PR via labeling the tag ci/ai-service. however, we need to unlabel and re-label it to trigger the CI again if we push any new commits. so, I think when pushing commits and checking the label exists, it will be triggered automatically. It will be awesome. 👍

Support Mistral Provider

We're going to support Mistral. More details about the implementation will be updated soon. 😝

Feature: support MS SQL Server connector

As many enterprises utilize Microsoft SQL Server for critical data storage and business operations, the integration of an MS SQL Server connector would be immensely beneficial. This feature would enable an additional critical provider.
I believe adding MS SQL Server support will be a strategic enhancement that will broaden WrenAI's usage and provide significant value to the user community.

errors when running `yarn build`

Description

Following errors thrown when I try to run yarn build

Frontend issues

wren-ui/src/pages/component.tsx

Type '{ joinType: JOIN_TYPE.ONE_TO_ONE; fromField: { model: string; field: string; }; toField: { model: string; field: string; }; name: string; properties: { description: string; }; }' is not assignable to type 'RelationFieldValue'.
  Property 'type' is missing in type '{ joinType: JOIN_TYPE.ONE_TO_ONE; fromField: { model: string; field: string; }; toField: { model: string; field: string; }; name: string; properties: { description: string; }; }' but required in type 'Pick<RelationsDataType, "type" | "name" | "fromField" | "toField" | "properties">'.ts(2322)
Screenshot 2024-03-21 at 1 48 04 AM

also error at MetadataDrawer of metrics

Object literal may only specify known properties, and 'name' does not exist in type 'Metadata'.ts(2353)
Screenshot 2024-03-21 at 1 49 44 AM

wren-ui/src/components/tableFormControls/*.tsx all -Controls component

Module '"@/components/table/CalculatedFieldTable"' has no exported member 'getCalculatedFieldTableColumns'.
Screenshot 2024-03-21 at 1 53 26 AM

Backend issues

wren-ui/src/apollo/server/mdl/mdlBuilder.ts

'Relation' is declared but its value is never read.ts(6133)
Screenshot 2024-03-21 at 1 55 05 AM

src/apollo/server/resolvers/projectResolver.ts

./src/apollo/server/resolvers/projectResolver.ts:114:8
Type error: This expression is not callable.
  Each member of the union type '{ <S extends CompactTable>(predicate: (value: CompactTable, index: number, array: CompactTable[]) => value is S, thisArg?: any): S[]; (predicate: (value: CompactTable, index: number, array: CompactTable[]) => unknown, thisArg?: any): CompactTable[]; } | { ...; }' has signatures, but none of those signatures are compatible with each other.

  112 |     const id = project.id;
  113 |     const tableDescriptions = dataSourceColumns
> 114 |       .filter((col: BQColumnResponse) => col.table_description)
      |        ^
  115 |       .reduce((acc, column: BQColumnResponse) => {
  116 |         acc[column.table_name] = column.table_description;
  117 |         return acc;
Screenshot 2024-03-21 at 1 56 13 AM

Creating a workflow for Image build and deployment

hey there! I believe it's essential to establish a workflow for building images that can be deployed anywhere. Detailed information will be added to this issue later. For now, let's create this as a reminder to tackle it soon. 😸

OpenAI key invalid AI service keep crashing

Describe the bug
As title

To Reproduce
Steps to reproduce the behavior:

  1. type in an invalid AI token or OpenAI read-only API token
  2. The AI service will keep crashing.

Expected behavior
Invalid token should not keep AI service crashing.

Screenshots
If applicable, add screenshots to help explain your problem.

image

WrenAI Information

  • Version: v0.3.0-rc1

Test semantics descriptions and refine it if necessary

We need to test whether semantics descriptions(/v1/semantics-descriptions/) would improve the accuracy of the ask pipeline(text-to-sql). If not, we need to improve the semantics descriptions api. Text-to-SQL benchmark chart also needs this.

DuckDB dataset column names contain unconventional symbols make text-to-sql fail

Describe the bug
since now we support reading csv, json, parquet files using DuckDB; however, there are no strict rules on column names used in the dataset and this can cause us troubles generating valid SQL.

for example

  • column names that start with number, ex: 3pointplay
  • column names that contain dot(.)

To Reproduce
Steps to reproduce the behavior:

you can use the following DuckDB’s initSQL statements to import the dataset. the following dataset contains column names having dot(.)

CREATE TABLE earthquakes AS SELECT * FROM read_csv('https://corgis-edu.github.io/corgis/datasets/csv/earthquakes/earthquakes.csv', header=True)

Expected behavior
we should define a rule for column names, and rewrite the original column names if they break our defined rule

Desktop (please complete the following information):

  • OS: MaxOS
  • Browser: Brave

WrenAI Information

  • Version: 0.2.1

Additional context
BigQuery column name rules: https://cloud.google.com/bigquery/docs/schemas#column_names

Unable to select relationship when connecting PostgreSQL data source

Describe the bug
When connecting to a PostgreSQL data source and attempting to convert database tables into models. However, I'm unable to select the related models.

To Reproduce
Steps to reproduce the behavior:

  1. Go to connect PostgreSQL
  2. Select all tables
  3. Click Add button to add a new relationship
  4. Cannot select models

Expected behavior
When setting up relationships, I should be able to select the related models to establish the correct associations.

Screenshots

  • When adding new relationship

image

  • When editing recommended relationship

image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Edge

WrenAI Information

  • Version: 0.2.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.