Hello. I'm considering switching from Snowplow to ...
# support
c
Hello. I'm considering switching from Snowplow to Rudderstack to send events from mobile app to Snowflake/Clickhouse. In Snowplow, I liked the principle of creating one common table for all events. Rudderstack breaks down event parameters into separate tables. This is not very convenient, since I must write unnecessary JOINs to analyze a set of events from different tables. Based on the previous discussion (https://rudderstack.slack.com/archives/C01E4PLB135/p1700548783902659) I found a solution by creating a transformation of all data into a common JSON and renaming all events into 1 common name. And also I may add a skipTracksTable parameter to avoid filling the standard tracks table. Is this the best solution to solve this problem at the moment?
Copy code
export function transformEvent(event, metadata) {
    if (event.type !== "track") {
        return event;
    }

    const propertiesJson = JSON.stringify(event.properties);
    
    const property = event.event;
    event.properties.event = property;

    event.properties = { "json_column": propertiesJson };

    event.event = "event_unified"
    return event;
}
I also looked at Jitsu, a service similar to Rudderstack. It offers a convenient solution for this out of the box (you can choose the type of tables structure (common table or split data). It would be great if Rudderstack added it too. Thank you.
This is a screenshot from Jitsu how they offer it
h
We have it in the roadmap to be able to write it under a single table which might be released by the end of this quarter It should provide the same functionality as to what the user transformation provides right now
👍 1
c
@helpful-island-54641 Sounds great, thanks. In what form do you plan to implement it? I would like to find a solution now that will require minimal work to transfer the data structure to new storage type when you release it. I saw 3 solutions to this: 1. Single JSON column for all custom event properties 2. Unique JSON event properties columns for each type of event corresponding to the event name 3. Structuring data into columns. It's give speed and safety. The downside is the intersection of event parameters for different events (there may be different types and there will be problems).
h
@careful-journalist-13265 do you mind getting on a call with me and the PM who handles warehouse product? We would love to take your inputs on how to go ahead about building it out
c
@helpful-island-54641 Sorry, I don't really like calls. Text communication would be more convenient. In my opinion, the most convenient solution would be to allow users to choose the type of columns. Provide all these 3 options (or more if I miss something) as an option and people will be able to choose the most suitable method for them based on their needs. Since all these options have their advantages and disadvantages depending on the needs of people (number of events, requirements for data verification in columns, analytic system requirements and etc.).
h
No worries Viktor… Will definitely consider these inputs while we implement a solution for that
@careful-journalist-13265 WDYT about dumping each event as a single row in raw json format? And that gives you the flexibility to run anything on top of that depending on the usecase
c
@helpful-island-54641 yes, if I must choose one option it will be most useful. Currently, I'm using Snowplow with Snowflake. They create separate JSON columns for each event, which I understand is done to match the schema version precisely. When updating the schema version (the structure of event parameters) to a new one, they will create a new column. This ensures the data always correctly matches the given structure. However, making queries in this setup becomes more challenging (as different column names need to be used in queries for different data), and the table being bulky. Rudderstack does not allow event schema validation (except for enterprise solutions), so this goal is less relevant there. Also, I read that querying more homogeneous JSON columns is faster, but we don't have so much data and it's not actual for us. But on the other hand, create regular column in general tracks table (3 option) may be necessary. At this time, Snowplow limited storage options. But you have Clickhouse integration, which we liked (good performance, much more affordable price than Snowflake/Redshift Serverless). But Clickhouse still does not support JSON columns (in beta and not recommended for production). I'm leaning towards using Clickhouse with your service. And if there is an option to use only the general json column, it will be impossible to use due to clickhouse restrictions. Rudderstack works good in type matching errors and recording discrepancies in a separate discard table. In case of problems, it will be easy to manually figure out and fix them later. And SELECT by regular columns will work quickly and efficiently. So I think it's better to do offer options 1 and 3. And user can choose the best option dependes on their requirements (or platform limitations).