question

Hao Zhou avatar image
0 Likes"
Hao Zhou asked Hao Zhou commented

Redshift Database Connection Issue

I was trying to use database connector to connect with Redshift database. In the "Database Type" drop down list, since there is no option for Redshift, I used "PostgreSQL". I tried "Test Connection", it shows succeed. But there are exceptions as follows. I tried a simple query, it seems work OK, but with the same errors. Is there a way of fixing it and make the connector work properly with Redshift? Thanks.

exception: Exception thrown in database table list update: ??? Unknown error(7) occurred

exception: Exception thrown in database table list update: ??? Unknown error(7) occurred

FlexSim 19.0.2
database connection
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Hao Zhou commented

We haven't done any testing of the new database features with an Amazon Redshift data warehouse.

The code for the DatabaseConnector is accessible in the tree. For example, MAIN:/project/library/DatabaseConnector>behaviour/cppfunctions/importAll()

That code uses the Database::Connection API (Database.Connection in FlexScript), which is defined in the FlexSim Engine.

If the trouble is in code executed by the DatabaseConnector, such as the queries in MAIN:/project/library/DatabaseConnector>behaviour/cppfunctions/updateInformationSchema(), then you can fix it at a content or module level.

You could also try using the Database.Connection API directly in FlexScript instead of using the Database Connector's import and export features.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Hao Zhou avatar image Hao Zhou commented ·

Hi Phil, thanks for the reply. I did try to call database connection's APIs in module level. It seems that with the setting "PostgreSQL" I am able to send simple SQL queries and retrieve data without any exceptions. I will do more test in the future.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.