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.

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.

  1. 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.