https://pinot.apache.org/ logo
#general
Title
# general
d

Diogo Baeder

10/26/2021, 3:23 AM
Hi folks! Let me ask a question about SQL queries in Pinot: is it possible to either truncate a table, or at least delete all of its rows? I'm asking this because I want to be able to do that for integration-testing my application. Thanks!
k

Kishore G

10/26/2021, 3:24 AM
Yes. You can delete all the segments using rest api call
m

Mayank

10/26/2021, 3:24 AM
Hi, yes, you can delete all segments from a Pinot table using rest-api (Swagger).
d

Diogo Baeder

10/26/2021, 3:25 AM
Ah, got it, thanks! I'll try that 🙂
👍 1
It worked just fine, thanks!
m

Mayank

10/26/2021, 3:31 AM
Cool, thanks for confirming.
d

Diogo Baeder

10/26/2021, 3:32 AM
How do I immediately create a new segment after that, though? If I delete all segments, I'm left with no segment where I can put my data as part of my tests...
k

Kishore G

10/26/2021, 3:47 AM
See base cluster integration test.. @ken had some ideas of creating a miniPinot cluster for test purpose
d

Diogo Baeder

10/26/2021, 3:50 AM
Where can I see that? Was that a discussion here in the channel?
k

Kishore G

10/26/2021, 3:55 AM
Yes but we use free slack and it has no history
d

Diogo Baeder

10/26/2021, 3:59 AM
Oh... that's why I couldn't find it then 😞
Anyway, it's already late here and I'll continue this tomorrow. Thanks a lot for the help, guys!