Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
a11d2069
Unverified
Commit
a11d2069
authored
Sep 10, 2020
by
Alagappan
Committed by
GitHub
Sep 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update connection string in Snowflake extractor to include wareh… (#357)
Signed-off-by:
Tao Feng
<
fengtao04@gmail.com
>
parent
585bd57d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
snowflake_sample_dag.py
example/dags/snowflake_sample_dag.py
+11
-1
sample_snowflake_data_loader.py
example/scripts/sample_snowflake_data_loader.py
+11
-2
No files found.
example/dags/snowflake_sample_dag.py
View file @
a11d2069
...
@@ -74,10 +74,20 @@ SNOWFLAKE_DATABASE_KEY = 'YOUR_SNOWFLAKE_DB_NAME'
...
@@ -74,10 +74,20 @@ SNOWFLAKE_DATABASE_KEY = 'YOUR_SNOWFLAKE_DB_NAME'
# todo: connection string needs to change
# todo: connection string needs to change
def
connection_string
():
def
connection_string
():
# Refer this doc: https://docs.snowflake.com/en/user-guide/sqlalchemy.html#connection-parameters
# for supported connection parameters and configurations
user
=
'username'
user
=
'username'
password
=
'password'
password
=
'password'
account
=
'YourSnowflakeAccountHere'
account
=
'YourSnowflakeAccountHere'
return
"snowflake://
%
s:
%
s@
%
s"
%
(
user
,
password
,
account
)
# specify a warehouse to connect to.
warehouse
=
'yourwarehouse'
return
'snowflake://{user}:{password}@{account}/{database}?warehouse={warehouse}'
.
format
(
user
=
user
,
password
=
password
,
account
=
account
,
database
=
SNOWFLAKE_DATABASE_KEY
,
warehouse
=
warehouse
,
)
def
create_snowflake_table_metadata_job
():
def
create_snowflake_table_metadata_job
():
...
...
example/scripts/sample_snowflake_data_loader.py
View file @
a11d2069
...
@@ -8,7 +8,6 @@ This is a example script which demo how to load data into neo4j without using Ai
...
@@ -8,7 +8,6 @@ This is a example script which demo how to load data into neo4j without using Ai
import
logging
import
logging
import
os
import
os
from
pyhocon
import
ConfigFactory
from
pyhocon
import
ConfigFactory
from
urllib.parse
import
unquote_plus
import
uuid
import
uuid
import
sys
import
sys
...
@@ -56,10 +55,20 @@ es = Elasticsearch([
...
@@ -56,10 +55,20 @@ es = Elasticsearch([
# todo: connection string needs to change
# todo: connection string needs to change
def
connection_string
():
def
connection_string
():
# Refer this doc: https://docs.snowflake.com/en/user-guide/sqlalchemy.html#connection-parameters
# for supported connection parameters and configurations
user
=
'username'
user
=
'username'
password
=
'password'
password
=
'password'
account
=
'YourSnowflakeAccountHere'
account
=
'YourSnowflakeAccountHere'
return
"snowflake://
%
s:
%
s@
%
s"
%
(
user
,
unquote_plus
(
password
),
account
)
# specify a warehouse to connect to.
warehouse
=
'yourwarehouse'
return
'snowflake://{user}:{password}@{account}/{database}?warehouse={warehouse}'
.
format
(
user
=
user
,
password
=
password
,
account
=
account
,
database
=
SNOWFLAKE_DATABASE_KEY
,
warehouse
=
warehouse
,
)
def
create_sample_snowflake_job
():
def
create_sample_snowflake_job
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment