Last active
July 11, 2022 19:25
-
-
Save afcotroneo/85399c2ac97f9861aceec71f53c27e9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Using a data source name: | |
COPY example_table | |
FROM 'SELECT * FROM remote_postgres_table WHERE event_timestamp > ''2020-01-01'';' | |
WITH | |
(source_type = 'odbc', | |
sql_order_by = 'event_timestamp', | |
data_source_name = 'postgres_db_1', | |
username = 'my_username', | |
password = 'my_password'); | |
## Using a connection string: | |
COPY example_table | |
FROM 'SELECT * FROM remote_postgres_table WHERE event_timestamp > ''2020-01-01'';' | |
WITH | |
(source_type = 'odbc', | |
sql_order_by = 'event_timestamp', | |
connection_string = 'Driver=PostgreSQL;Database=my_postgres_db;Servername=my_postgres.example.com;Port=1234', | |
credential_string = 'Username=my_username;Password=my_password'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment