#1 2012-04-19 15:10:42

david_ubi
Member
Registered: 2012-03-30
Posts: 25

[resolved] clean datacontainer

Hello,
I would like clean data container for one entity.
In datacontainer view, i can search data from entity and physically delete a data selection, but juste for 10 items it takes time and it's not very useful.
There is not anyway to clean all in one time?

Regards

Offline

 

#2 2012-04-19 23:38:56

vgalopin
Talend team
Registered: 2009-04-15
Posts: 440
Website

Re: [resolved] clean datacontainer

Hi David,

There's a magic way :-)

You can create a Stored Procedure in your studio that takes care of that.

Just create a new SP in your studio and paste this code:

for $e in //p/%0
where $e/../../c = "%1"
return try{
xlib:delete-member(concat("/%1/%0/%1.%0.",$e/../../i))
}catch($err){
element error { $err }
},xlib:commit()

If you try to execute it, it will ask you for the two parameters I've included, %0 is the Entity Name and %1 is the Data Container name.


Vincent Galopin
US Pre-Sales Consultant
Talend US

Offline

 

#3 2012-04-20 14:17:19

david_ubi
Member
Registered: 2012-03-30
Posts: 25

Re: [resolved] clean datacontainer

Thank you Vgalopin.
I tried, it works.

Regards

Offline

 

Board footer

Powered by FluxBB