Skip to main content

Custom

If you don't see your data source listed in our supported integrations, you can still stream data into Shaped using our custom data source support. This feature allows you to write data directly into a Shaped dataset using the Shaped API or the Shaped CLI.

Setting up a Shaped Dataset to receive events

Before you can stream data into Shaped, you need to have provisioned a Shaped Dataset to receive the data. If you don't already have a Shaped Dataset, you can create one by calling the Create Dataset API endpoint, or with the Shaped CLI.

For example, let's create a dataset to stream custom events:

custom_dataset.yaml
name: my_custom_dataset
schema_type: CUSTOM
column_schema:
- event_name: String
- event_time: DateTime
- user_id: String
- event_weight: Float
- event_value: Int32
- event_tags: ArrayOfString

CLI

shaped create-dataset --file custom_dataset.yaml

Supported Data Types

Data TypeDescription
BytesA sequence of bytes.
StringA sequence of characters.
ArrayOfStringAn array of strings.
ArrayOfIntegerAn array of 64-bit integers.
Int32A 32-bit integer.
Int64A 64-bit integer.
FloatA single-precision floating point number.
DoubleA double-precision floating point number.
ArrayOfDoubleAn array of double-precision floating point numbers.
BoolA boolean value (true or false).
DateTimeA date and time value.
JsonA JSON object.

Sending data to a Shaped Dataset

CLI

For experimentation, you can use the Shaped CLI to insert data into a dataset. Supported formats for the CLI include JSONL, CSV, TSV and Parquet.

shaped dataset-insert --dataset-name my_custom_dataset --file my_data.jsonl

API

See the API documentation for more information on how to insert data into a dataset.

curl -X GET "https://api.shaped.ai/v1/datasets/my_custom_dataset/dataset_insert" \
-H "x-api-key: <API_KEY>" \
-d @my_data.jsonl