text:
Q: DynamoDb: Delete all items having same Hash Key Consider the following table:
Table (documentId : Hash Key, userId: Range Key)

How can I write a code to delete all the items having the same documentId and preferably without retrieving the items.

A: Currently, You cannot delete all the items just by passing the Hash key, to delete an item it requires Hash + Range because that's what makes it unique.
You have to know both your (hash + range) to delete the item.

Edit: Here is the reference link from DynamoDB documentation http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html#API_DeleteItem_RequestSyntax
Please read the explanation of the "KEY" which clearly says that we must pass both Hash (Partition Key) and Range (Sort Key) to delete the item.

A: If you want to delete only by hash key, you need to query records first and then use batchDelete to delete all the records.
HashMap<String, AttributeValue> eav = new HashMap<String, AttributeValue>();
eav.put(":v1", new AttributeValue().withS(value));
DynamoDBQueryExpression<DocumentTable> queryExpression = new DynamoDBQueryExpression<DocumentTable>()
            .withKeyConditionExpression("documentId = :v1")
            .withExpressionAttributeValues(eav);
List<DocumentTable> ddbResults = dynamoDBMapper.query(DocumentTable.class, queryExpression);
dynamoDBMapper.batchDelete(ddbResults);

I would like to call out here that deleteItem deletes only one item at a time and both hash key and range key needs to be specified for this.

A: I have a similar requirement where I need to delete more than 10 million of rows from DynamoDB table. I was hoping that there would be a way to delete all the items based on a specific partition key but unfortunately there is no way (atleast I couldn't find).
It's painful to specify the specific values of hashkey and sortKey. The only option is to scan the table to retrieve primary key (or composite key) and then iterate over it to delete a single item using deleteItem API.
You can delete upto 25 items ( as large as 400KB) in a single call using BatchWriteItem API.
You can refer to this API from AWS for more information : https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

redpajama_set_name: RedPajamaStackExchange


text:
Michel Chassang, né en 1956 à Saint-Flour, est un médecin français.

Il est vice-président du Conseil économique, social et environnemental (CESE) et président de la Société de groupe d'Assurance mutuelle (SGAM) AG2R La Mondiale.

Président d'honneur de la Confédération des syndicats médicaux français (CSMF) et de l'Union nationale des professions libérales (UNAPL).

Biographie

Parcours professionnel

Après un doctorat de médecine en 1984 à la faculté de médecine de Toulouse, il s'installe comme médecin généraliste à Mauriac dans un cabinet de groupe, puis successivement à Aurillac et à Clermont-Ferrand.

Il est membre du Conseil économique, social et environnemental de 2015-2020 puis pour un deuxième mandat pour la période 2021-2026, au titre des professions libérales. Il est membre du groupe de l'Artisanat et des Professions libérales et siège au Bureau du CESE dans lequel il est vice-président chargé de la « subrogation et des partenariats institutionnels. »

Parcours syndical
 2016-2019 :  de l'Union des entreprises de proximité (U2P)
 2013-2019 : président de l'Union nationale des professions libérales (UNAPL)
 2002-2014 : président de la Confédération des syndicats médicaux français (CSMF)
 1993-2002 : président de l'Union nationale des omnipraticiens français (UNOF), la branche médecins de famille de la CSMF
 1991-1993 : vice-président de l'UNOF, représentant la région Auvergne
 1990-1993 : membre du comité directeur de l'UNOF
 1986-2002 : président du Syndicat des médecins du Cantal (CSMF)

Fonctions nominatives et électives
 2005-2014 : vice-président de l'Union nationale des professionnels de santé (UNPS)
 2005-2014 : président de la Commission paritaire nationale de la convention médicale (CPN)
 2004-2014 : membre du Haut Conseil pour l'avenir de l'Assurance maladie
 2002-2007 : vice-président du Centre national des professions de santé (CNPS)
 2007-2013 : président du Centre national des professions de santé (CNPS)
 2002-2014 et depuis 2017 : membre de la Commission des comptes de la Sécurité sociale
 2002-2014 : membre de la Commission des comptes de la santé
 1999-2002 : membre titulaire de la Commission nationale de la nomenclature des actes professionnels
 1996-2014 et depuis 2017 : membre de la Conférence nationale de santé
 1994-1997 : secrétaire général de l'Association de gestion conventionnelle médicale (A.GE.CO.MED.)
 2015-2021 : administrateur de LCL et président du Comité des Nominations

 Depuis 2017 : administrateur de La Mondiale AG2R
 Depuis 2020 : membre du Bureau de la Sommitale d'AG2R-La Mondiale
 Depuis 2020 : membre du Bureau de AG2R-Prévoyance
 Depuis 2020 : président de l'Association du Groupe Interprofessionnel des Représentants Employeurs d'AG2R-La Mondiale

 Depuis 2017 : administrateur du Conseil national du sida et des hépatites virales

Publications et contributions
 Qu'est-ce que la CSMF ?, Éditions L'Archipel,
 Contributions à la réforme de l'Assurance maladie
 Directeur de la publication du Médecin de France, journal de la CSMF, de 2002 à 2014
 Nombreux articles dans le domaine de la santé dans la presse générale et médicale, depuis 1993
Co-rapporteur de l'avis du CESE sur les Maladies chroniques en 2019

Décorations
  Il est fait officier par décret du .
  Il est fait chevalier par décret du .

Notes et références

Liens externes

Médecin généraliste français
Syndicaliste des professions de santé
Personnalité liée à une organisation patronale
Docteur en médecine de l'université Toulouse-III-Paul-Sabatier
Naissance en avril 1956
Naissance à Saint-Flour (Cantal)
Chevalier de la Légion d'honneur
Officier de l'ordre national du Mérite

redpajama_set_name: RedPajamaWikipedia


text:
More (Jeep) Adventure Than We Bargained For
Some trips go according to plan, while others are thrown together last-minute and nothing goes right. This is a story about the latter. Our friends, Katie and Saxxon, invited us to go camping with them down in Bountiful Canyon last weekend. After spending the previous two days packing and hauling everything we owned into our new apartment, this was just the break we needed. So we quickly rummaged though the boxes we had just packed up, grabbed our camping gear, and headed back down to the valley we just moved from. The plan was to meet up with our friends in Bountiful Canyon at one of two campsites. They weren't sure which one would be empty until they got up there, but then they'd be out of cell service. So we were going off a screen shot of a map with two locations pinned on it.
This was our first time driving through Bountiful. It's a quiet town just north of Salt Lake, filled with sprawling suburbia. At the eastern edge of the town, where the houses meet the mountainside, a paved road reaches its terminus and turns into dirt. Our wheels left the pavement, made some quick maneuvers to avoid the massive potholes, and then were head up Skyline Drive and into the canyon. Unlike the Cottonwoods and Millcreek, this canyon is almost exclusively trafficked by lifted, off-road vehicles that hammer up the dirt road with ease. We were not one of those people and decided to take a nice and easy pace up the winding road. Eventually, after 6 miles on the dirt, we reached the first dot on the map where we thought our friends would be. At first we didn't find them, so we headed down an even smaller dirt trail that shot off the road in hopes of finding our friends. We arrived at a field on a hill that was covered in tall grass and wildflowers, only to find an empty tent and their jeep parked in the field. "Well, we found their stuff, but where are they?" I thought to myself. Luckily we heard their voices coming from down the trail and confirmed this had to be the spot.
Our friends had met up with their other buddy, Eli, who had gotten up into the canyon earlier that day to do some 4-wheeling in his lifted Jeep Cherokee. And after a chicken dinner cooked in the dutch oven, we were all headed back to the campsite where we parked at. But Eli wasn't done wheeling yet. He took off past our campsite, further up the trail, and into the woods. Our friends brushed it off as a normal thing Eli would do, and we continued to set up our camp. But as the time passed, it became apparent that Eli had been gone for a while. So Saxxon headed up the trail after Eli to see if he could find him. And not long after, the two of them came down the trail. On foot. visibly frustrated, Eli yells down to us, "Want to see someone flip a Jeep!"
I couldn't believe it. He had gotten his Jeep stuck and it was only a tiny gust of wind away from completely rolling into a drainage ditch. Apparently, he had gone all the way up the trail, only to find it was too tight to turn around a full-sized Jeep Cherokee, which resulted in him trying to navigate back down the narrow trail in reverse. He wasn't sure, but he thought his rear wheel hit a boulder that bumped him sideways, off the trail. And once the tires left the trail, his tires had no traction on the steep grade of the drainage. Not to mention there were a few slick logs that were stuck in the ground that also provided little traction. To add to the mess, it was now around 8:30PM and the daylight was dwindling by the second. There was nothing more that could've been done that night, so Eli headed back down to the valley, with our friends Jeep, to retrieve some tools for the Jeep-rescue he'd have to do on the following day. He was fully aware of how much it would cost to get someone to tow him out (+$2K). And if he couldn't get it out on his own, he'd be forced to call someone to tow him. But that still wouldn't guarantee the Jeep won't flip into the drainage.
The following morning, after a the usual camp breakfast of eggs and hash browns, I headed back up the trail to join Saxxon and Eli by the Jeep. Luckily, the Jeep hadn't moved at all from the night before, and the passenger side was still stuck down in the ditch. With all the weight on the downhill tires on the passenger side, the uphill tires on the driver's side were the only ones spinning when he tried to drive it out of the ditch since the Jeep doesn't have a locking differential to prevent that. So the plan was to use the tools that Eli went back down to the valley for, in order to level out the Jeep so that more weight was dispersed onto the uphill tires. To work with, Eli went and got the following: Come-along winch, a shovel, tow straps, axes, and a whole lot of courage. Eli and Saxxon did most of the digging under the car to give the wheels better traction when we tried to pull the Jeep out. I was more on the "let's make sure the jeep doesn't roll down the ditch as we dig around the less-than-stable tires" duty. But by the end, it took every single one of us to get this thing to move.
We wrapped one strap of the come-along winch around a large aspen and the other strap around the front of the Jeep. Other straps were tied to the side frame of the jeep to prevent it from rolling down the hill. Attempt after attempt, Eli would climb into the sideways jeep as it would creek, rock, and roll ever more in the flipping direction into the ditch. Eli would give it everything the Jeep had, as Saxxon would crank on the winch to pull it out of the ditch. But for every inch forward, the back-end would slide further into the ditch. Constantly, we were switching where the winch would go and the straps would go in order to prevent it from sliding even further. But most attempts were futile, and little progress was made. Eventually, Eli and Saxxon had to get under the Jeep with a lifted Sky-jack in order to jack up the downhill side of the car to attempt to clear out more material and rocks that the tires were sliding on. Also, there was a giant log under the jeep that the tires had zero chance of gaining traction on as soon as it made contact. But the crew kept working. Digging away at the high side tires in order to lower them, all the while adding more material and supporting the downhill side. Crank after crank on the winch, the jeep inched further and further out of the ditch. We were getting stoked to see actual progress. But then it was moving forward towards a drop-off in the drainage ditch, not back onto the trail.
See, the downhill tires still weren't spinning or gaining traction when the did spin. Eli was primarily using the uphill tires which still didn't have much weight on them to gain sufficient traction. This resulted in the jeep not having enough control to move forward and uphill at the same time. And as the hours ticked away, the Jeep got closer and closer, but never looked like it was going to make it back up and onto the trail. Finally, in our last efforts. Eli was able to remove the massive log that was under the jeep and put the pedal down. I stood on the side, pulling a strap that was connected to the car to prevent it from rolling, and I could see that the front tire was just not gripping enough. So I ran over and stood on top the driver's side of the hood. Saxxon pulled the lever arm of the winch with everything he had. Tensions were high, both in the straps and in the air. And it made it! The Jeep pulled out of the ditch! It was such a moment of high stoke. All four tires turned over, gripped the dirt, and shot the Jeep out onto the trail. We all celebrated such a crazy, effort-filled morning. Easily, some of the hardest work we've ever had to put in after a morning of camping. And as we packed up all the equipment, we realized Eli still wasn't out of the woods just yet. Remember, he wasn't able to turn around the Jeep around, which is how he got into this mess. So he'd have to navigate the last 0.25 mile the narrow trail in reverse. And the trail was now even skinnier at the section he crashed in because we'd dug out so much of the hillside to make it level for the jeep. But with the help of all of us, he was able to swing the jeep down the narrow section, around the tight turns, over large boulders, and made it out to the clearing by our campsite. Whew!
That weekend went from a chill, car camping trip, to helping a friend not roll, crash, and total his prized jeep; as well as himself every time he got into said jeep. All in all, it was an adventure. And fortunately for me, it wasn't my jeep that we were trying to extract from the drainage ditch. But I learned so much from this experience. I now know how to level off a jeep and support the ground underneath by hammering in make-shift aspen tree stakes. How to properly winch out a truck that is stuck. And most of all, don't head up a trail that you aren't 100% certain you can make it to the end. But I really won't have to worry about that just yet, seeing as my little Scion wouldn't even have made it to the campsite in the first place.
FILED UNDER: AdventuresTAGGED WITH: Camping, Jeep, Mountains, Off Roading
Road Trip Guide to the Big Island of Hawaii
Rain | A Bike Touring Adventure [VIDEO]

redpajama_set_name: RedPajamaCommonCrawl


text:
Pants Party in Germany: Dusseldorf and Cologne
March 2, 2008 by Cat Gaa · 4 Comments
I was really itching to go travel, so I took the opportunity to use a four-day weekend to visit a friend in Germany. If you remember, I lived with a German girl named Eva for a few months before she went back home. I missed her terribly sometimes because she was always so excited about what was going on with me and she always fed me chocolate. She woke me up early one morning after the second term started and asked when I was coming to visit. I was convinced by the pleading in her voice to go online and book a ticket for the January puente, even though it was a bit pricey. I figured the hospitality and free tour guide were worth the extra cost.
I left sunny Sevilla on Thursday afternoon and headed to Düsseldorf, where Eva's family lives. Actually, I flew into Weeze because RyanAir likes to make up for its low fares by flying you about 3 years from your desired destination. When I got off the plane, I was immediately stung by a damp cold I haven't felt much here in Europe and a bit of drizzle. After the bus took us about 100 feet to the door, I walked past just three baggage carousels and out into the arrival area of the teeniest airport ever. Eva was standing just behind the ropes eager to hug me. I didn't think she was ever going to let go, but her mother Gaby, a dark-haired woman with a round face, wanted in on the action. We'd talked several times on the phone when she'd call Eva, but it was wonderful to meet her in person. I immediately understood why Eva missed her so much when she was here in Spain.
We drove about 45 minutes towards Düsseldorf to the suburb of Lank-Lanten. Eva's town has 9000 people but makes up a part of an eight-town cluster called Meerbusch. Her home is wonderful – open, friendly and inviting. Her mother put out all kinds of food on the table for me, from sandwiches to milkshakes to cheese to chocolate. She went to the grocery store especially for me! Eva and I stayed up talking for several hours about everything, as if we were just catching up from a day of work. I realized at that moment how much I had missed having her around to tell me about her adventures to Lidl allllll the way on C/Evangelista or how she spent three hours doing nothing in Maria Luisa. And I did most of the talking.
The next morning, we woke up early to travel to Koln. The drunken neighbor, Udo, with his scraggly red beard and penchant for saying inappropriate things at opportune times made for an interesting breakfast. Gaby had bought fresh bread and fruit for us to munch on for breakfast, and we headed out early. The bus never came (just like Sevilla!!), so Gaby drove us to the train station. We had major problems figuring out how to use the automated machines, but watching the small towns and fields go past on the way was delightful. Germany is kind of like Iowa, but with more woods and green pastures. Even with the gray skies, the whole place looked lush and was dotted with farm houses and farm equipment between towns. Most of the places along the route seemed very suburban – small shops and lots of living quarters. Much of this area was devastated by bombs during WWII, which is why the buildings all look so retro. But being in another place seems ot transport me places, and I don't even seem to notice the ugly things so much.
Koln was bustling. We got out of the huge underground station in the shadow of the Dom, a large mass of spires and flying buttresses not destroyed in the bombings. Since I've been in Europe for close to six months now, I'm beginning to think all the cathedrals and churches are all the same. However, I've developed quite the penchant for wanting to see a city from the highest point in town – to watch the river bend, the roads lead to the church spires, the colors of the roofs. I'm sick of the Seville cathedral and could do without going in it ever again, but I gladly jump on the opportunity to hike 35 ramps to the top of the Giralda tower and see my adoptive city from up top. We paid 2E to walk up some 400 stairs around a small spiral staircase of one of the towers, leading to monstrous bells and still more stairs. I looked at the graffiti in scores of languages, examining it more closely than the intricately decorated spires. The city, despite the heavy fog and dreary drizzle, was enchanting up there, with the barges moving back and forth down the river and the street vendors with furters and pretzels. Street food is quite a novel idea.
After grabbing some, we were off to explore the busy shopping district on our way to the Colgate museum. I was definitely contemplating buying a one meter beer, but it was 11am and I wasn't in Iowa, nor Spain.
At the chocolate museum, we ran around like kids through a Willy-Wonka inspired wonderland. We watched cocoa beans being split, molds being poured for hollow chocolate bunnies, truffles being coated in powder and got to indulge in plenty of samples. Though the price of 4,50E was probably a bit too much, watching Eva get really excited about a whole exhibit of chocolate was priceless. Despite living so close to this magnificent city, she hasn't been to the Dom or chocolate museum. Seems like a shame that she hasn't been taking advantage of everything. After walking through more of the city, Neumarkt and grabbing a berliner (like a jelly donut), we sat down at a restaurant to eat. I love trying new, authentic foods when I travel, but the name of the restaurant tipped me off to the fact that I wouldn't be eating traditional food. It was called Chicago steakhouse and had pictures of Michael Jordan and Jazz on the wall. Regardless, I ate some delicious chicken for once and had a baked potato with sour cream. Afterwards, we went to some lame-o Roman history museum.
On our way back into Meerbusch, we found two of Eva's friends from high school. It's shocking how many Germans peak English and many of them speak it really well. They all spent a year in HS abroad, which reminded me of that German dude who was a freaking stud at WWS when we were juniors. He could drink a beer in about three seconds flat. It made me feel bad and stupid and ignorant for only mastering English. We met Eva's friend Steffi for a beer before Gaby made us some wonderful pasta and we slept a little before the night out.
Eva's friend all came over to meet me and we opened a bottle of champagne and had a few beers before taking a bus and train into downtown Düsseldorf. It was windy and rainy and really disgusting, but we had a really fun time. Her friends are incredibly warm and funny, and it made for a really interesting night.
The next morning, sufficiently hungover, we were joined by Udo and another friend, Juda, who came with us to Dusseldorf. The weather was horrible – windy, stinging cold – and there was no one on the streets as we walked through the Ko (a ritzy shopping district) and passed a lot of churches, parliament buildings and overturned chairs and plants. Apparently a huge storm called Emma was supposed to ground planes and uproot trees, but it never came. Instead, we encountered fog and were nearly thrown off-balance from the gusts. The only thing we really visited was the huge tower, from which we could see the empty city. It was so dreary out that it was difficult to enjoy the city. We ate at another American style restaurant before heading back to say goodbye to Gaby and get me to the airport. I was really sad to say goodbye to her mom, who had made me food for the plane and sincerely thanked me for being a good friend to Eva when she was lonely and had no one. Juda, Julia and Eva drove me back to Weeze and stayed until Eva's car nearly got towed. I was ready to be back in sunshine and to not feel like an idiot for not knowing the language, but I had a kind of empty feeling for leaving Eva again.
When I got back to Sevilla, I could feel the warmth upon exiting the airplane and finally smell the azahar, the smell of the orange trees once the fruit falls. I fell in love with the city again after having some doubts about staying here.
Sanne and I took advantage of the sun and nearly 75 degree heat by heading down to Cadiz on Sunday. The beach was swamped with people, but seeing the city in the daytime not wasted and full of broken bottles nor windy and rainy was spectacular. It's a wonderful place. And having a picnic on the beach, getting really pink and enjoying the quiet trash of waves was the perfect way to end the weekend.
Filed Under: Germany, Travel ·
matthew d kyhnn says:
So, Wanna Talk Travel? | Sunshine and Siestas says:
[…] care of around the world. As most people know, European service is crap, but I will always remember my first trip to Germany. I stayed with my former roommate Eva´s family in Meerbusch, about halfway in between […]