https://prefect.io logo
Title
j

Josh Meekhof

01/19/2023, 6:57 PM
I’ve got a question related to Snowflake and creating a credentials block. I’m attempting to use a private key, and can’t seem to get anything to work. Question: What is the right format for specifying the private key? I’ve tried a multiline string in the format of:
------BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----
I’ve tried taking the content between the blocks and making a long one line string and removing the
\n
characters. Each time I get the same InvalidPemFormat error.
1
To answer my own question, multiline string is the way to go. Be careful of extra newlines. Good:
key = """-----BEGIN PRIVATE_KEY
.
."""
Bad:
key = """
-----BEGIN PRIVATE KEY
.
.""""
:party-parrot: 2