Избори 2024 – известни са секциите зад граница

Post Syndicated from Боян Юруков original https://yurukov.net/blog/2024/izbori24-sekcii/

Излезе списъкът със секции в чужбина за смесените избори на 9-ти юни. Този път ще има 769 секции на 670 места по света. Това е значителното увеличение от последните два вота, но доста по-малко от изборите през 2021-ва.

Увеличението спрямо предходната година е със 37 места за секции, 36 от които са допълнителни в Германия. На повечето места разликите са минимални. В Гърция ще има със 7 секции в повече. В Турция местата са същите като брой, но ще има 4 секции повече. В Италия и Белгия също ще са повече.

Ако секциите са на същите места както миналата година, което е доста вероятно, то вече имам адресите на 97.8% от тях. Очаквам до 10% да има промяна. Трябва обаче да ги потвърдя с официалният списък на ЦИК когато излезе преди да публикувам картата на Glasuvam.org

Секциите в Европа на изборите през 2023-та
Секциите в Европа на изборите през 2023-та

Междувременно може да се абонирате за новини за изборите зад граница и когато местата на секциите станат окончателно ясни, ще ви изпратя индивидуален списък с трите най-близки секции до вас и най-важното, което следва да знаете.

Същото може да направите, ако пътувате на почивка в началото на юни в Гърция или друга европейска държава, и искате все пак да упражните гласа си. Запишете се с града, където ще бъдете на 9-ти юни и ще получите адреса на близката секция. Дори обичайното ви пребиваване да е в България, може да гласувате в която и да е секция зад граница само с лична карта и без предварително заявление.

The post Избори 2024 – известни са секциите зад граница first appeared on Блогът на Юруков.

Ако лекарството за СПИН,

Post Syndicated from Тоест original https://www.toest.bg/ako-lekarstvoto-za-spin/

Ако лекарството за СПИН,

Ако лекарството за СПИН,

Линда Грегърсън
Превод от английски Надежда Радулова


Линда Грегърсън е американска поетеса, почетен професор по ренесансова литература на Мичиганския университет, председателка на Академията на американските поети. Книгата ѝ Magnetic North („Магнитен север“) от 2007 г. е финалист за National Book Award. Множеството отличия на Линда Грегърсън включват награди на Американската академия за изкуство и литература, Американското поетическо общество, Асоциацията за модерна поезия, Фондация „Гугенхайм“, Института за академични изследвания, Националния център за хуманитарни науки, Националния фонд за изкуствата, Фондация „Рокфелер“ и Фондация „Мелън“. На български е издадена книгата ѝ с избрани стихотворения „Машини за дишане“ в превод на Надежда Радулова (Издателство за поезия ДА, 2108). През юни Линда Грегърсън ще участва в Международна поетическа конференция в Копривщица, организирана от Фондация „Елизабет Костова“. На 13 юни авторката ще има поетическо четене и в София.

Надежда Радулова пише, превежда поезия и проза от английски език, редактира, преподава. Авторка е на шест стихосбирки, сред които наградените „Алби“ (2000), „Когато заспят“ (2015), „Малкият свят, големият свят“ (2020), както и на романа „Тук живее Йожи“ (2023). Радулова е превеждала прозата на Дж. М. Кутси, Филип Рот, Р. Карвър, Джийн Рис, Силвия Плат, Пати Смит и др., както и поезията на Линда Франс, Линда Грегърсън и Луиз Глик. Отговорна редакторка в „Тоест“ от януари 2023 г.


Според Екатерина Йосифова „четящият стихотворение сутрин… добре понася другите часове“ от деня. Убедени, че поезията държи умовете ни будни, а сърцата – отворени, в края на всеки месец ви предлагаме по едно стихотворение. Защото и в най-смутни времена доброто стихотворение е добра новина.

Научни новини: Хипоалергенни котки, чревен микробиом, хитри видри и ванилия за разкош

Post Syndicated from Михаил Ангелов original https://www.toest.bg/nauchni-novini-hipoalergenni-kotki/

Хипоалергенни котки

Научни новини: Хипоалергенни котки, чревен микробиом, хитри видри и ванилия за разкош

Основна задача на имунната ни система е да ни предпазва от неприятели. Но понякога тя действа прекалено агресивно и се активира при попадането на дори безвредни за нас частици и субстанции в организма ни. Тези алергични реакции се изразяват с различни по сила и вид симптоми, някои от които животозастрашаващи. В общия случай алергичните реакции се третират с медикаменти, които пациентът приема. С все по-интензивното прилагане на генни редакции с помощта на CRISPR възможностите за терапия предлагат и изместване от пациентите към самите източници на алергените, ако те са от растителен или животински произход.

Счита се, че около 10–15% от хората имат алергия към котки, която се проявява с различни симптоми – от възпаление на лигавиците до астма. Основният им алерген е Fel d 1 – протеин, който се отделя в слюнката и мастните жлези на животните. Въпреки че някои породи отделят по-малко от него (например бенгалските, ориенталските късокосмести, сибирските котки и др.), в повечето случаи те също успяват да провокират алергичен отговор и няма напълно хипоалергенни котки. Точната функция на протеина не е известна, но учените са открили сходство със защитен токсин, отделян от яванското дебело лори, и протеин при мишките, който участва в подбора на партньор.

През годините са правени редица опити за потискане на този ген. Първоначалната стратегия е използването на антитела, които котките приемат с храната. Резултатите от това са обещаващи, но такъв тип „хранителни добавки“ са скъпи и котките трябва да ги приемат постоянно. Преди две години екип описа възможността за нарушаване на синтеза на Fel d 1 с помощта на CRISPR в тъканна култура. Логичното продължение на това е създаването на първите генно редактирани хипоалергенни котки, описани в публикация от началото на 2024 г.

Използвайки CRISPR, учените първо са направили ембрионални клетки, в които е проведена редакцията, пречеща на котките да синтезират алергена. След това тези ембриони са имплантирани и от тях са получени две котета – мъжко и женско. Мъжкото (Heavy) е „мозаечно“ – носи два типа редакции в гена. Женското (Haemi) е хетерозиготно: единият алел на гена е редактиран, а другият – не. Въпреки че редакцията е непълна, и двете животни отделят по-малко количество от протеина в сравнение с нередактирана котка. При Heavy резултатът е по-слаб – седем дни след като котките са изкъпани, нивата са почти сходни с тези при нередактираната котка. Разликата в Haemi е осезаема, понеже спадът е почти осем пъти в слюнката ѝ и почти шест пъти по козината.

Но най-драстична е разликата в сина им, хомозиготния Alsik, в който спадът е над 98%. Според учените алергенът, който откриват по него, може да е пренесен от нередактираните котки, тъй като всички животни са отглеждани в обща стая, симулираща нормален дом. Именно поради това екипът обявява, че е създадена първата хипоалергенна котка. За допълнително потвърждение на това Alsik е клониран, като и неговият клонинг Alsik C проявява същите качества и според генетичен анализ е идентичен с „родителя“ си. Авторите отбелязват, че редактираните котки, както и клонингът са здрави и активни и към момента нямат видими симптоми.

Преди да бъдат предложени на пазара, ще трябва да се проведе и клинично изследване, при което да се проследи отговорът на алергични пациенти. Първоначалните резултати изглеждат изключително обещаващи и най-вероятно, ако не се появи скрит здравословен проблем, любителите на котки ще могат да се радват на модерните си четирикраки приятели. Засега не е ясно как подобни животни ще бъдат регулирани, но със сигурност интересът към тях ще бъде висок, тъй като котките са едни от най-популярните домашни любимци.

Здрав корем – здрава глава

Ние сме гостоприемници на множество микроскопични обитатели, въпреки че мисълта за това е малко смущаваща. Най-голям брой от тях живеят в храносмилателната ни система – чревният микробиом. Това са множество микроорганизми, които населяват червата ни и ни помагат да усвояваме по-пълноценно храната, която приемаме.

Влиянието на микробиома върху психичното здраве е известен феномен. Един от предполагаемите механизми е по линия на разнообразието на видове и баланса между тях. Изпитанията на ефекта от евентуален дисбаланс при хора са трудни и обикновено се използват животински модели. Един от подходите е съществуващата микрофлора да се премахне с помощта на широкоспектърни антибиотици, след което животните да бъдат захранени с определени микроорганизми.

Интересно изследване е прехвърлянето в плъхове на посевки от пациенти с клинична депресия и от хора без оплаквания. Седмица след трансплантацията гризачите от първата група започват да показват признаци на влошено психично здраве – анхедония и тревожност. Забелязани са промени и в нивата на триптофан – една от незаменимите аминокиселини, прекурсор на серотонина, т.нар. „хормон на щастието“. Нарушенията на този метаболитен път са свързани с различни психични разстройства, като клинична депресия, биполярно разстройство и шизофрения. Авторите отбелязват, че между човека и плъха не може да се направи пълен паралел, но все пак експериментът е показателен за влиянието на микрофлората върху психичното ни състояние.

Нова публикация показва, че освен върху настроението, чревният микробиом може да има ефект и върху поведението ни. В случая експериментът е проведен с доброволци от германски университет. След като участниците са разделени в две групи за установяване на базово ниво, те се включват като приемащи в „игра с ултиматум“. В нея има двама участници – предлагащ и приемащ. Предлагащият има възможност да избере как да раздели определена сума (в изследването са 10 евро) – например да задържи 7, а приемащият да получи остатъка от 3. Ако приемащият се съгласи, двамата получават съответната сума и играта приключва, но ако откаже, тогава и двамата не получават нищо.

В продължение на седем седмици след провеждане на този първи рунд двете групи получават или достъпен на пазара продукт, съдържащ пре- и пробиотик, или плацебо. Резултатът при повтаряне на играта е изненадващ – първата група е станала по-склонна да отхвърли предложение, което ощетява участниците.

Промени има и в нивата на тирозин – прекурсор на невротрансмитера допамин. Така се прави връзка между нивата на триптофан и тирозин. Предишни изследвания са показали, че съотношението между серотонин и допамин има влияние върху вземането на решения в социален аспект, включително и прилагането на алтруистично наказание, както в случая на отхвърлянето на предложението в играта с ултиматум.

Установяването на пълното значение на тези взаимовръзки най-вероятно ще отнеме дълго време, но вече е ясно, че освен чрез блуждаещия (вагусен) нерв към централната нервна система се предава информация и чрез химически сигнали, върху които чревната ни микрофлора има учудващо голям ефект.

Хитри видри

Използването на инструменти не е явление, което се среща само при хората. Освен при по-близките ни примати това се наблюдава и при други бозайници, както и при птици, главоноги и др. Понякога животните си служат с тях за подслон или игра, но в повечето случаи е за по-лесно набавяне на храна.

Морските видри имат богата диета, като едни от любимите им храни са морски охлюви и таралежи – вероятно защото при тях лесно се достига до меките части. Но с промяната на климатичните условия популациите на тези видове понякога спадат рязко и на видрите им се налага да се хранят и с друга плячка. Това обикновено са раци, различни видове миди и малки охлюви, чиято черупка е по-твърда и създава известен проблем, тъй като при отварянето им видрите могат да наранят зъбите си. Ако зъбите им се износят или счупят, се създава сериозна опасност за животните – не могат да се хранят и са застрашени от гладна смърт.

Използването на камъни като наковалня или чук за отваряне на черупки е добре известно при видрите. Те дори имат специални „джобове“ под мишниците си, в които пазят любимите си камъни, докато се придвижват или хранят, за да са свободни и двете им ръце. За да разберат повече за това поведение, екип от учени и доброволци проследява 196 радиомаркирани видри в Калифорния.

Оказва се, че женските видри по-често използват инструменти. Според изследователите причината е, че са по-малки и по-трудно се справят с по-твърдите черупки. Така те успяват да се хранят с до 35% повече твърда храна, отколкото мъжките в същата популация. Това им дава предимство, защото диетата им е по-разнообразна и могат да се хранят по-обилно – обикновено изяждат около 25% от теглото си дневно. Бонус за дамите е, че зъбите им са в по-добро състояние, отколкото на мъжките.

За съжаление, популацията на тези видри в Калифорния е застрашена и се състои от около 3000 индивида. Те играят важна роля в регулацията на видовия състав и контролират популацията на морските таралежи. Хубавото е, че обикновено майките учат малките си да използват инструменти, така че най-вероятно поведението им ще продължи да се разпространява. Учените се надяват това своеобразно технологично развитие да помогне на видрите да се справят с променящата се диета и да започнат да увеличават броя си.

С аромат на ванилия

Ванилията е един от най-популярните аромати и се използва изключително широко в кулинарията и парфюмерията. Зад това ухание се крие молекулата ванилин – органично вещество, което се среща най-често в орхидеята Vanilla planifolia.

Тъй като естественият добив на ванилин от растението покрива много малка част от необходимите количества, съединението от дълго време се произвежда от химическата индустрия. В началото на миналия век като основен подход се налага преработката на остатъци от производството на хартия. При превръщането на дървесината в целулозната маса, от която по-късно се прави хартията, се получава течност с високо съдържание на лигнин. С помощта на меден катализатор лигнинът може да се окисли до ванилин.

Процесът е популярен до 70-те години на миналия век, когато е заменен от пряк химичен синтез от гваякол – вещество, което се среща и в природата, но като суровина се произвежда от петрол. В прехода има известна ирония – употребата на медни катализатори налага скъпа последваща обработка на продукта и отпадъците от производството, така че преминаването към нефтени суровини в случая се приема за по-екологично.

Интересно е да се отбележи, че в Норвегия все още има производство по старата технология. Една от причините е в потенциално по-плътния аромат, който би могъл да има ванилинът в този случай, тъй като не може да се пречисти напълно и в него остават малки количества примеси. Другата е, че според производителя има потребители, които биха избрали техния продукт, защото не се използва петрол.

Потенциално решение за проблема с обработката на отпадъците е предложено в началото на миналата година – замяната на медния катализатор с електричество, което прави технологията много по-екологична. Допълнителна полза е употребата на отпаден продукт, който обикновено се изгаря като източник на енергия. За получаване на ванилин той се обработва с натриева основа и карбонат и се пропуска електричество, което катализира реакцията, като добивът достига до 6% от вложената суровина. Понеже и двата химикала се използват за направата на хартия, производството на ванилин може да се включи в съществуващите фабрики и по този начин да се създаде кръгово производство.

Все пак търсенето на естествен ванилин продължава да е високо, тъй като неговият вкус и аромат се смятат за най-добри. Отглеждането на повече растения е непрактично, а и скоро може да стане невъзможно поради промените в климата. Това кара група японски учени да се опита да използва биосинтетичния път, срещан в природата.

До момента този процес е неуспешен – ензимът, отговорен за превръщането на феруловата киселина във ванилин, има изключително ниска активност извън растенията, което води до пренебрежими добиви. За преодоляване на тази спънка екипът е подбрал ензим, който катализира сходна реакция – добавяне на кислород към субстрата. Във вида, срещан в природата, той не може да взаимодейства с феруловата киселина, което налага да бъде модифициран. С помощта на симулации са установени подходящите места за редакция – оказва се, че е нужна промяна само на три аминокиселини.

Така модифицираният ензим е изключително ефективен и може да катализира реакцията без кофактори (допълнителни молекули, които са нужни на някои ензими) при стайна температура. За протичането ѝ е нужно само смесването му с феруловата киселина и аериране на сместа, за да се набави кислород за окислението ѝ, което прави процеса изключително икономичен и лесен за въвеждане. Производителността му също е много добра – грам ванилин за литър реакционна смес – и е по-висока от тази на немодифицирания ензим. Бонус е, че ензимът може да превръща във ванилин и други отпадни продукти – кумарова и синапинова киселина.

Това е сериозно постижение не само по отношение на производителността и гъвкавостта. Оптимизацията на ензими ни дава възможност да се възползваме от еволюционния процес и да го ускорим изкуствено, подобрявайки вече създаденото от природата. Така в производствата могат да се въведат реакции, които до момента не са били възможни или са били непрактични, и да се избегне отглеждането на растения, което обикновено изисква значителни ресурси.

BitKeeper, Linux, and licensing disputes: How Linus wrote Git in 14 days (Graphite blog)

Post Syndicated from corbet original https://lwn.net/Articles/974914/

This
Graphite blog post
retells the history of the BitKeeper fiasco and the
dawn of the Git era.

When we think of history, we often romanticize it as being born of
a sudden stroke of inspiration. But the creation of git shows the
far harsher reality of invention: a slowly escalating disagreement
over a license; the need for a scrappy backup solution to unblock
work; and then continued polishing and iteration through years and
years, led not by the inventor, but rather a community.

For those who weren’t around in those days, a perusal of the LWN coverage
from the time might be of interest too, including:

…and a lot more for those who care to search for it.

Избори 2024. Битката за второто място

Post Syndicated from Емилия Милчева original https://www.toest.bg/izbori-2024-bitkata-za-vtoroto-myasto/

Избори 2024. Битката за второто място

Всички битки са за победа, някои обаче са за второто място, а за трети се смята, че стратегически е по-добре да загубиш битката, но да спечелиш войната. 

На предсрочните избори за 50-ти парламент на 9 юни три политически сили се бият за мястото на втория – коалицията ПП–ДБ, управлявала десет месеца, насъщното за българската политика ДПС и „Възраждане“, което този път обещава референдум за излизане от НАТО.

Фотофиниши

Изследване на социолозите от агенция „Тренд“ отреди преднина от 10,7% на ГЕРБ, които със своите 26,1 на сто от заявилите, че ще гласуват, изглеждат трудни за догонване. Следват ПП–ДБ (15,4%), ДПС (14,9%) и „Възраждане“ (14,8%). Не за първи път от началото на предизборната кампания сондажите на общественото мнение показват, че второто, а и третото място ще са най-оспорвани поради минималните разлики между тези три формации. От това как ще се позиционират, зависи съставът на бъдещата коалиция, а значи и съответстващите ѝ политики, в това число и кадрови. 

По силата на Конституцията втората политическа сила също може да получи мандат за съставяне на правителство – ако първата не се справи. Евентуално изпадане на ПП–ДБ от второто място може да се окаже ключово за състава на следващото управление. 

„Възраждане“ може и да е достигнала тавана си, тъй като на същия терен – националпопулисти и евроскептици – се конкурират няколко по-дребни формации, които ще отклонят малко, но все пак някакви избиратели. При ниската избирателна активност, която се очертава към момента, всеки глас е ценен. 

ДПС – втора? 

Може ли ДПС да стане втора след ГЕРБ зависи от няколко фактора. Първият е мобилизацията на ДПС. Фанфарите, с които елитът на Движението за права и свободи посрещна (съ)председателя Делян Пеевски, не се чуват по низовите организации – независимо от дирижираната масовка с номинацията му. За първи път Пеевски не води листа в Пазарджик (обикновено държи районите с помашко население), а в Кърджали – място, отредено обикновено за лидера на партията, но си запазва и Благоевград. 

Миналата есен почетният председател на ДПС Ахмед Доган „оттегли“ петкратния кмет на Кърджали Хасан Азис от възможността да управлява общината за шести пореден път и постави банкера Ерол Мюмюн, който спечели кметския пост. Най-голямата организация на ДПС е кърджалийската, тя осигурява четирима депутати в парламентарната група, а с махането на Азис бе лишена от човек на позицията заместник-председател на партията. Но пък настоящият кмет Ерол Мюмюн е избран в Централното оперативно бюро на ДПС. 

Номинацията на Пеевски не се посреща с въодушевление, но в ДПС са известни с дисциплината и строевата подготовка по време на избори. Ако дотук така и не се справиха с поставената от Доган задача за 400 000 гласа, сега ще щурмуват второто място – и за да се докаже Пеевски. За ДПС обикновено гласуват 340–350 000.

Социологическите сондажи не вземат предвид гласовете на изселниците в Турция, а при анкетите трябва да се отчита и факторът „скрит вот“.

Вкопчени в твърдите ядра

Общото между формациите, на които социолозите отреждат сигурно представителство в бъдещия 50-ти парламент, е вкопчването в твърдите ядра – защото половината от избирателите са се дистанцирали от политическото. 

Посланията, доколкото ги има, се разпръсват в калния поток от компроматни записи, снимки, злополучни събития, омраза и раздори, а във всичко това няма и грам идеология. Кампанията наподобява сражение на враждуващи племена, не и дебати по политики. 

Наблюдаваме разграждането и разпада на партията, наследница на Партията по някогашния член 1. С малкото си останали верни привърженици в 50-тия парламент БСП ще е като частна гвардия на лидерката си.

ГЕРБ се опитват да разширят подкрепата си над тези 26–27%, извън които не могат да помръднат от 2021-ва насам. Eдва ли ще успеят и сега, въпреки че редуват нападките към ПП–ДБ с послания за можене и стабилност и дори представиха предизборна програма. Големи са, колкото да са първи, но не толкова, че да могат да диктуват условия, нито да дресират партньорите, с които (ще) управляват. Още повече ако единият се нарича ДПС. И със сигурност лидерът на ГЕРБ Бойко Борисов не би бил доволен Делян Пеевски да е основният му съдружник в управлението, независимо колко обществени поръчки са печелили свързани с Пеевски фирми в мандатите на ГЕРБ и Борисов като премиер и колко висши съдии и прокурори са си „споделяли“.

За близо десетилетие управление лидерът Борисов и партията му успяха да отгледат достатъчно силни клиентелистки кръгове, а непроменената власт в регулаторите, службите и прокуратурата продължава да охранява апетитите им. Опитът да бъде променено разпределението на силите в тях приключи с разпадане на управляващото мнозинство, което ще остане в историята на българската демокрация като „сглобка“ – нещо като коалиция, нещо като завера. 

ПП–ДБ – застрашени от компроматите

Миналия август за заварчик на „сглобката“ лидерът на ГЕРБ посочи Алексей Петров – съотборник от младите години, по-късно враг, бивша барета, съветник в ДАНС по времето на тройната коалиция, доцент от Пловдивския университет, бизнесмен с влияние и също така сочен като източник на записи, в които главен герой беше самият Борисов. 

Двамата бяха в конфликт от години, а шумната акция „Октопод“, заради която Петров лежа в ареста, приключи с пълно фиаско. Той беше оправдан след 11 години съдебна сага, а компанията му „Лев Инс“ осъди прокуратурата и МВР на първа инстанция за рекордните 48 млн. лв. (без лихвите). Когато беше посочен за главно главно действащо лице в политическата конструкция между ПП–ДБ и ГЕРБ, Алексей Петров вече беше мъртъв. От „Демократична България“ се смълчаха по темата – често следвана от тях политика в последните месеци. От „Продължаваме промяната“ не отрекоха срещата за съставяне на правителство, нито пък къде се е състояла тя – Самоковския девически манастир.

Петров беше убит от неизвестен килър, но телефонът му остава във владение на живите, също и масивът от данни – аудио- и видеозаписи, иззети при обиските в компании на Алексей Петров, които преди три месеца прокуратурата извърши по неотложност. Дали записите, които изтичат през сайта Афера.бг и нанасят репутационни щети на „Продължаваме промяната“, респективно и на коалиционния им партньор ДБ, са от този архив – това би могло да е само предположение с голяма степен на вероятност. Не за първи път от прокуратурата има теч на информация. Дали са манипулирани записите – „вероятно“ е отговорът, но от кого, е въпрос на изследването им. 

Това обаче е същият сайт, който първи публикува снимките от спалнята в резиденция Бояна със спящия премиер Борисов и пачките евро и кюлчетата в нощното шкафче, същият сайт, през който изтекоха и куп записи от скандални разговори с гласа на същия Борисов. А сега и тези записи – все още четири, – които неминуемо ще се отразят на резултата в урните на 9 юни.

„Коалицията ни е стабилна, защото имаме ясни каузи – да не допуснем г-н Пеевски да консумира повече власт“, беше единственият коментар относно записите на съпредседателя на ДБ Христо Иванов, без да коментира по същество. Но записите повдигат друг въпрос – откога лидерите на ПП са били в контакт с Петров, имало ли е срещи преди изборите на 2 април 2023 г. „Продължаваме промяната“ качи първия запис в страницата си във Facebook с коментар

Здравейте, приятели, пускаме ви запис, от който ще разберете, че на изборите през 2023 не успявахме да съберем пари, за да си финансираме кампанията. Сега положението е същото, затова и сме обявили дарителска кампания. Другият извод, който се налага, е че българските служби ни следят и подслушват. Това може да ви обясни и защо ГЕРБ и ДПС водиха такава люта битка, за да ги запазят в този вид. Подкрепете ни, за да има истинска промяна в България.

„Кеш“ – ключовата дума

Ако нещо прави впечатление в неясните записи, в които трудно се чуват гласовете, то е думата „кеш“. Очевидно изпращачите им са търсили подобно концептуално решение, защото и без фонограма тази дума е ясно различима. 

Из запис №1:

Ние неофициален кеш имаме… Бе така или иначе ще намерим.

Из запис №2:

Президентът Радев с кеша, който има, захване ги с кеш, почнат да купуват и полицията удря само на ГЕРБ купувачите, а неговите купувачи си стоят…

Из запис №3:

По отношение на Черепа банковите тегления той им ги е дал част от папката по колко са изтеглени. Имаме две писмени обяснения на двама свидетеля. Единият е шофьорът, който казва – аз карах Божков всеки две седмици… и той внасяше евро.

Из запис №4:

Корнела просто иска кеш поток.

Заплахата да претърпят още имиджови щети идва със следващи записи, каквито неминуемо ще има. Обещават им ги.

Борисов се измъкваше почти невредим от тези скандали, защото никой не е очаквал от него да бъде друг – на записаните разговори с непристоен език и на фона на чалга той е съвършено автентичен. Но противниците му се самоидентифицираха и на база уверенията, че са негова противоположност. Краят на мръсната кампания не е дошъл. 

Вече никой не се вълнува от политика.

On the Zero-Day Market

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2024/05/on-the-zero-day-market.html

New paper: “Zero Progress on Zero Days: How the Last Ten Years Created the Modern Spyware Market“:

Abstract: Spyware makes surveillance simple. The last ten years have seen a global market emerge for ready-made software that lets governments surveil their citizens and foreign adversaries alike and to do so more easily than when such work required tradecraft. The last ten years have also been marked by stark failures to control spyware and its precursors and components. This Article accounts for and critiques these failures, providing a socio-technical history since 2014, particularly focusing on the conversation about trade in zero-day vulnerabilities and exploits. Second, this Article applies lessons from these failures to guide regulatory efforts going forward. While recognizing that controlling this trade is difficult, I argue countries should focus on building and strengthening multilateral coalitions of the willing, rather than on strong-arming existing multilateral institutions into working on the problem. Individually, countries should focus on export controls and other sanctions that target specific bad actors, rather than focusing on restricting particular technologies. Last, I continue to call for transparency as a key part of oversight of domestic governments’ use of spyware and related components.

The Oral History of Selling World of Warcraft Server Blades

Post Syndicated from Patrick Kennedy original https://www.servethehome.com/the-oral-history-of-selling-world-of-warcraft-server-blades-hp-hpe-amd/

We record the oral history of how World of Warcraft server blades were sold via a charity auction where fans could buy their online realms

The post The Oral History of Selling World of Warcraft Server Blades appeared first on ServeTheHome.

Metasploit Weekly Wrap-Up 05/23/2024

Post Syndicated from Zachary Goldman original https://blog.rapid7.com/2024/05/23/metasploit-weekly-wrap-up-05-23-2024/

Infiltrate the Broadcast!

Metasploit Weekly Wrap-Up 05/23/2024

A new module from Chocapikk allows the user to perform remote code execution on vulnerable versions of streaming platform AVideo (12.4 – 14.2). The multi/http/avideo_wwbnindex_unauth_rce module leverages CVE-2024-31819, a vulnerability to PHP Filter Chaining, to gain unauthenticated and unprivileged access, earning it an attacker value of High on AttackerKB.

New module content (8)

Chaos RAT XSS to RCE

Authors: chebuya and h00die
Type: Exploit
Pull request: #19104 contributed by h00die
Path: linux/http/chaos_rat_xss_to_rce
AttackerKB reference: CVE-2024-30850

Description: Adds an exploit for HAOS v5.0.8, which contains a remote command execution vulnerability which
can be triggered through one of three routes: credentials, JWT token from an agent, an agent executable can be provided, or the JWT token can be extracted.

AVideo WWBNIndex Plugin Unauthenticated RCE

Author: Valentin Lobstein
Type: Exploit
Pull request: #19071 contributed by Chocapikk
Path: multi/http/avideo_wwbnindex_unauth_rce
AttackerKB reference: CVE-2024-31819

Description: Adds a module for CVE-2024-31819 which exploits an LFI in AVideo which uses PHP Filter Chaining to turn the LFI into unauthenticated RCE.

NorthStar C2 XSS to Agent RCE

Authors: chebuya and h00die
Type: Exploit
Pull request: #19102 contributed by h00die
Path: windows/http/northstar_c2_xss_to_agent_rce
AttackerKB reference: CVE-2024-28741

Description: Adds an exploit for CVE-2024-28741 which exploits an XSS vulnerability in Northstar C2.

Adi IRC credential gatherer

Authors: Barwar Salim M, Daniel Hallsworth, Jacob Tierney, Kazuyoshi Maruta, and Z. Cliffe Schreuders
Type: Post
Pull request: #19169 contributed by The-Pink-Panther
Path: windows/gather/credentials/adi_irc

Description: This adds a gather module leveraging Packrat targeting Adi IRC client.

CarotDAV credential gatherer

Authors: Barwar Salim M, Daniel Hallsworth, Jacob Tierney, Kazuyoshi Maruta, and Z. Cliffe Schreuders
Type: Post
Pull request: #19173 contributed by The-Pink-Panther
Path: windows/gather/credentials/carotdav_ftp

Description: This adds a gather module leveraging Packrat targeting the CarotDAV FTP client.

Halloy IRC credential gatherer

Authors: Barwar Salim M, Daniel Hallsworth, Jacob Tierney, Kazuyoshi Maruta, and Z. Cliffe Schreuders
Type: Post
Pull request: #19165 contributed by The-Pink-Panther
Path: windows/gather/credentials/halloy_irc

Description: This adds a module leveraging Packrat to gather credentials against the Halloy IRC client.

Quassel IRC credential gatherer

Authors: Barwar Salim M, Daniel Hallsworth, Jacob Tierney, Kazuyoshi Maruta, and Z. Cliffe Schreuders
Type: Post
Pull request: #19166 contributed by The-Pink-Panther
Path: windows/gather/credentials/quassel_irc

Description: This adds a gather module leveraging Packrat targeting Quassel IRC client.

Sylpheed email credential gatherer

Authors: Barwar Salim M, Daniel Hallsworth, Jacob Tierney, Kazuyoshi Maruta, and Z. Cliffe Schreuders
Type: Post
Pull request: #19171 contributed by The-Pink-Panther
Path: windows/gather/credentials/sylpheed

Description: This adds a gather module leveraging Packrat targeting Sylpheed Email client.

Enhancements and features (1)

  • #19189 from adfoster-r7 – Updates Metasploit framework’s default Ruby version to 3.1.5; newer Ruby versions are also supported.

Bugs fixed (4)

  • #19002 from adfoster-r7 – Fixed persistent jobs not working when rebooting MSF console.
  • #19170 from sjanusz-r7 – Fixes the smb_lookupsid module hanging with STATUS_PENDING when running against Samba targets.
  • #19186 from dwelch-r7 – Fixes a bug were the show advanced command could show normal options.
  • #19192 from adfoster-r7 – Fix crashing mipsel modules when running Ruby 3.3.0.

Documentation

You can find the latest Metasploit documentation on our docsite at docs.metasploit.com.

Get it

As always, you can update to the latest Metasploit Framework with msfupdate
and you can get more details on the changes since the last blog post from
GitHub:

If you are a git user, you can clone the Metasploit Framework repo (master branch) for the latest.
To install fresh without using git, you can use the open-source-only Nightly Installers or the
commercial edition Metasploit Pro

[$] A new swap abstraction layer for the kernel

Post Syndicated from corbet original https://lwn.net/Articles/974587/

Swapping may be a memory-management technique at its core, but its
implementation also involves the kernel’s filesystem and storage layers.
So it is not surprising that a session on the kernel’s swap abstraction
layer, led by Chris Li at the 2024 Linux Storage,
Filesystem, Memory-Management and BPF Summit
, was held jointly by all
three of those tracks. Li has some ambitious ideas for an improved
subsystem, but getting to a workable implementation may not be easy.

[$] What’s scheduled for sched_ext

Post Syndicated from daroc original https://lwn.net/Articles/974387/

David Vernet’s second talk at the 2024
Linux Storage,
Filesystem, Memory Management, and BPF Summit
was a summary of the state of
sched_ext, the extensible BPF scheduler that LWN
covered a in early May
. In short, sched_ext is intended as a platform for
rapid experimentation with schedulers, and a tool to let performance-minded
administrators customize the scheduler to their workload. The patch set has seen
several revisions, becoming more generic and powerful over time.
Vernet spoke about what has been done in the past year,
and what is still missing before sched_ext can be considered pretty much
complete.

In-place version upgrades for applications on Amazon Managed Service for Apache Flink now supported

Post Syndicated from Jeremy Ber original https://aws.amazon.com/blogs/big-data/in-place-version-upgrades-for-applications-on-amazon-managed-service-for-apache-flink-now-supported/

For existing users of Amazon Managed Service for Apache Flink who are excited about the recent announcement of support for Apache Flink runtime version 1.18, you can now statefully migrate your existing applications that use older versions of Apache Flink to a more recent version, including Apache Flink version 1.18. With in-place version upgrades, upgrading your application runtime version can be achieved simply, statefully, and without incurring data loss or adding additional orchestration to your workload.

Apache Flink is an open source distributed processing engine, offering powerful programming interfaces for both stream and batch processing, with first-class support for stateful processing and event time semantics. Apache Flink supports multiple programming languages, Java, Python, Scala, SQL, and multiple APIs with different level of abstraction, which can be used interchangeably in the same application.

Managed Service for Apache Flink is a fully managed, serverless experience in running Apache Flink applications, and now supports Apache Flink 1.18.1, the latest released version of Apache Flink at the time of writing.

In this post, we explore in-place version upgrades, a new feature offered by Managed Service for Apache Flink. We provide guidance on getting started and offer detailed insights into the feature. Later, we deep dive into how the feature works and some sample use cases.

This post is complemented by an accompanying video on in-place version upgrades, and code samples to follow along.

Use the latest features within Apache Flink without losing state

With each new release of Apache Flink, we observe continuous improvements across all aspects of the stateful processing engine, from connector support to API enhancements, language support, checkpoint and fault tolerance mechanisms, data format compatibility, state storage optimization, and various other enhancements. To learn more about the features supported in each Apache Flink version, you can consult the Apache Flink blog, which discusses at length each of the Flink Improvement Proposals (FLIPs) incorporated into each of the versioned releases. For the most recent version of Apache Flink supported on Managed Service for Apache Flink, we have curated some notable additions to the framework you can now use.

With the release of in-place version upgrades, you can now upgrade to any version of Apache Flink within the same application, retaining state in between upgrades. This feature is also useful for applications that don’t require retaining state, because it makes the runtime upgrade process seamless. You don’t need to create a new application in order to upgrade in-place. In addition, logs, metrics, application tags, application configurations, VPCs, and other settings are retained between version upgrades. Any existing automation or continuous integration and continuous delivery (CI/CD) pipelines built around your existing applications don’t require changes post-upgrade.

In the following sections, we share best practices and considerations while upgrading your applications.

Make sure your application code runs successfully in the latest version

Before upgrading to a newer runtime version of Apache Flink on Managed Service for Apache Flink, you need to update your application code, version dependencies, and client configurations to match the target runtime version due to potential inconsistencies between application versions for certain Apache Flink APIs or connectors. Additionally, there may have been changes within the existing Apache Flink interface between versions that will require updating. Refer to Upgrading Applications and Flink Versions for more information about how to avoid any unexpected inconsistencies.

The next recommended step is to test your application locally with the newly upgraded Apache Flink runtime. Make sure the correct version is specified in your build file for each of your dependencies. This includes the Apache Flink runtime and API and recommended connectors for the new Apache Flink runtime. Running your application with realistic data and throughput profiles can prevent issues with code compatibility and API changes prior to deploying onto Managed Service for Apache Flink.

After you have sufficiently tested your application with the new runtime version, you can begin the upgrade process. Refer to General best practices and recommendations for more details on how to test the upgrade process itself.

It is strongly recommended to test your upgrade path on a non-production environment to avoid service interruptions to your end-users.

Build your application JAR and upload to Amazon S3

You can build your Maven projects by following the instructions in How to use Maven to configure your project. If you’re using Gradle, refer to How to use Gradle to configure your project. For Python applications, refer to the GitHub repo for packaging instructions.

Next, you can upload this newly created artifact to Amazon Simple Storage Service (Amazon S3). It is strongly recommended to upload this artifact with a different name or different location than the existing running application artifact to allow for rolling back the application should issues arise. Use the following code:

aws s3 cp <<artifact>> s3://<<bucket-name>>/path/to/file.extension

The following is an example:

aws s3 cp target/my-upgraded-application.jar s3://my-managed-flink-bucket/1_18/my-upgraded-application.jar

Take a snapshot of the current running application

It is recommended to take a snapshot of your current running application state prior to starting the upgrade process. This enables you to roll back your application statefully if issues occur during or after your upgrade. Even if your applications don’t use state directly in the case of windows, process functions, or similar, they may still use Apache Flink state in the case of a source like Apache Kafka or Amazon Kinesis, remembering the position in the topic or shard it last left off before restarting. This helps prevent duplicate data entering the stream processing application.

Some things to keep in mind:

  • Stateful downgrades are not compatible and will not be accepted due to snapshot incompatibility.
  • Validation of the state snapshot compatibility happens when the application attempts to start in the new runtime version. This will happen automatically for applications in RUNNING mode, but for applications that are upgraded in READY state, the compatibility check will only happen when the application starts by calling the RunApplication action.
  • Stateful upgrades from an older version of Apache Flink to a newer version are generally compatible with rare exceptions. Make sure your current Flink version is snapshot-compatible with the target Flink version by consulting the Apache Flink state compatibility table.

Begin the upgrade of a running application

After you have tested your new application, uploaded the artifacts to Amazon S3, and taken a snapshot of the current application, you are now ready to begin upgrading your application. You can upgrade your applications using the UpdateApplication action:

aws kinesisanalyticsv2 update-application \ --region ${region} \ --application-name ${appName} \ --current-application-version-id 1 \ --runtime-environment-update "FLINK-1_18" \ --application-configuration-update '{ "ApplicationCodeConfigurationUpdate": { "CodeContentTypeUpdate": "ZIPFILE", "CodeContentUpdate": { "S3ContentLocationUpdate": { "BucketARNUpdate": "'${bucketArn}'", "FileKeyUpdate": "1_18/amazon-msf-java-stream-app-1.0.jar" } } } }'

This command invokes several processes to perform the upgrade:

  • Compatibility check – The API will check if your existing snapshot is compatible with the target runtime version. If compatible, your application will transition into UPDATING status, otherwise your upgrade will be rejected and resume processing data with unaffected application.
  • Restore from latest snapshot with new code – The application will then attempt to start using the most recent snapshot. If the application starts running and behavior appears in-line with expectations, no further action is needed.
  • Manual intervention may be required – Keep a close watch on your application throughout the upgrade process. If there are unexpected restarts, failures, or issues of any kind, it is recommended to roll back to the previous version of your application.

When the application is in RUNNING status in the new application version, it is still recommended to closely monitor the application for any unexpected behavior, state incompatibility, restarts, or anything else related to performance.

Unexpected issues while upgrading

In the event of encountering any issues with your application following the upgrade, you retain the ability to roll back your running application to the previous application version. This is the recommended approach if your application is unhealthy or unable to take checkpoints or snapshots while upgrading. Additionally, it’s recommended to roll back if you observe unexpected behavior out of the application.

There are several scenarios to be aware of when upgrading that may require a rollback:

  • An app stuck in UPDATING state for any reason can use the RollbackApplication action to trigger a rollback to the original runtime
  • If an application successfully upgrades to a newer Apache Flink runtime and switches to RUNNING status, but exhibits unexpected behavior, it can use the RollbackApplication function to revert back to the prior application version
  • An application fails via the UpgradeApplication command, which will result in the upgrade not taking place to begin with

Edge cases

There are several known issues you may face when upgrading your Apache Flink versions on Managed Service for Apache Flink. Refer to Precautions and known issues for more details to see if they apply to your specific applications. In this section, we walk through one such use case of state incompatibility.

Consider a scenario where you have an Apache Flink application currently running on runtime version 1.11, using the Amazon Kinesis Data Streams connector for data retrieval. Due to notable alterations made to the Kinesis Data Streams connector across various Apache Flink runtime versions, transitioning directly from 1.11 to 1.13 or higher while preserving state may pose difficulties. Notably, there are disparities in the software packages employed: Amazon Kinesis Connector vs. Apache Kinesis Connector. Consequently, this difference will lead to complications when attempting to restore state from older snapshots.

For this specific scenario, it’s recommended to use the Amazon Kinesis Connector Flink State Migrator, a tool to help migrate Kinesis Data Streams connectors to Apache Kinesis Data Stream connectors without losing state in the source operator.

For illustrative purposes, let’s walk through the code to upgrade the application:

aws kinesisanalyticsv2 update-application \ --region ${region} \ --application-name ${appName} \ --current-application-version-id 1 \ --runtime-environment-update "FLINK-1_13" \ --application-configuration-update '{ "ApplicationCodeConfigurationUpdate": { "CodeContentTypeUpdate": "ZIPFILE", "CodeContentUpdate": { "S3ContentLocationUpdate": { "BucketARNUpdate": "'${bucketArn}'", "FileKeyUpdate": "1_13/new-kinesis-application-1-13.jar" } } } }'

This command will issue an update command and run all compatibility checks. Additionally, the application may even start, displaying the RUNNING status on the Managed Service for Apache Flink console and API.

However, with a closer inspection into your Apache Flink Dashboard to view the fullRestart metrics and application behavior, you may find that the application has failed to start due to the state from the 1.11 version of the application’s state being incompatible with the new application due changing the connector as described previously.

You can roll back to the previous running version, restoring from the successfully taken snapshot, as shown in the following code. If the application has no snapshots, Managed Service for Apache Flink will reject the rollback request.

aws kinesisanalyticsv2 rollback-application --application-name ${appName} --current-application-version-id 2 --region ${region}

After issuing this command, your application should be running again in the original runtime without any data loss, thanks to the application snapshot that was taken previously.

This scenario is meant as a precaution, and a recommendation that you should test your application upgrades in a lower environment prior to production. For more details about the upgrade process, along with general best practices and recommendations, refer to In-place version upgrades for Apache Flink.

Conclusion

In this post, we covered the upgrade path for existing Apache Flink applications running on Managed Service for Apache Flink and how you should make modifications to your application code, dependencies, and application JAR prior to upgrading. We also recommended taking snapshots of your application prior to the upgrade process, along with testing your upgrade path in a lower environment. We hope you found this post helpful and that it provides valuable insights into upgrading your applications seamlessly.

To learn more about the new in-place version upgrade feature from Managed Service for Apache Flink, refer to In-place version upgrades for Apache Flink, the how-to video, the GitHub repo, and Upgrading Applications and Flink Versions.


About the Authors

Jeremy Ber

Jeremy Ber boasts over a decade of expertise in stream processing, with the last four years dedicated to AWS as a Streaming Specialist Solutions Architect. With a robust ten-year career background, Jeremy’s commitment to stream processing, notably Apache Flink, underscores his professional endeavors. Transitioning from Software Engineer to his current role, Jeremy prioritizes assisting customers in resolving complex challenges with precision. Whether elucidating Amazon Managed Streaming for Apache Kafka (Amazon MSK) or navigating AWS’s Managed Service for Apache Flink, Jeremy’s proficiency and dedication ensure efficient problem-solving. In his professional approach, excellence is maintained through collaboration and innovation.

Krzysztof Dziolak is Sr. Software Engineer on Amazon Managed Service for Apache Flink. He works with product team and customers to make streaming solutions more accessible to engineering community.

Get started with AWS Glue Data Quality dynamic rules for ETL pipelines

Post Syndicated from Prasad Nadig original https://aws.amazon.com/blogs/big-data/get-started-with-aws-glue-data-quality-dynamic-rules-for-etl-pipelines/

Hundreds of thousands of organizations build data integration pipelines to extract and transform data. They establish data quality rules to ensure the extracted data is of high quality for accurate business decisions. These rules assess the data based on fixed criteria reflecting current business states. However, when the business environment changes, data properties shift, rendering these fixed criteria outdated and causing poor data quality.

For example, a data engineer at a retail company established a rule that validates daily sales must exceed a 1-million-dollar threshold. After a few months, daily sales surpassed 2 million dollars, rendering the threshold obsolete. The data engineer couldn’t update the rules to reflect the latest thresholds due to lack of notification and the effort required to manually analyze and update the rule. Later in the month, business users noticed a 25% drop in their sales. After hours of investigation, the data engineers discovered that an extract, transform, and load (ETL) pipeline responsible for extracting data from some stores had failed without generating errors. The rule with outdated thresholds continued to operate successfully without detecting this issue. The ordering system that used the sales data placed incorrect orders, causing low inventory for future weeks. What if the data engineer had the ability to set up dynamic thresholds that automatically adjusted as business properties changed?

We are excited to talk about how to use dynamic rules, a new capability of AWS Glue Data Quality. Now, you can define dynamic rules and not worry about updating static rules on a regular basis to adapt to varying data trends. This feature enables you to author dynamic rules to compare current metrics produced by your rules with your historical values. These historical comparisons are enabled by using the last(k) operator in expressions. For example, instead of writing a static rule like RowCount > 1000, which might become obsolete as data volume grows over time, you can replace it with a dynamic rule like RowCount > min(last(3)) . This dynamic rule will succeed when the number of rows in the current run is greater than the minimum row count from the most recent three runs for the same dataset.

This is part 7 of a seven-part series of posts to explain how AWS Glue Data Quality works. Check out the other posts in the series:

Previous posts explain how to author static data quality rules. In this post, we show how to create an AWS Glue job that measures and monitors the data quality of a data pipeline using dynamic rules. We also show how to take action based on the data quality results.

Solution overview

Let’s consider an example data quality pipeline where a data engineer ingests data from a raw zone and loads it into a curated zone in a data lake. The data engineer is tasked with not only extracting, transforming, and loading data, but also identifying anomalies compared against data quality statistics from historical runs.

In this post, you’ll learn how to author dynamic rules in your AWS Glue job in order to take appropriate actions based on the outcome.

The data used in this post is sourced from NYC yellow taxi trip data. The yellow taxi trip records include fields capturing pickup and dropoff dates and times, pickup and dropoff locations, trip distances, itemized fares, rate types, payment types, and driver-reported passenger counts. The following screenshot shows an example of the data.

Set up resources with AWS CloudFormation

This post includes an AWS CloudFormation template for a quick setup. You can review and customize it to suit your needs.

The CloudFormation template generates the following resources:

  • An Amazon Simple Storage Service (Amazon S3) bucket (gluedataqualitydynamicrules-*)
  • An AWS Lambda which will create the following folder structure within the above Amazon S3 bucket:
    • raw-src/
    • landing/nytaxi/
    • processed/nytaxi/
    • dqresults/nytaxi/
  • AWS Identity and Access Management (IAM) users, roles, and policies. The IAM role GlueDataQuality-* has AWS Glue run permission as well as read and write permission on the S3 bucket.

To create your resources, complete the following steps:

  1. Sign in to the AWS CloudFormation console in the us-east-1 Region.
  2. Choose Launch Stack:  
  3. Select I acknowledge that AWS CloudFormation might create IAM resources.
  4. Choose Create stack and wait for the stack creation step to complete.

Upload sample data

  1. Download the dataset to your local machine.
  2. Unzip the file and extract the Parquet files into a local folder.
  3. Upload parquet files under prefix raw-src/ in Amazon s3 bucket (gluedataqualitydynamicrules-*)

Implement the solution

To start configuring your solution, complete the following steps:

  1. On the AWS Glue Studio console, choose ETL Jobs in the navigation pane and choose Visual ETL.
  2. Navigate to the Job details tab to configure the job.
  3. For Name, enter GlueDataQualityDynamicRules
  4. For IAM Role, choose the role starting with GlueDataQuality-*.
  5. For Job bookmark, choose Enable.

This allows you to run this job incrementally. To learn more about job bookmarks, refer to Tracking processed data using job bookmarks.

  1. Leave all the other settings as their default values.
  2. Choose Save.
  3. After the job is saved, navigate to the Visual tab and on the Sources menu, choose Amazon S3.
  4. In the Data source properties – S3 pane, for S3 source type, select S3 location.
  5. Choose Browse S3 and navigate to the prefix /landing/nytaxi/ in the S3 bucket starting with gluedataqualitydynamicrules-*.
  6. For Data format, choose Parquet and choose Infer schema.

  1. On the Transforms menu, choose Evaluate Data Quality.

You now implement validation logic in your process to identify potential data quality problems originating from the source data.

  1. To accomplish this, specify the following DQDL rules on the Ruleset editor tab:
    CustomSql "select vendorid from primary where passenger_count > 0" with threshold > 0.9,
    Mean "trip_distance" < max(last(3)) * 1.50,
    Sum "total_amount" between min(last(3)) * 0.8 and max(last(3)) * 1.2,
    RowCount between min(last(3)) * 0.9 and max(last(3)) * 1.2,
    Completeness "fare_amount" >= avg(last(3)) * 0.9,
    DistinctValuesCount "ratecodeid" between avg(last(3))-1 and avg(last(3))+2,
    DistinctValuesCount "pulocationid" > avg(last(3)) * 0.8,
    ColumnCount = max(last(2))

  1. Select Original data to output the original input data from the source and add a new node below the Evaluate Data Quality node.
  2. Choose Add new columns to indicate data quality errors to add four new columns to the output schema.
  3. Select Data quality results to capture the status of each rule configured and add a new node below the Evaluate Data Quality node.

  1. With rowLevelOutcomes node selected, choose Amazon S3 on the Targets menu.
  2. Configure the S3 target location to /processed/nytaxi/ under the bucket name starting with gluedataqualitydynamicrules-* and set the output format to Parquet and compression type to Snappy.

  1. With the ruleOutcomes node selected, choose Amazon S3 on the Targets menu.
  2. Configure the S3 target location to /dqresults/ under the bucket name starting with gluedataqualitydynamicrules-*.
  3. Set the output format to Parquet and compression type to Snappy.
  4. Choose Save.

Up to this point, you have set up an AWS Glue job, specified dynamic rules for the pipeline, and configured the target location for both the original source data and AWS Glue Data Quality results to be written on Amazon S3. Next, let’s examine dynamic rules and how they function, and provide an explanation of each rule we used in our job.

Dynamic rules

You can now author dynamic rules to compare current metrics produced by your rules with their historical values. These historical comparisons are enabled by using the last() operator in expressions. For example, the rule RowCount > max(last(1)) will succeed when the number of rows in the current run is greater than the most recent prior row count for the same dataset. last() takes an optional natural number argument describing how many prior metrics to consider; last(k) where k >= 1 will reference the last k metrics. The rule has the following conditions:

  • If no data points are available, last(k) will return the default value 0.0
  • If fewer than k metrics are available, last(k) will return all prior metrics

For example, if values from previous runs are (5, 3, 2, 1, 4), max(last (3)) will return 5.

AWS Glue supports over 15 types of dynamic rules, providing a robust set of data quality validation capabilities. For more information, refer to Dynamic rules. This section demonstrates several rule types to showcase the functionality and enable you to apply these features in your own use cases.

CustomSQL

The CustomSQL rule provides the capability to run a custom SQL statement against a dataset and check the return value against a given expression.

The following example rule uses a SQL statement wherein you specify a column name in your SELECT statement, against which you compare with some condition to get row-level results. A threshold condition expression defines a threshold of how many records should fail in order for the entire rule to fail. In this example, more than 90% of records should contain passenger_count greater than 0 for the rule to pass:

CustomSql "select vendorid from primary where passenger_count > 0" with threshold > 0.9

Note: Custom SQL also supports Dynamic rules, below is an example of how to use it in your job

CustomSql "select count(*) from primary" between min(last(3)) * 0.9 and max(last(3)) * 1.2

Mean

The Mean rule checks whether the mean (average) of all the values in a column matches a given expression.

The following example rule checks that the mean of trip_distance is less than the maximum value for the column trip distance over the last three runs times 1.5:

Mean "trip_distance" < max(last(3)) * 1.50

Sum

The Sum rule checks the sum of all the values in a column against a given expression.

The following example rule checks that the sum of total_amount is between 80% of the minimum of the last three runs and 120% of the maximum of the last three runs:

Sum "total_amount" between min(last(3)) * 0.8 and max(last(3)) * 1.2

RowCount

The RowCount rule checks the row count of a dataset against a given expression. In the expression, you can specify the number of rows or a range of rows using operators like > and <.

The following example rule checks if the row count is between 90% of the minimum of the last three runs and 120% of the maximum of last three runs (excluding the current run). This rule applies to the entire dataset.

RowCount between min(last(3)) * 0.9 and max(last(3)) * 1.2

Completeness

The Completeness rule checks the percentage of complete (non-null) values in a column against a given expression.

The following example rule checks if the completeness of the fare_amount column is greater than or equal to the 90% of the average of the last three runs:

Completeness "fare_amount" >= avg(last(3)) * 0.9

DistinctValuesCount

The DistinctValuesCount rule checks the number of distinct values in a column against a given expression.

The following example rules checks for two conditions:

  • If the distinct count for the ratecodeid column is between the average of the last three runs minus 1 and the average of the last three runs plus 2
  • If the distinct count for the pulocationid column is greater than 80% of the average of the last three runs
    DistinctValuesCount "ratecodeid" between avg(last(3))-1 and avg(last(3))+2,
    DistinctValuesCount "pulocationid" > avg(last(3)) * 0.8

ColumnCount

The ColumnCount rule checks the column count of the primary dataset against a given expression. In the expression, you can specify the number of columns or a range of columns using operators like > and <.

The following example rule check if the column count is equal to the maximum of the last two runs:

ColumnCount = max(last(2))

Run the job

Now that the job setup is complete, we are prepared to run it. As previously indicated, dynamic rules are determined using the last(k) operator, with k set to 3 in the configured job. This implies that data quality rules will be evaluated using metrics from the previous three runs. To assess these rules accurately, the job must be run a minimum of k+1 times, requiring a total of four runs to thoroughly evaluate dynamic rules. In this example, we simulate an ETL job with data quality rules, starting with an initial run followed by three incremental runs.

First job (initial)

Complete the following steps for the initial run:

  1. Navigate to the source data files made available under the prefix /raw-src/ in the S3 bucket starting with gluedataqualitydynamicrules-*.
  2. To simulate the initial run, copy the day one file 20220101.parquet under /raw-src/ to the /landing/nytaxi/ folder in the same S3 bucket.

  1. On the AWS Glue Studio console, choose ETL Jobs in the navigation pane.
  2. Choose GlueDataQualityDynamicRule under Your jobs to open it.
  3. Choose Run to run the job.

You can view the job run details on the Runs tab. It will take a few minutes for the job to complete.

  1. After job successfully completes, navigate to the Data quality -updated tab.

You can observe the Data Quality rules, rule status, and evaluated metrics for each rule that you set in the job. The following screenshot shows the results.

The rule details are as follows:

  • CustomSql – The rule passes the data quality check because 95% of records have a passenger_count greater than 0, which exceeds the set threshold of 90%.
  • Mean – The rule fails due to the absence of previous runs, resulting in a default value of 0.0 when using last(3), with an overall mean of 5.94, which is greater than 0. If no data points are available, last(k) will return the default value of 0.0.
  • Sum – The rule fails for the same reason as the mean rule, with last(3) resulting in a default value of 0.0.
  • RowCount – The rule fails for the same reason as the mean rule, with last(3) resulting in a default value of 0.0.
  • Completeness – The rule passes because 100% of records are complete, meaning there are no null values for the fare_amount column.
  • DistinctValuesCount “ratecodeid” – The rule fails for the same reason as the mean rule, with last(3) resulting in a default value of 0.0.
  • DistinctValuesCount “pulocationid” – The rule passes because the distinct count of 205 for the pulocationid column is higher than the set threshold, with a value of 0.00 because avg(last(3))*0.8 results in 0.
  • ColumnCount – The rule fails for the same reason as the mean rule, with last(3) resulting in a default value of 0.0.

Second job (first incremental)

Now that you have successfully completed the initial run and observed the data quality results, you are ready for the first incremental run to process the file from day two. Complete the following steps:

  1. Navigate to the source data files made available under the prefix /raw-src/ in the S3 bucket starting with gluedataqualitydynamicrules-*.
  2. To simulate the first incremental run, copy the day two file 20220102.parquet under /raw-src/ to the /landing/nytaxi/ folder in the same S3 bucket.
  3. On the AWS Glue Studio console, repeat Steps 4–7 from the first (initial) run to run the job and validate the data quality results.

The following screenshot shows the data quality results.

On the second run, all rules passed because each rule’s threshold has been met:

  • CustomSql – The rule passed because 96% of records have a passenger_count greater than 0, exceeding the set threshold of 90%.
  • Mean – The rule passed because the mean of 6.21 is less than 9.315 (6.21 * 1.5, meaning the mean from max(last(3)) is 6.21, multiplied by 1.5).
  • Sum – The rule passed because the sum of the total amount, 1,329,446.47, is between 80% of the minimum of the last three runs, 1,063,557.176 (1,329,446.47 * 0.8), and 120% of the maximum of the last three runs, 1,595,335.764 (1,329,446.47 * 1.2).
  • RowCount – The rule passed because the row count of 58,421 is between 90% of the minimum of the last three runs, 52,578.9 (58,421 * 0.9), and 120% of the maximum of the last three runs, 70,105.2 (58,421 * 1.2).
  • Completeness – The rule passed because 100% of the records have non-null values for the fare amount column, exceeding the set threshold of the average of the last three runs times 90%.
  • DistinctValuesCount “ratecodeid” – The rule passed because the distinct count of 8 for the ratecodeid column is between the set threshold of 6, which is the average of the last three runs minus 1 ((7)/1 = 7 – 1), and 9, which is the average of the last three runs plus 2 ((7)/1 = 7 + 2).
  • DistinctValuesCount “pulocationid” – The rule passed because the distinct count of 201 for the pulocationid column is greater than 80% of the average of the last three runs, 160.8 (201 * 0.8).
  • ColumnCount – The rule passed because the number of columns, 19, is equal to the maximum of the last two runs.

Third job (second incremental)

After the successful completion of the first incremental run, you are ready for the second incremental run to process the file from day three. Complete the following steps:

  1. Navigate to the source data files under the prefix /raw-src/ in the S3 bucket starting with gluedataqualitydynamicrules-*.
  2. To simulate the second incremental run, copy the day three file 20220103.parquet under /raw-src/ to the /landing/nytaxi/ folder in the same S3 bucket.
  3. On the AWS Glue Studio console, repeat Steps 4–7 from the first (initial) job to run the job and validate data quality results.

The following screenshot shows the data quality results.

Similar to the second run, the data file from the source didn’t contain any data quality issues. As a result, all of the defined data validation rules were within the set thresholds and passed successfully.

Fourth job (third incremental)

Now that you have successfully completed the first three runs and observed the data quality results, you are ready for the final incremental run for this exercise, to process the file from day four. Complete the following steps:

  1. Navigate to the source data files under the prefix /raw-src/ in the S3 bucket starting with gluedataqualitydynamicrules-*.
  2. To simulate the third incremental run, copy the day four file 20220104.parquet under /raw-src/ to the /landing/nytaxi/ folder in the same S3 bucket.
  3. On the AWS Glue Studio console, repeat Steps 4–7 from the first (initial) job to run the job and validate the data quality results.

The following screenshot shows the data quality results.

In this run, there are some data quality issues from the source that were caught by the AWS Glue job, causing the rules to fail. Let’s examine each failed rule to understand the specific data quality issues that were detected:

  • CustomSql – The rule failed because only 80% of the records have a passenger_count greater than 0, which is lower than the set threshold of 90%.
  • Mean – The rule failed because the mean of trip_distance is 71.74, which is greater than 1.5 times the maximum of the last three runs, 11.565 (7.70 * 1.5).
  • Sum – The rule passed because the sum of total_amount is 1,165,023.73, which is between 80% of the minimum of the last three runs, 1,063,557.176 (1,329,446.47 * 0.8), and 120% of the maximum of the last three runs, 1,816,645.464 (1,513,871.22 * 1.2).
  • RowCount – The rule failed because the row count of 44,999 is not between 90% of the minimum of the last three runs, 52,578.9 (58,421 * 0.9), and 120% of the maximum of the last three runs, 88,334.1 (72,405 * 1.2).
  • Completeness – The rule failed because only 82% of the records have non-null values for the fare_amount column, which is lower than the set threshold of the average of the last three runs times 90%.
  • DistinctValuesCount “ratecodeid” – The rule failed because the distinct count of 6 for the ratecodeid column is not between the set threshold of 6.66, which is the average of the last three runs minus 1 ((8+8+7)/3 = 7.66 – 1), and 9.66, which is the average of the last three runs plus 1 ((8+8+7)/3 = 7.66 + 2).
  • DistinctValuesCount “pulocationid” – The rule passed because the distinct count of 205 for the pulocationid column is greater than 80% of the average of the last three runs, 165.86 ((216+201+205)/3 = 207.33 * 0.8).
  • ColumnCount – The rule passed because the number of columns, 19, is equal to the maximum of the last two runs.

To summarize the outcome of the fourth run: the rules for Sum and DistinctValuesCount for pulocationid, as well as the ColumnCount rule, passed successfully. However, the rules for CustomSql, Mean, RowCount, Completeness, and DistinctValuesCount for ratecodeid failed to meet the criteria.

Upon examining the Data Quality evaluation results, further investigation is necessary to identify the root cause of these data quality issues. For instance, in the case of the failed RowCount rule, it’s imperative to ascertain why there was a decrease in record count. This investigation should delve into whether the drop aligns with actual business trends or if it stems from issues within the source system, data ingestion process, or other factors. Appropriate actions must be taken to rectify these data quality issues or update the rules to accommodate natural business trends.

You can expand this solution by implementing and configuring alerts and notifications to promptly address any data quality issues that arise. For more details, refer to Set up alerts and orchestrate data quality rules with AWS Glue Data Quality (Part 4 in this series).

Clean up

To clean up your resources, complete the following steps:

  1. Delete the AWS Glue job.
  2. Delete the CloudFormation stack.

Conclusion

AWS Glue Data Quality offers a straightforward way to measure and monitor the data quality of your ETL pipeline. In this post, you learned about authoring a Data Quality job with dynamic rules, and how these rules eliminate the need to update static rules with ever-evolving source data in order to keep the rules current. Data Quality dynamic rules enable the detection of potential data quality issues early in the data ingestion process, before downstream propagation into data lakes, warehouses, and analytical engines. By catching errors upfront, organizations can ingest cleaner data and take advantage of advanced data quality capabilities. The rules provide a robust framework to identify anomalies, validate integrity, and provide accuracy as data enters the analytics pipeline. Overall, AWS Glue dynamic rules empower organizations to take control of data quality at scale and build trust in analytical outputs.

To learn more about AWS Glue Data Quality, refer to the following:


About the Authors

Prasad Nadig is an Analytics Specialist Solutions Architect at AWS. He guides customers architect optimal data and analytical platforms leveraging the scalability and agility of the cloud. He is passionate about understanding emerging challenges and guiding customers to build modern solutions. Outside of work, Prasad indulges his creative curiosity through photography, while also staying up-to-date on the latest technology innovations and trends.

Mahammadali Saheb is a Data Architect at AWS Professional Services, specializing in Data Analytics. He is passionate about helping customers drive business outcome via data analytics solutions on AWS Cloud.

Tyler McDaniel is a software development engineer on the AWS Glue team with diverse technical interests including high-performance computing and optimization, distributed systems, and machine learning operations. He has eight years of experience in software and research roles.

Rahul Sharma is a Senior Software Development Engineer at AWS Glue. He focuses on building distributed systems to support features in AWS Glue. He has a passion for helping customers build data management solutions on the AWS Cloud. In his spare time, he enjoys playing the piano and gardening.

Edward Cho is a Software Development Engineer at AWS Glue. He has contributed to the AWS Glue Data Quality feature as well as the underlying open-source project Deequ.

Entity resolution and fuzzy matches in AWS Glue using the Zingg open source library

Post Syndicated from Gonzalo Herreros original https://aws.amazon.com/blogs/big-data/entity-resolution-and-fuzzy-matches-in-aws-glue-using-the-zingg-open-source-library/

In today’s data-driven world, organizations often deal with data from multiple sources, leading to challenges in data integration and governance. AWS Glue, a serverless data integration service, simplifies the process of discovering, preparing, moving, and integrating data for analytics, machine learning (ML), and application development.

One critical aspect of data governance is entity resolution, which involves linking data from different sources that represent the same entity, despite not being exactly identical. This process is crucial for maintaining data integrity and avoiding duplication that could skew analytics and insights.

AWS Glue is based on the Apache Spark framework, and offers the flexibility to extend its capabilities through third-party Spark libraries. One such powerful open source library is Zingg, an ML-based tool, specifically designed for entity resolution on Spark.

In this post, we explore how to use Zingg’s entity resolution capabilities within an AWS Glue notebook, which you can later run as an extract, transform, and load (ETL) job. By integrating Zingg in your notebooks or ETL jobs, you can effectively address data governance challenges and provide consistent and accurate data across your organization.

Solution overview

The use case is the same as that in Integrate and deduplicate datasets using AWS Lake Formation FindMatches.

It consists of a dataset of publications, which has many duplicates because the titles, names, descriptions, or other attributes are slightly different. This often happens when collating information from different sources.

In this post, we use the same dataset and training labels but show how to do it with a third-party entity resolution like the Zingg ML library.

Prerequisites

To follow this post, you need the following:

Set up the required files

To run the notebook (or later to run as a job), you need to set up the Zingg library and configuration. Complete the following steps:

  1. Download the Zingg distribution package for AWS Glue 4.0, which uses Spark 3.3.0. The appropriate release is Zingg 0.3.4.
  2. Extract the JAR file zingg-0.3.4-SNAPSHOT.jar inside the tar and upload it to the base of your S3 bucket.
  3. Create a text file named config.json and enter the following content, providing the name of your S3 bucket in the places indicated, and upload the file to the base of your bucket:
{
    "fieldDefinition":[
            {
                    "fieldName" : "title",
                    "matchType" : "fuzzy",
                    "fields" : "fname",
                    "dataType": "\"string\""
            },
            {
                    "fieldName" : "authors",
                    "matchType" : "fuzzy",
                    "fields" : "fname",
                    "dataType": "\"string\""
            },
            {
                    "fieldName" : "venue",
                    "matchType" : "fuzzy",
                    "fields" : "fname",
                    "dataType": "\"string\""
            },
            {
                    "fieldName" : "year",
                    "matchType" : "fuzzy",
                    "fields" : "fname",
                    "dataType": "\"double\""
            }
    ],
    "output" : [{
            "name":"output",
            "format":"csv",
            "props": {
                    "location": "s3://<your bucket name>/matchOuput/",
                    "delimiter": ",",
                    "header":true
            }
    }],
    "data" : [{
            "name":"dblp-scholar",
            "format":"json",
            "props": {
                    "location": "s3://ml-transforms-public-datasets-us-east-1/dblp-scholar/records/dblp_scholar_records.jsonl"
            },
            "schema":
                    "{\"type\" : \"struct\",
                    \"fields\" : [
                            {\"name\":\"id\", \"type\":\"string\", \"nullable\":false},
                            {\"name\":\"title\", \"type\":\"string\", \"nullable\":true},
                            {\"name\":\"authors\",\"type\":\"string\",\"nullable\":true} ,
                            {\"name\":\"venue\", \"type\":\"string\", \"nullable\":true},
                            {\"name\":\"year\", \"type\":\"double\", \"nullable\":true},
                            {\"name\":\"source\",\"type\":\"string\",\"nullable\":true}
                    ]
            }"
    }],
    "numPartitions":4,
    "modelId": 1,
    "zinggDir": "s3://<your bucket name>/models"
}

You can also define the configuration programmatically, but using JSON makes it more straightforward to visualize and allows you to use it in the Zingg command line tool. Refer to the library documentation for further details.

Set up the AWG Glue notebook

For simplicity, we use an AWS Glue notebook to prepare the training data, build a model, and find matches. Complete the following steps to set up the notebook with the Zingg libraries and config files that you prepared:

  1. On the AWS Glue console, choose Notebooks in the navigation pane.
  2. Choose Create notebook.
  3. Leave the default options and choose a role suitable for notebooks.
  4. Add a new cell to use for Zingg-specific configuration and enter the following content, providing the name of your bucket:

%extra_jars s3://<your bucket>/zingg-0.3.4-SNAPSHOT.jar
%extra_py_files s3://<your bucket>/config.json
%additional_python_modules zingg==0.3.4

notebook setup cell

  1. Run the configuration cell. It’s important that this is done before running any other cell because the configuration changes won’t apply if the session is already started. If that happens, create and run a cell with the content %stop_session. This will stop the session but not the notebook, so when you run a cell will code, it will start a new one, using all the configuration settings you have defined at that moment.
    Now the notebook is ready to start the session.
  1. Create a session using the setup cell provided (labeled: “Run this cell to set up and start your interactive session”).
    After a few seconds, you should get a message indicating the session has been created.

Prepare the training data

Zingg enables providing sample training pairs as well as interactively defining them by an expert; in the latter, the algorithm finds examples that it considers meaningful and asks an expert if it’s a match, if it’s not, or if the expert can’t decide. The algorithm can work with a few samples of matches and non-matches, but the larger the training data, the better.

In this example, we reuse the labels provided in the original post, which assigns the samples to groups of rows (called clusters) instead of labeling individual pairs. Because we need to transform that data, we can convert it to the format that Zingg uses internally, so we skip having to configure the training samples definition and format. To learn more about the configuration that would be required, refer to Using pre-existing training data.

  1. In the notebook with the session started, add a new cell and enter the following code, providing the name of your own bucket:
bucket_name = "<your bucket name>"

spark.read.csv(
    "s3://ml-transforms-public-datasets-us-east-1/dblp-scholar/labels/dblp_scholar_labels_350.csv"
    , header=True).createOrReplaceTempView("labeled")

spark.sql("""
SELECT book.id as z_zid, "sample" as z_source, z_cluster, z_isMatch,
           book.title, book.authors, book.venue, CAST(book.year AS DOUBLE) as year, book.source
FROM(
    SELECT explode(pair) as book, *
    FROM(
        SELECT (a.label == b.label) as z_isMatch, array(struct(a.*), 
               struct(b.*)) as pair, uuid() as z_cluster
        FROM labeled a, labeled b 
        WHERE a.labeling_set_id = b.labeling_set_id AND a.id != b.id
))
""").write.mode("overwrite").parquet(f"s3://{bucket_name}/models/1/trainingData/marked/")
print("Labeled data ready")
  1. Run the new cell. After a few seconds, it will print the message indicating the labeled data is ready.

Build the model and find matches

Create and run a new cell with the following content:

sc._jsc.hadoopConfiguration().set('fs.defaultFS', f's3://{bucket_name}/')
sc._jsc.hadoopConfiguration().set('mapred.output.committer.class', "org.apache.hadoop.mapred.FileOutputCommitter")

from zingg.client import Arguments, ClientOptions, FieldDefinition, Zingg
zopts = ClientOptions(["--phase", "trainMatch",  "--conf", "/tmp/config.json"])
zargs = Arguments.createArgumentsFromJSON(zopts.getConf(), zopts.getPhase())
zingg = Zingg(zargs, zopts)
zingg.init()
zingg.execute()

Because it’s doing both training and matching, it will take a few minutes to complete. When it’s complete, the cell will print the options used.

If there is an error, the information returned to the notebook might not be enough to troubleshoot, in which case you can use Amazon CloudWatch. On the CloudWatch console, choose Log Groups in the navigation pane, then under /aws-glue/sessions/error, find the driver log using the timestamp or the session ID (the driver is the one with just the ID without any suffix).

Explore the matches found by the algorithm

As per the Zingg configuration, the previous step produced a CSV file with the matches found on the original JSON data. Create and run a new cell with the following content to visualize the matches file:

from pyspark.sql.functions import col
spark.read.csv(f"s3://{bucket_name}/matchOuput/", header=True) \
    .withColumn("z_cluster", col("z_cluster").cast('int')) \
    .drop("z_minScore", "z_maxScore") \
    .sort(col("z_cluster")).show(100, False)

It will display the first 100 rows with clusters assigned. If the cluster assigned is the same, then the publications are considered duplicates.

Athena results

For instance, in the preceding screenshot, clusters 0 or 20 are spelling variations of the same title, with some incomplete or incorrect data in other fields. The publications appear as duplicates in these cases.

As in the original post with FindMatches, it struggles with editor’s notes and cluster 12 has more questionable duplicates, where the title and venue are similar, but the completely different authors suggest it’s not a duplicate and the algorithm needs more training with examples like this.

You can also run the notebook as a job, either choosing Run or programmatically, in which case you want to remove the cell you created earlier to explore the output, as well as any other cells that are not needed to do the entity resolution, such as the sample cells provided when you created the notebook.

Additional considerations

As part of the notebook setup, you created a configuration cell with three configuration magics. You could replace these with the ones in the setup cell provided, as long as they are listed before any Python code.

One of them specifies the Zingg configuration JSON file as an extra Python file, even though it’s not really a Python file. This is so it gets deployed on the cluster under the /tmp directory and it’s accessible by the library. You could also specify the Zingg configuration programmatically using the library’s API, and not require the config file.

In the cell that builds and runs the model, there are two lines that adjust the Hadoop configuration. This is required because the library was designed to run on HDFS instead of Amazon S3. The first one configures the default file system to use the S3 bucket, so when it needs to produce temporary files, they are written there. The second one restores the default committer instead of the direct one that AWS Glue configures out of the box.

The Zingg library is invoked with the phase trainMatch. This is a shortcut to do both the train and match phases in one call. It works the same as when you invoke a phase in the Zingg command line that is often used as an example in the Zingg documentation.

If you want to do incremental matches, you could run a match on the new data and then a linking phase between the main data and the new data. For more information, see Linking across datasets.

Clean up

When you navigate away from the notebook, the interactive session should be stopped. You can verify it was stopped on the AWS Glue console by choosing Interactive Sessions in the navigation pane and then sorting by status, to check if any are running and therefore generating charges. You can also delete the files in the S3 bucket if you don’t intend to use them.

Conclusion

In this post, we showed how you can incorporate a third-party Apache Spark library to extend the capabilities of AWS Glue and give you the freedom of choice. You can use your own data in the same way, and then integrate this entity resolution as part of a workflow using a tool such as Amazon Managed Workflows for Apache Airflow (Amazon MWAA).

If you have any questions, please leave them in the comments.


About the Authors

Gonzalo Herreros is a Senior Big Data Architect on the AWS Glue team, with a background in machine learning and AI.

Emilio Garcia Montano is a Solutions Architect at Amazon Web Services. He works with media and entertainment customers and supports them to achieve their outcomes with machine learning and AI.

Noritaka Sekiyama is a Principal Big Data Architect on the AWS Glue team. He is responsible for building software artifacts to help customers. In his spare time, he enjoys cycling with his road bike.