I’m trying to access each value inside a record using field name. But getting an error which says record has no attribute value.
What is the correct approach to access and modify values in each record in a loop?
PIPELINE-
ERROR -
CODE -
for record in sdc.records:
try:
sdc.output.write(record.valuec"name"])
except Exception as e:
sdc.error.write(record, str(e))
DATA SOURCE - dev raw data source
{
"id":1,
"name": "anjay",
"company_name":"persistent"
}
{
"id":2,
"name": "Binjay",
"company_name":"persistnt"
}
{
"id":3,
"name": "Cinjay",
"company_name":"infosys"
}
{
"id":4,
"name": "Dinjay",
"company_name":"infsys"
}
{
"id":5,
"name": "Einnjay",
"company_name":"cisco"
}
{
"id":6,
"name": "Finjay",
"company_name":"sisco"
}