Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Extending SqlDatabase sink #98

Open
abmadmin1 opened this issue Jun 16, 2017 · 2 comments
Open

Extending SqlDatabase sink #98

abmadmin1 opened this issue Jun 16, 2017 · 2 comments

Comments

@abmadmin1
Copy link

I've been using SLAB for a few years now. I am just starting to implement the SqlDatabase sink. I am interested in extending the database table (defaults to Traces) it writes to. I browsed this site for answers and came across some users comments about passing custom fields. I'm familiar with extending the Payload but am interested in adding specific columns to the Traces table. I'm aware that this affects the stored proc that writes to the table and am glad to see that it is now possible to pass in a name of a stored proc to use. Is this as "simple" as using my custom proc to parse the payload for the fields I'm interested in to insert them into my custom columns? Thanks for any help in advance. I'm glad to see some interest and support in SLAB after MS stopped developing it.

@Expecho
Copy link
Contributor

Expecho commented Aug 28, 2017

I think what you want is going to be rather difficult. Extending the table itself of course is not the problem. But... the schema matches the design of the EventEntry class. The only way to extend that class is to use the payload. Maybe you could populate additional columns using a trigger to copy that data into the columns. But why would you? If you use my xml based sql sink you can create a view over the payload data.

@abmadmin1
Copy link
Author

abmadmin1 commented Aug 31, 2017

I didn't think of a trigger. Actually, I wrote my own proc to parse the Json Payload into my new columns. The other option I was thinking of was to write SQL CLR to parse the Json. I like the sound of your XML Payload better. I'll take a look. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants