Member since
07-05-2022
28
Posts
1
Kudos Received
4
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2510 | 09-19-2022 08:05 AM | |
843 | 09-16-2022 07:02 AM | |
1332 | 09-13-2022 02:22 AM | |
1412 | 09-12-2022 02:58 AM |
01-15-2024
05:35 AM
Hello everyone, I need help for a curl call with the Execute Stream Command processor. I can't use the invoke http processor because I need to bypass the SSL certificate check. the following request is made. Command Arguments --location;--insecure;--request;POST;--header;'Content-Type: application/json';--data-raw;'{\"username\": \"xxx\",\"password\": \"xxx\"}';https://99.9.99.999:8091/auth If i run the processor, i get the following output Attribute Values execution.command curl execution.command.args --location;--insecure;--request;POST;--header;'Content-Type: application/json';--data-raw;'{\"username\": \"xxx\",\"password\": \"xxx\"}';https://99.9.99.999:8091/auth execution.error % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 101 100 59 100 42 253 180 --:--:-- --:--:-- --:--:-- 433 FlowFile Content Bad Auth Request: Expecting value: line 1 column 1 (char 0) Does anyone have any idea how I can fix this? When I execute the command via the command line, I get the expected response. Thanks
... View more
Labels:
- Labels:
-
Apache NiFi
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
06:52 AM
Hi all, I would like to change the name of objects and add values to the following JSON file. [
{
"Ean": 4052269532309,
"Bestand": 0
},
{
"Ean": 4052269532316,
"Bestand": 0
},
{
"Ean": 4052269532323,
"Bestand": 0
}
] The result of my specification is not what I expect. JOLT Script: [
{
"operation": "shift",
"spec": {
"*": {
"Ean": "gtin",
"ean": "gtin",
"EAN": "gtin",
"EanCode": "gtin",
"EAN-Code": "gtin",
"EANCode": "gtin",
"Ausdr1": "gtin",
"Bestand": "qty",
"Menge": "qty",
"Stock": "qty",
"stock": "qty",
"Verfügbare Menge (Kennzahl)": "qty",
"Verfügbare Menge": "qty"
}
}
},
{
"operation": "modify-default-beta",
"spec": {
"update_date": "2022-11-03",
"supplier_name": "demo",
"file_name": "test"
}
}
] I get this result: {
"gtin" : [ 4052269532309, 4052269532316, 4052269532323 ],
"qty" : [ 0, 0, 0 ],
"update_date" : "2022-11-03",
"supplier_name" : "demo",
"file_name" : "test"
} I expect that: [
{
"gtin": 4052269532309,
"qty": 0,
"update_date" : "2022-11-03",
"supplier_name" : "demo",
"file_name" : "test"
},
{
"gtin": 4052269532316,
"qty": 0,
"update_date" : "2022-11-03",
"supplier_name" : "demo",
"file_name" : "test"
},
{
"gtin": 4052269532323,
",
"update_date" : "2022-11-03",
"supplier_name" : "demo",
"file_name" : "test"": 0,
"update_date" : "2022-11-03",
"supplier_name" : "demo",
"file_name" : "test"
}
] Does anyone have an idea how I can customize it? Thanks for help
... View more
Labels:
- Labels:
-
Apache NiFi
10-17-2022
11:23 PM
@ChuckE that's it. Thanks for your support in this case. Now, it works fine.
... View more
10-17-2022
12:03 AM
Hey @ChuckE Sorry for the delay. It doesn't work for me, I'm using the latest Jolt specification you provided and the entire json file, with individual objects and the array of objects from product. The single product object in a class does not become an array
... View more
10-13-2022
12:54 PM
I will try it. As you can see in the example, it can happen that a class within the classes summary, object product details can have an array of objects, or a single object. As you can see in the example, it can happen that a class within the classes Summary, Object Product Details can have an array of objects or a single object. And the Jolt Spec has no influence that a single object becomes an array.
... View more
10-13-2022
11:49 AM
This works not with a combination of single object and an array of objects for "product". It works for me only with a single object. For example {
"costc": 9638,
"sum_amount": 543,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "2764,000",
"sum_net": "2392,480",
"sum_margin": "2003,780",
"sum_costs_total": "388,700",
"sum_costs": "388,700",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "16,25",
"sum_costs_percent": "16,25",
"Classes": {
"ClassSummary": [
{
"class": 1102,
"sum_amount": 117,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "740,500",
"sum_net": "692,060",
"sum_margin": "552,385",
"sum_costs_total": "139,675",
"sum_costs": "139,675",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "20,18",
"sum_costs_percent": "20,18",
"ProductDetails": {
"Product": {
"id": 7992160,
"artnr": 32212,
"sum_amount": 16,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "80,000",
"sum_net": "74,770",
"sum_margin": "53,243",
"sum_costs_total": "21,527",
"sum_costs": "21,527",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "28,79",
"sum_costs_percent": "28,79",
"value": null
}
}
}
]
},
"date": "2022-10-06"
}
... View more
10-13-2022
04:57 AM
@ChuckEThanks for your explanation. I had also tested it with a simplified json file and it worked there. I have replaced the expected wildcards with the names of the objects to clarify the structure. And I still have no idea why it does not work [
{
"operation": "cardinality",
"spec": {
"*": {
"ClassSummary": {
"ProductDetails": {
"Product": "MANY"
}
}
}
}
}
]
... View more
10-12-2022
11:26 PM
@ChuckEIt does not work. I still get the same output as the input is. The single object is not yet treated as an array. Do you have another idea
... View more
10-12-2022
04:14 AM
Hello everyone. i need help. I have a JSON file which contains in an object either an array of other objects or a single object. This is the relevant object "Product": [ or "Product": { . How can I configure with the JOLT Transform processor to always expect an array in the object? The product object must always be treated as an array, even if it contains only a single object. {
"costc": 9638,
"sum_amount": 543,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "2764,000",
"sum_net": "2392,480",
"sum_margin": "2003,780",
"sum_costs_total": "388,700",
"sum_costs": "388,700",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "16,25",
"sum_costs_percent": "16,25",
"Classes": {
"ClassSummary": [
{
"class": 1102,
"sum_amount": 117,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "740,500",
"sum_net": "692,060",
"sum_margin": "552,385",
"sum_costs_total": "139,675",
"sum_costs": "139,675",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "20,18",
"sum_costs_percent": "20,18",
"ProductDetails": {
"Product": [
{
"id": 7992160,
"artnr": 32212,
"sum_amount": 16,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "80,000",
"sum_net": "74,770",
"sum_margin": "53,243",
"sum_costs_total": "21,527",
"sum_costs": "21,527",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "28,79",
"sum_costs_percent": "28,79",
"value": null
},
{
"id": 7794909,
"artnr": 32205,
"sum_amount": 7,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "56,000",
"sum_net": "52,340",
"sum_margin": "39,473",
"sum_costs_total": "12,867",
"sum_costs": "12,867",
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": "24,58",
"sum_costs_percent": "24,58",
"value": null
},
{
"class": 19174,
"sum_amount": 17,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "85,000",
"sum_net": "71,430",
"sum_margin": "71,430",
"sum_costs_total": 0,
"sum_costs": 0,
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": 0,
"sum_costs_percent": 0,
"ProductDetails": {
"Product": {
"id": 7925180,
"artnr": 6201,
"sum_amount": 17,
"sum_invitation": 0,
"sum_selfconsumption": 0,
"sum_loss": 0,
"sum_gross": "85,000",
"sum_net": "71,430",
"sum_margin": "71,430",
"sum_costs_total": 0,
"sum_costs": 0,
"sum_costs_invitation": 0,
"sum_costs_selfconsumption": 0,
"sum_costs_loss": 0,
"sum_costs_total_percent": 0,
"sum_costs_percent": 0,
"value": null
}
}
}
]
}
}
]
},
"date": "2022-10-06"
}
... View more
Labels:
- Labels:
-
Apache NiFi