How To Prepare User Manual For Api Service

Posted : admin On 26.01.2020
User manual pdf
  1. How To Prepare User Manual For Api Service Video
  2. Instruction Manual
  3. User Manual For Iphone

This topic describes how to get started with Snowpipe when calling the REST API, including instructions for installing the required client SDK, creating a stage (if needed) and pipe, and the one-time security setup for each Snowpipe user.

How To Prepare User Manual For Api Service Video

Apr 17, 2017  If you are conducting research on a product or service, you may reference a user manual or instructional guide in your paper. Whenever you reference a source in your work, cite it properly so your reader knows where you found your information. Preparing to Load Data Using the Snowpipe REST API. Client Requirement (Java or Python SDK) Step 1: Create a Stage (If Needed) Step 2: Create a Pipe; Step 3: Configure Security (Per User) Option 1: Loading Data Using the Snowpipe REST API; Option 2: Automating Snowpipe with AWS Lambda; Snowpipe REST API; Troubleshooting Snowpipe; Managing Snowpipe.

In this Topic:

Note

The instructions in this section assume you already have a target table in your Snowflake database where your data will be loaded.

Client Requirement (Java or Python SDK)¶

The Snowpipe service requires either the Java SDK or Python SDK. These SDKs are provided by Snowflake for your convenience.

Important

The binaries are provided as Client Software under the terms of your master service agreement (MSA) with Snowflake.

Installing the Java SDK¶

  1. Download the Java SDK installer from the Maven Central Repository:

    http://search.maven.org/ (or https://repo1.maven.org/maven2/net/snowflake/snowflake-ingest-sdk)

  2. Integrate the JAR file into an existing project.

Note

The developer notes are hosted with the source code on GitHub.

Installing the Python SDK¶

Note that the Python SDK requires Python 3.5 or higher.

To install the SDK, execute the following command:

Alternatively, download the wheel file from PyPI and integrate it into an existing project.

Note

The developer notes are hosted with the source code on GitHub.

Step 1: Create a Stage (If Needed)¶

Snowpipe supports loading from the following stage types:

  • Named internal (Snowflake) or external (Amazon S3, Google Cloud Storage, or Microsoft Azure) stages

  • Table stages

Create a named stage using the CREATE STAGE command, or you can choose to use an existing stage. You will stage your files temporarily before Snowpipe loads them into your target table.

Step 2: Create a Pipe¶

Create a new pipe in the system for defining the COPY INTO <table> statement used by Snowpipe to load data from an ingestion queue into tables. For information, see CREATE PIPE.

Note

Creating a pipe requires the CREATE PIPE access control privilege, as well as the USAGE privilege on the database, schema and stage.

For example, create a pipe in the mydb.myschema schema that loads all the data from files staged in the mystage stage into the mytable table:

Step 3: Configure Security (Per User)¶

For each user who will execute continuous data loads using Snowpipe, generate a public-private key pair for making calls to the Snowpipe REST endpoints. In addition, grant sufficient privileges on the objects forthe data load (i.e. the target database, schema, and table), the stage object, and the pipe.

How

If you plan to restrict Snowpipe data loads to a single user, you only need to configure key pair authentication for the user once. After that, you only need to grant access control privileges on the database objects used for each data load.

Note

To follow the general principle of least privilege, we recommend creating a separate user and role to use for ingesting files using a pipe. The user should be created with this role as its default role.

Using Key Pair Authentication¶

Snowflake supports using key pair authentication rather than the typical username/password authentication. This authentication method requires a 2048-bit (minimum) RSA key pair. Generate the PEM (Privacy Enhanced Mail) public-private key pair using OpenSSL. The public key is assigned to the Snowflake user who will use the Snowpipe service.

Samsung clx 3170 manual. To configure the public/private key pair:

  1. From the command line in a terminal window, generate a private key.

    You can generate either an encrypted version of the private key oran unencrypted version of the private key.

    To generate an unencrypted version, use the following command:

    To generate an encrypted version, use the following command:

    It is typically safer to generate an encrypted version.

    If you use the second command to encrypt the private key, thenOpenSSL prompts for a passphrase used to encrypt the private key file. Werecommend using a strong passphrase to protect the private key. Record thispassphrase in a secure location. You will input it when connecting toSnowflake. Note that the passphrase is only used for protecting the privatekey and will never be sent to Snowflake.

  2. From the command line, generate the public key by referencing the private key:

    Assuming the private key is encrypted and contained in the file named “rsa_key.p8”, use the following command:

  3. Copy the public and private key files to a local directory for storage. Record the path to the files. Note that the private key is stored using the PKCS#8 (Public Key Cryptography Standards) formatand is encrypted using the passphrase you specified in the previous step; however, the file should still be protected from unauthorized access using the file permission mechanism provided by youroperating system. It is your responsibility to secure the file when it is not being used.

  4. Dish 54.0 remote user manual. Assign the public key to the Snowflake user using ALTER USER. For example:

    Note

    • Only security administrators (i.e. users with the SECURITYADMIN role) or higher can alter a user.

    • Exclude the public key header and footer in the SQL statement.

    Verify the user’s public key fingerprint using DESCRIBE USER:

    Note

    The RSA_PUBLIC_KEY_2_FP property is described in Key Rotation (in this topic).

Key Rotation¶

Snowflake supports multiple active keys to allow for uninterrupted rotation. Rotate and replace your public and private keys based on the expiration schedule you follow internally.

Currently, you can use the RSA_PUBLIC_KEY and RSA_PUBLIC_KEY_2 parameters for ALTER USER to associate up to 2 public keys with a single user.

To rotate your keys:

  1. Complete the steps in Using Key Pair Authentication to:

    • Generate a new private and public key set.

    • Assign the public key to the user. Set the public key value to either RSA_PUBLIC_KEY or RSA_PUBLIC_KEY_2 (whichever key value is not currently in use). For example:

  2. Update the code to connect to Snowflake. Specify the new private key.

    Snowflake verifies the correct active public key for authentication based on the private key submitted with your connection information.

  3. Remove the old public key from the user profile. For example:

Granting Access Privileges¶

Using Snowpipe requires a role with the following permissions:

Object

Privilege

Notes

Named pipe

OWNERSHIP

Named stage

USAGE (external stages) , READ (internal stages)

Named file format

USAGE

Optional; only needed if the either the stage (see Step 1: Create a Stage (If Needed)) or the pipe (see Step 2: Create a Pipe) references a named file format.

Target database

USAGE

Target schema

USAGE

Target table

INSERT , SELECT

Use the GRANT <privileges> … TO ROLE command to grant these privileges to the role.

Instruction Manual

Note

Only security administrators (i.e. users with the SECURITYADMIN role) or higher, or another role with both the CREATE ROLE privilege on the account and the global MANAGE GRANTS privilege, can create roles and grant privileges.

For example, create a role named snowpipe1 that can access a set of mydb.myschema database objects as well as a pipe named mypipe. Grant the role to a user.

User Manual For Iphone

Next: Learn how to call the public REST endpoints to load data and retrieve load history reports, in Calling Snowpipe REST Endpoints to Load Data.