-
Notifications
You must be signed in to change notification settings - Fork 393
MVP of SingleStore documentation #7258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
forstisabella
merged 8 commits into
segmentio:develop
from
Unlocking-Growth:singlestore
Dec 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4eba0a9
MVP of SingleStore documentation
peterikladious dbc84d6
Based on requested changes from @tcgilbert
ugpeter 279ff85
Update src/connections/destinations/catalog/actions-singlestore/index.md
ugpeter a8dc65c
Update src/connections/destinations/catalog/actions-singlestore/index.md
ugpeter db2d2a6
Update src/connections/destinations/catalog/actions-singlestore/index.md
ugpeter 9cd68a6
Update src/connections/destinations/catalog/actions-singlestore/index.md
ugpeter 6ef53d3
Update src/connections/destinations/catalog/actions-singlestore/index.md
ugpeter e9cf042
Apply suggestions from code review
ugpeter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
src/connections/destinations/catalog/actions-singlestore/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
title: SingleStore (Actions) Destination | ||
--- | ||
|
||
{% include content/plan-grid.md name="actions" %} | ||
|
||
[<SingleStore>](https://singlestore.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank”} is a high-performance, cloud-native database designed for real-time analytics and applications. By integrating SingleStore with Segment, you can ingest, analyze, and act on your customer data instantly, unlocking faster insights for your business. | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* **Real-Time Analytics:** Handle streaming and transactional data simultaneously with ultra-low latency. | ||
* **Advanced Data Science:** Run complex data science and machine learning models directly within the database. | ||
* **Seamless Integration:** Consolidate data from Segment and other sources to enable responsive, real-time experiences. | ||
* **Scalability:** Effortlessly support complex queries and high-velocity data without compromising on speed or cost efficiency. | ||
|
||
This destination is maintained by SingleStore. For any issues with the destination, [contact SingleStore Support team](https://support.singlestore.com/). | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Getting started | ||
|
||
1. From your workspace's [Destination catalog page](https://app.segment.com/goto-my-workspace/destinations/catalog){:target="_blank”} search for "SingleStore". | ||
2. Select "SingleStore" and click **Add Destination**. | ||
3. Select an existing Source to connect to SingleStore (Actions). | ||
4. Enter the settings to connect to your SingleStore instance | ||
5. Click "Save" | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
6. Now go to your "Mappings" and click "New Mapping" | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
7. Select "Send Data" | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
8. Within "Map fields", select your database from the list presented | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
9. Click "Next" and then "Save" | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
10. Voila! Your data should start flowing into your SingleStore database within moments. | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
{% include components/actions-fields.html %} | ||
|
||
### Finding your SingleStore connection settings | ||
You can generally find your SingleStore connection settings by heading to the [SingleStore Portal](https://portal.singlestore.com) and following these steps: | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
1. Select "Deployments" | ||
2. Choose your Workspace and Database within the list of Deployments | ||
3. Click "Connect" dropdown | ||
4. Choose Connect to your own app and that will provide the key settings | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## The database structure | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Segment creates a table called `segment_raw_data` and writes data to your SingleStore database using the following schema. | ||
|
||
### Columns in the segment_raw_data table | ||
|Column| Type |Description| | ||
|-|-|-| | ||
|`message`| JSON (utf8_bin)| The entire message received from Segment in JSON format| | ||
|`timestamp`| datetime| The timestamp of when the event was generated| | ||
|`event`| VARCHAR(255)| The event name (for Track events)| | ||
|`messageId`| VARCHAR(255)| The unique identifier of the event to ensure there is no duplication| | ||
|`type`| VARCHAR(255)| The type of the event (e.g., identify, track, page, group)| | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
|
||
### Accessing Nested Data | ||
To query specific data from the Segment event within SingleStore, you can de-reference the JSON pointer within the message column. For example: | ||
``` | ||
SELECT message::properties FROM segment_raw_data; | ||
``` | ||
This query retrieves the properties object from the JSON message, allowing you to work with nested event data. | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Troubleshooting | ||
|
||
### Connection Errors | ||
**Issue:** Unable to connect to the SingleStore database. | ||
|
||
**Solution:** | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* Verify that the Host and Port are correct. | ||
* Ensure that your SingleStore database is accessible from Segment’s servers. | ||
* Check firewall settings and network configurations. | ||
|
||
### Authentication Failures | ||
**Issue:** Authentication errors when Segment attempts to connect. | ||
|
||
**Solution:** | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* Confirm that the Username and Password are correct. | ||
* Ensure that the user has the necessary permissions to write to the database. | ||
|
||
### Data Not Appearing in SingleStore | ||
**Issue:** Events are not being recorded in the segment_raw_data table. | ||
|
||
**Solution:** | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* Verify that your sources are correctly sending data to Segment. | ||
* Check the event types to ensure they are supported. | ||
* Review your SingleStore database logs for any errors. | ||
|
||
## Frequently Asked Questions | ||
### Can I customize the schema used in SingleStore? | ||
|
||
By default, the mapping is predefined to store the complete raw Segment events in the segment_raw_data table. If you prefer, within the mapping, you can choose to selectively include or exclude specific fields to be sent and written into SingleStore. | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### How does SingleStore handle data types from Segment? | ||
|
||
All event data is stored natively as JSON within the message column. This allows for flexible schema management and easy access to nested properties using SQL queries. SingleStore's ability to dynamically and quickly parse the JSON allows all types of complex events to be queried or used in notebooks. | ||
ugpeter marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### Is the data ingestion process real-time? | ||
|
||
Yes, Segment forwards data to SingleStore in real-time, enabling immediate analysis and action on your customer data. Generally data is available in the SingleStore database within a few seconds of Segment sending the event. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.