Skip to content

Commit

Permalink
postgres create conn
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay committed Apr 24, 2024
1 parent b000fca commit 43e1fc6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/destinations/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/scratchdata/scratchdata/pkg/destinations/bigquery"
"github.com/scratchdata/scratchdata/pkg/destinations/clickhouse"
"github.com/scratchdata/scratchdata/pkg/destinations/duckdb"
"github.com/scratchdata/scratchdata/pkg/destinations/postgres"
"github.com/scratchdata/scratchdata/pkg/destinations/redshift"
)

Expand All @@ -27,4 +28,8 @@ var ViewConfig = map[string]struct {
Type: clickhouse.ClickhouseServer{},
Display: "Clickhouse",
},
"postgres": {
Type: postgres.PostgresServer{},
Display: "PostgreSQL",
},
}
2 changes: 1 addition & 1 deletion pkg/destinations/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

type PostgresServer struct {
Host string `mapstructure:"host" schema:"host" form:"label:Host,type:text"`
Port int `mapstructure:"port" schema:"port" form:"label:Port,type:number,default:5439"`
Port int `mapstructure:"port" schema:"port" form:"label:Port,type:number,default:5432"`
Database string `mapstructure:"database" schema:"database" form:"label:Database,type:text"`
Username string `mapstructure:"user" schema:"user" form:"label:User,type:text"`
Password string `mapstructure:"password" schema:"password" form:"label:Password,type:password"`
Expand Down
4 changes: 4 additions & 0 deletions pkg/view/templates/pages/connections/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<img src="/static/redshift.png" class="mx-auto h-10 text-gray-600 dark:text-gray-400">
<p class="font-light text-gray-500 mt-3.5 mb-4">Redshift</p>
</a>
<a href="/dashboard/connections/new/postgres" class="block py-12 px-8 text-center bg-gray-50 justify-center rounded dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700">
<img src="/static/postgres.png" class="mx-auto h-10 text-gray-600 dark:text-gray-400">
<p class="font-light text-gray-500 mt-3.5 mb-4">PostgreSQL</p>
</a>
{{/* <a href="/dashboard/connections/new/snowflake" class="block py-12 px-8 text-center bg-gray-50 justify-center rounded dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700">*/}}
{{/* <img src="/static/snowflake.png" class="mx-auto h-10 text-gray-600 dark:text-gray-400">*/}}
{{/* <p class="font-light text-gray-500 mt-3.5 mb-4">Snowflake</p>*/}}
Expand Down

0 comments on commit 43e1fc6

Please sign in to comment.