Member since
07-05-2022
28
Posts
1
Kudos Received
4
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2793 | 09-19-2022 08:05 AM | |
970 | 09-16-2022 07:02 AM | |
1506 | 09-13-2022 02:22 AM | |
1537 | 09-12-2022 02:58 AM |
04-09-2024
12:44 PM
1 Kudo
Have you tried not escaping you " with \" in your command line arguments?
... View more
03-14-2023
02:48 PM
Hey i need help to create a ksql table with A STRUCT as the element type of an ARRAY. Has everyone an idea. Input Stream: {
"GTIN": "4066136261834",
"PRODUCT_SKU": "UC_55.08_W08_900_black",
"SIZE_NAME": "34",
"CALC_SALES_PRICE": 199.90,
"SALES_PRICE": 199.90
} {
"GTIN": "4066136261846",
"PRODUCT_SKU": "UC_55.08_W08_900_black",
"SIZE_NAME": "36",
"CALC_SALES_PRICE": 199.90,
"SALES_PRICE": 199.90
} The expected result of the KTable should be: {
"PRODUCT_SKU":"UC_55.08_W08_900_black",
"variants":[
{
"GTIN":"4066136261834",
"SIZE_NAME":"34",
"CALC_SALES_PRICE":199.90,
"SALES_PRICE":199.90
},
{
"GTIN":"4066136261846",
"SIZE_NAME":"36",
"CALC_SALES_PRICE":199.90,
"SALES_PRICE":199.90
}
]
}
... View more
Labels:
- Labels:
-
Apache Kafka
11-03-2022
07:40 AM
Try that: [
{
"operation": "shift",
"spec": {
"*": {
"Ean": "[&1].gtin",
"ean": "[&1].gtin",
"EAN": "[&1].gtin",
"EanCode": "[&1].gtin",
"EAN-Code": "[&1].gtin",
"EANCode": "[&1].gtin",
"Ausdr1": "[&1].gtin",
"Bestand": "[&1].qty",
"Menge": "[&1].qty",
"Stock": "[&1].qty",
"stock": "[&1].qty",
"Verfügbare Menge (Kennzahl)": "[&1].qty",
"Verfügbare Menge": "[&1].qty"
}
}
}, {
"operation": "modify-default-beta",
"spec": {
"*": {
"update_date": "2022-11-03",
"supplier_name": "demo",
"file_name": "test"
}
}
}
] Greetings
... View more
10-17-2022
11:23 PM
@ChuckE that's it. Thanks for your support in this case. Now, it works fine.
... View more
09-19-2022
08:05 AM
Hi @SAMSAL, thanks, i have try this out and it works. I thought you can directly edit the value of the JSON file. Now I have to merge all split JSON files into one again
... View more
09-18-2022
10:58 AM
Hi, It doesnt seem like "Stuff" function is recognized function through the QueryRecord sql. I think you have two options: 1- If you are dumping this data into a database where you can use the stuff function there then delegate this to SQL before storing\processing the data. 2- Instead of trying to use QueryRecord processor I would try and use the JoltTransformJson with the following spec: [
{
"operation": "modify-overwrite-beta",
"spec": {
"*": {
"tempStart": "=split('', @(1,start_time))",
"tempEnd": "=split('', @(1,start_end))",
"start_time": "=concat(@(1,tempStart[0]),@(1,tempStart[1]),':',@(1,tempStart[2]),@(1,tempStart[3]))",
"start_end": "=concat(@(1,tempEnd[0]),@(1,tempEnd[1]),':',@(1,tempEnd[2]),@(1,tempEnd[3]))"
}
}
},
{
"operation": "remove",
"spec": {
"*": {
"temp*": ""
}
}
}
] Not sure how this will perform with large dataset but its worth testing. Hope that helps, if it does please accept solution. Thanks
... View more
09-16-2022
07:02 AM
I have found a solution. I use in the Query Record Processor the sql function substring and it worked as expected for my case SELECT
SUBSTRING("Interval start", 12, 5) as "start_time"
FROM FLOWFILE store_id date start_time end time out 1005 20220915 00:00 00:15 0
... View more
09-13-2022
02:22 AM
The Nifi Processor ConvertCharacterSet helps. I use this before the Nifi Processor convert csv to json
... View more
09-12-2022
07:38 AM
Hi, I dont think you need the asterisk "*" in the spec, since you need it on the first level and you dont need to reference any other fields. Just have your spec as follows: [
{
"operation": "modify-default-beta",
"spec": {
"target.organisation": "${target.organisation}"
}
}
]
... View more
09-12-2022
02:58 AM
I have found the solution, for the changing parts of the url https://mycompany\.my\.app/api/public/v1/organisations/([0-9a-z]+)/detailedLaborcosts.*
... View more