> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic target location

> Use a dynamic location for your target model

<Callout icon="/images/icon.png" color="#FFC107">
  Available for [Enterprise Edition](/data-engineering/administration/platform/editions) only.
</Callout>

By default, Prophecy writes your target model to the database and schema defined in the attached fabric. You can update the location of the target model in the **Location** tab of the gem dialog. This page includes an example of how you can make the write location of the table dynamic.

## Use case

Assume you want to use one database location during development and interactive execution, but you want to write to a different database for schedules running in production. You can use a configuration variable to do so.

### Create the variable

First, you will have to create the variable:

1. Open the project settings menu beside the project name and select **Configuration**.
2. Make sure you are in **Project Configuration**.
3. Create a variable and make the default value the name of the development database you want to use during interactive execution. The value should be a string.

### Overwrite the default model location

Next, you need to add the variable to your target model location.

1. Open a target model gem.
2. Click on the **Location** tab.
3. Enable the **Overwrite** toggle for the database.
4. Click on **Advanced Mode** on the right side of the database field.
5. From the dropdown that appears, select **Configuration Variable**.
6. Choose the configuration variable you created in the previous section.
7. **Save** your changes.

<img src="https://mintcdn.com/prophecy-62973bd0/d9a4F1BI2-0KzuSv/data-engineering/development/models/sources-target/img/location-overwrite.png?fit=max&auto=format&n=d9a4F1BI2-0KzuSv&q=85&s=5776aa4e2731ce2fca2696b8b4ca5ed0" alt="Location" width="2620" height="1508" data-path="data-engineering/development/models/sources-target/img/location-overwrite.png" />

### Assign the variable a value

Then, let's change the variable to save to a **production** database.

1. Create a job that includes your model.
2. Open the model configuration and add the **Supply variables to project** dbt property.
3. Add your project variable and assign it the name of the production database. This will override the default value provided when you configured the variable.

Now, when the job runs, your model should be stored in the production database.
