Extracting rows

I am new to Knime but am trying to use it to manage my data, which is in Russian. At the moment, I can’t get JSONPath to show my JSON file as multiple rows (668) rather than 1. I have no background in programming- help appreciated!

This is the AI advice:

  1. Use the “JSON Reader” node to read the JSON data.
  2. Use the “JSON Path” node to extract the elements that will become individual rows. You can use JSON Path expressions to specify the data you want to extract.
  3. Use an “Ungroup” node to turn the extracted list into rows.
  4. If needed, use another “JSON Path” node to unpack the element-JSONs into multiple columns.

What does it mean “JSON Path expressions”?

Hi @drrarnold22,

welcome to Knime and feel rest assured you will find the support you need to resolve your challenges. In order to help you properly, would it be possible to share some sample data please?

Best
Mike

1 Like

Hi @drrarnold22

I did a search for you on the hub.

Look at this

Or on youtube

Br

1 Like

Thanks! Will check it out and post again if I have questions!

1 Like

Thanks!

This is what the data looks like:

{
“selection1”: [
{
“name”: “К Параду Победы готовы”,
“url”: “К Параду Победы готовы | Всероссийское казачье общество”,
“article”: “Казаки готовы принять участие в параде, посвященном 79-й годовщине Победы в Великой Отечественной войне. Тренировки на подмосковном полигоне в Алабино завершены.\nВпереди у казаков три главных репетиции, которые пройдут на Красной площади в ближайшие дни.\nНапомним, что 24 марта 130 казаков Всевеликого войска Донского отправились в Москву для подготовки к участию в главном параде страны.\nСтроевую подготовку и слаженность ребят отметил главнокомандующий Сухопутными войсками России Олег Салюков, который инспектирует тренировки парадных расчетов.\n25 апреля 2024 в 18:07\nВажные события\nЛучшим казачьим кадетским корпусом стал Новороссийский”,
“date”: “25 апреля 2024 в 18:07”
},
{
“name”: “Лучшим казачьим кадетским корпусом стал Новороссийский”,
“url”: “Лучшим казачьим кадетским корпусом стал Новороссийский | Всероссийское казачье общество”,
“article”: "В смотре-конкурсе «Лучший казачий кадетский корпус» в 2024 году первое место занял Новороссийский казачий кадетский корпус. Имя победителя стало известно на церемонии награждения, которая состоялась 25 апреля в Ставрополе.\nВидеоплеер\nhttps://vsko.ru/wp-content/uploads/2024/04/rolik.mp4\n00:00\n03:37\nСмотр-конкурс на звание «Лучший казачий кадетский корпус» проводится с 2010 года Министерством просвещения Российской Федерации под эгидой Совета при Президенте Российской Федерации по делам казачества.\nОператором мероприятия выступает «Институт изучения детства, семьи и воспитания».\nУчастников конкурса благословил митрополит Ставропольский и Невинномысский Кирилл.\nПриветственное слово помощника президента Российской

I need it to split so that each of the “name” entries is a separate row, rather than all being in the same row.

@mwiegand The video recommended to me worked. Next step is extracting the date and changing all those pesky spelt months into numbers…

I try to use ExtractDateandTime node, but I get this screen telling me there is no column called localdateandtime (even though I used column renamer to change the name to that specified)

image

Hi @drrarnold22 .

I think before that, first you have to convert data "25 апреля 2024 в 18:07” of field “date” do a date format.
Use

Br

Thanks for your help. I tried using this but it doesn’t recognize the date and time. I’m unsure how to change this so that it does.

My workflow:

Thanks. I tried doing this but it doesn’t automatically recognize the date and time. Here is my workflow so far:

And here is what I get when I try to configure the data:


image

Any ideas? Thanks, as always.

Hi @drrarnold22 .

You are trying to convert to date&time all other text fields.
Convert only you dateandtimefield.

As this thread is for extracting rows please open another one.

If you export and attach you wf and a sample of your data, Il try to have a look to help you.

Br

1 Like

Hi @drrarnold22,

glad to hear you already made some progress :+1: The JSON is not valid as the structure is incomplete. Can you share the sample JSON as an upload … maybe txt or whatever the upload feature allows to upload?

Best
Mike

2 Likes

I will mention you in the new thread- thanks! I did include a picture of the JSON above

Will open another one

Why a new thread? Did anything major changed on the subject / challenge to help you with?