Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team, @rhall @xdshi @nthampi @shong @TRF
I have 100000 json files with these structure. Why i couldn't create the field names "absolute.acceleration" , is it comes under the special character.
How to fix them.? my json file encoding is UTF-8 when i check through notepad ++ , i tried changing in advance settings as well - couldn't create the column itself. ?
{
"absolute.acceleration": 0,
"ain.1": 0,
"ain.2": 0,
"ain.3": 0,
"ain.4": 0,
"alarm.event": false,
"alarm.mode.status": false,
"battery.voltage": 4.243,
"brake.acceleration": 0,
"bump.acceleration": 0,
"channel.id": 123258,
"device.temperature": 39,
"engine.ignition.status": true,
"external.powersource.voltage": 25.452
}
Thanks,
Prabuj
You cannot use "." characters in Talend column names, but that doesn't stop you from extracting the value. Call you column "MyColumn" and use the code I gave you as the JsonPath expression.
"MyColumn" is just as an example. This column name does not matter to the data it holds.
Are you trying to create the JSON key name or are you trying to create a Talend column name with the same name?
@rhall am trying to create the JSON key name
Let me know any method that work fine, to read the data from a schema like this and dump into postgresql
Thanks,
Prabuj
Use a tExtractJSON component and use notation like this....
"['absolute.acceleration']"
....when setting the JSON Query settings for each column
@rhall as you can see in the below screenshot : using Talend Enterprise edition 6.5.1
Can you show me step by step - How it can be achieved ? I have more than 200000 .json files with the same structure.
Here is the json file :
{
"absolute.acceleration": 0,
"ain.1": 0,
"ain.2": 0,
"ain.3": 0,
"ain.4": 28025,
"alarm.event": false,
"alarm.mode.status": false,
"battery.voltage": 4.141,
"brake.acceleration": 0.02,
"bump.acceleration": 0,
"channel.id": 12358,
"device.temperature": 38,
"engine.ignition.status": true,
"external.powersource.voltage": 27.852,
"external.powersource.voltage.range.outside.status": false,
"geofence.status": false,
"gnss.antenna.status": true,
"gnss.type": "glonass",
"gsm.signal.level": 33,
"gsm.sim.status": false,
"ibutton.code.1": "0",
"ibutton.connected.status": false,
"ident": "866710037899538",
"incline.event": false,
"internal.battery.voltage.limit.lower.status": false,
"internal.bus.supply.voltage.range.outside.status": false,
"movement.status": true,
"peer": "183.171.77.64:593282",
"position.altitude": 64,
"position.direction": 128.9,
"position.hdop": 0.6,
"position.latitude": 2.772788,
"position.longitude": 101.819083,
"position.satellites": 12,
"position.speed": 61.3,
"position.valid": true,
"protocol.id": 16,
"record.seqnum": 1594,
"server.timestamp": 15682389120.732349,
"shock.event": true,
"timestamp": 15682378419,
"turn.acceleration": 0.01,
"user.data.value.1": 0,
"user.data.value.2": 0,
"user.data.value.3": 0,
"user.data.value.4": 0,
"user.data.value.5": 0,
"user.data.value.6": -2,
"user.data.value.7": 0,
"user.data.value.8": 0
}
Thanks,
Prabuj
@prabuj27 i think this is a duplicate issue. I have replied with screenshots for the same in your previous issue
https://community.talend.com/t5/Design-and-Development/REG-Json-field-issue/m-p/202026#M110389
let me know if you need more information.
You cannot use "." characters in Talend column names, but that doesn't stop you from extracting the value. Call you column "MyColumn" and use the code I gave you as the JsonPath expression.
"MyColumn" is just as an example. This column name does not matter to the data it holds.