Hey Pallavi! dbt doesn’t do any sort of data extraction or loading – there are many other tools that excel at this task like Singer/Stitch, Fivetran, AWS DMS, etc. For loading data from Postgres into Redshift, I think a tool like Singer or AWS DMS might be your best bet.
So, rather than extraction and loading, dbt exists to transform data once it’s already loaded into your warehouse. Using dbt, you can select data from your source schemas, then transform that data in SQL, writing the resulting data out into a different “analytics” schema. You can find a little bit more about this workflow in the dbt documentation.
You mentioned:
can I create models where source and target are in dfferent database in redshift?
The answer is unfortunately “no” – Redshift doesn’t allow you to transfer data between different “logical” databases in a single warehouse. I’d recommend using schemas inside of a single “logical” database to separate your source data and your dbt models.
Hope this helps!