question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Jeanette F commented

Export a Global Table from FlexSim to BaseDate MySQL

Hello,

I am trying to export a Global Table “FlexSimtoCPLAB” from FlexSim to a MySQL Database. I have tested the connection with the database and I use HeidiSQL for managing this database. Previously, I imported data into this same database and it worked perfectly.


conectividad-flexsim.jpg


The DatabaseConnector tree appears as follows:

1728070648955.png

Where it can be seen that the exporters node does not have the subnodes that it should have. It can be seen that in the tableList node, two subnodes appear corresponding to the two tables I have in my database, but the names do not appear.

In the following image, I have observed in a model that I downloaded from this forum that the export node does expand and has subnodes and the tableList has name
1728070782574.png

When I want to make the export to DB, but it does not show this table created in the database, and therefore, I cannot map the columns.

export-from-flexsim-2.jpgexport-from-flexsim.jpg

What am I doing wrong? How is it done?

I had to configure the root user with the authentication plugin:

mysql_native_password.

because the "caching_sha2_password" was giving me an error.
The version of MySQL I am using is 8.0.26.

FlexSim 24.1.1
export datamysqlbase dadosbase date
· 4
5 |100000

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

Borja Lorenzo avatar image Borja Lorenzo commented ·

Hello @Matthew Gillespie,

Sorry to mention you directly, but I have reviewed your response to this question "Connection Failed with Error: libmySQL.dll - FlexSim Community" and it aligns very well with certain problems I am encountering with MySQL and FlexSim. Could you help me with the question I have posted? Thanks in advance.

0 Likes 0 ·
Borja Lorenzo avatar image Borja Lorenzo commented ·

I am adding an update to this question for anyone interested. According to the recent comment by Jordan Johson, it could be a bug. They will look into it

https://answers.flexsim.com/comments/171503/view.html

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Borja Lorenzo,

Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Borja Lorenzo avatar image Borja Lorenzo Jeanette F ♦♦ commented ·

Hello Janette, thanks for your comments.
I didn’t quite understand. Do I need to respond to one of my own comments? Has no one given me an answer about this yet? I have posted this question or commented on this same topic from different points in the forum without success. Below, I am pasting the same response that I am giving you from other published points.

The export function of the DataBase Connector is still not working. To perform the export, I had to do it through the code, using this part of the manual. However, I would like to know if I have a configuration problem or if it is a software bug.

Thanks in adance for your feedback.

0 Likes 0 ·
Jeanette F avatar image
1 Like"
Jeanette F answered Jeanette F commented

Hello @Borja Lorenzo,

The Development team has been notified of this.

The following is a workaround to be able to write the table name in the database connector. Since the UI will not allow you to select the table you can write the table name in the tree. The following is an example path to the node.

MODEL:/Tools/DatabaseConnectors/DatabaseConnector1>variables/exporters/1/tableName

1730907831881.png

I did not have the UI open when writing the table name. This will prevent the UI from overwriting what you wrote in the tree node. You can open the UI after you have added the table name.


1730907831881.png (97.9 KiB)
· 2
5 |100000

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

Borja Lorenzo avatar image Borja Lorenzo commented ·

Hello Jeanette,

Thank you for your input.

It works.

bdc-exp-1.png

In the TableFlexSim node, I wrote the name of my table. To map the columns, I also had to add the names of the columns ("name" and "valor") that I pointed out with a red arrow and that belong to the destination table (TableFlexSim)


I noticed that when adding the second column, the names of the nodes From FlexSim Column and To Database Field do not appear, this is right?

I understand that this is a manual solution that only allows interaction with one table and that the BaseDate Connector selector does not work well. For a second table, would I need to create another purple node like the one I circled in the image?
bdc-exp-2.png

Thank you in advance for your comments.

0 Likes 0 ·
bdc-exp-1.png (86.3 KiB)
bdc-exp-2.png (41.6 KiB)
Jeanette F avatar image Jeanette F ♦♦ Borja Lorenzo commented ·
Hello @Borja Lorenzo,

For the second collum names the nodes do not seem to be named but if you select the nodes you will see the values filled in that you have in the table in the UI.

If you need another table, in the UI select the green plus sign in the upper left and create another export. You will see another purple node created like the first.

1 Like 1 ·
Logan Gold avatar image
1 Like"
Logan Gold answered

Hey @Borja Lorenzo, I do see the issue on the dev list, so we'll just have to wait until a developer can look into it more. We'll try to update this post if we get any more information, but I don't know when that might be.

5 |100000

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