FDSA Resources

Create Test Data

Use these steps to load a small CSV file into the internal FDSA PostgreSQL database so you can test queries and workflows without using production data.


Create a data source and a dataset inside test database

It is necessary to define the data that you are going to insert and the schema that you are going to provide to make possible the creation of the data source/dataset.


1. Copy your CSV file into the database container.

docker cp <file_path> fdsa_db:/home/data.csv


2. Log in to the local database container "PGDATABASE and PGUSER can be read in the .env file".

docker exec -it fdsa_db bash

cd /home

psql -d <PGDATABASE> -U <PGUSER>


3. Create a database and schema for your test data.

create database <database_name>;

\c <database_name>

create schema <schema_name>;


4. Create a table that matches your CSV schema.

create table <schema_name>.<table_name>(
...
);


5. Load the CSV into the table.        

\copy <schema_name>.<table_name> from '/home/data.csv' WITH DELIMITER ',' csv;


6. Register the data source and dataset in FDSA
In the FDSA admin GUI, go to Connect Data and add a new data source and dataset pointing to the database and schema you just created.


Note: Keep test datasets small and non-sensitive. For production data, follow your organization’s governance and use the standard data onboarding process.