> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Streams

> Copy-paste examples of how to create streams with SQL

Several authentication schemes across multiple consumers are supported. For a
detailed overview of all of the consumer-specific options, see the
[SQL documentation](/content/sql/ddl/create-stream#sql-create-stream).

<a id="snippet-sql-create-stream-target" />

## Monitor Target

<CodeGroup>
  ```sql Data Sink theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```

  ```sql Kafka (No Auth) theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS
  (
  	DESTINATION = 'kafka://kafka-test:9092',
  	KAFKA_TOPIC_NAME = 'kafka-test'
  )
  ```

  ```sql Local Table theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS (DESTINATION = 'table://example.order_target')
  ```

  ```sql HTTP theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS (DESTINATION = 'http://localhost:8080')
  ```

  ```sql HTTPS theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS (DESTINATION = 'https://localhost:8088')
  ```
</CodeGroup>

## Refresh

<CodeGroup>
  ```sql On Change (default) theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```

  ```sql On Change (explicit) theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  REFRESH ON CHANGE
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```

  ```sql Scheduled theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  REFRESH EVERY 30 SECONDS
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```

  ```sql Scheduled w/ Start Time theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  REFRESH EVERY 1 MINUTE STARTING AT '2025-02-25 02:25:00'
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```
</CodeGroup>

<a id="snippet-sql-create-stream-kafka" />

## Event

<CodeGroup>
  ```sql Insert (default) theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```

  ```sql Insert (explicit) theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS
  (
  	DATASINK_NAME = 'kin_dsink',
  	EVENT = 'insert'
  )
  ```

  ```sql Update theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS
  (
  	DATASINK_NAME = 'kin_dsink',
  	EVENT = 'update'
  )
  ```

  ```sql Delete theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS
  (
  	DATASINK_NAME = 'kin_dsink',
  	EVENT = 'delete'
  )
  ```
</CodeGroup>

<a id="snippet-sql-create-stream-local" />

## Options

<CodeGroup>
  ```sql Filter theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WHERE cost > 10000
  WITH OPTIONS (DATASINK_NAME = 'kin_dsink')
  ```

  ```sql Increasing Column theme={null}
  CREATE STREAM kin_stream ON example.order_stream
  WITH OPTIONS
  (
  	DATASINK_NAME = 'kin_dsink',
  	INCREASING_COLUMN = 'order_id'
  )
  ```
</CodeGroup>
