Dynamic DynamoDB Table Name


When setting up a DynamoDB query, you need to set the table name.

The table name is sometimes different when switching between environments (stag/production).

Fo example, the table in production can be, users-prod, the table in staging can be users-stg.

This is a problem that we have.

Is it possible to define a dynamic name of a table?

Hi @nitzanaz, It's not overly obvious, but there is an fx icon next to the Table input on the DynamoDB GUI. If you click that then you can use JS in the table input to programmatically determine which table the query should use. You could do this with a ternary inside {{ }} that determines the Table based on the value of retoolContext.environment (docs).

I hope that helps!