Skip to main content
All CollectionsCreating a Model
Replacing mock data with real data (if you used mock data)
Replacing mock data with real data (if you used mock data)

Learn to replace mock data with actual data with ease while keeping the notebook structure intact for a great predictive model in minutes

Ori Sagi avatar
Written by Ori Sagi
Updated over 10 months ago

If you didn't share your data with the predictive chat while creating your predictive notebook, it will be generated with mock data. If you'd like to train a model using this notebook, you'll have to map it to use your actual data, while ensuring the structure (schema) and names of the table columns remain the same (using aliases).
​
To do so, run the mock data queries to view their schema and change the name of the source table in the SQL to use your table. Then, add your column names and use aliases to keep the same names as in the mock data schema.
​
For example, let's say that this is the query for the mock data query:

SELECT
customer_id,
purchase_date
FROM
`mock_purchases_table`

You'll need to adjust it like so:

SELECT
[your id column] as customer_id,
[your date column] as purchase_date
FROM
[your table name]

Tip πŸ’‘

We like keeping the original mock data query cell and renaming it (e.g., from users_table to mock_users_table), just to use as a reference in the future.

Since later cells use the results of cells above them, we need to ensure the updated cell has the name that appears in the latter queries.

To do that, follow these steps:

  1. Create a new SQL cell below the existing one

  2. Rename the existing mock data cell by adding the word mock_ before its name

  3. Copy the original name and paste it in the new cell's name box

  4. Copy and paste the SQL from the original cell to the new one

  5. Map the data in your new cell:
    ​

After mapping your data, make sure to run each query cell and see that it works and the results align with your expectations, based on your familiarity with the data.

Use our GenAI button to boost the process πŸš€

Click the button in the top left corner of any SQL cell to get detailed explanations about the generated query, what it does - and how to change it to use your data:

Did this answer your question?