There are two core ways an end user of Alteryx can interact with a relational database.
What if I wanted to create a macro or a direct connection with the Python tool?
from snowflake.sqlalchemy import URL
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
username = 'LOGIN'
password = 'PASSWORD'
account = 'XXXXXX'
region = 'xxxxxx'
warehouse = 'meowmeow'
database = 'kittykat'
schema ='catnip'
'''
Create an engine
'''
engine = create_engine(URL(
account = account
, user = username
, password = password
, region = region
, warehouse = warehouse
, database = database
, schema = schema
)
)
with engine.connect() as connection:
connection.execute('call meowmeow.kittykat.STORPROCONE()')My question is can I use DCM to hide the creds and call them in the workflow for python. If so how?