Forum Discussion
Hi @SL12345 ,
Have you tried putting a groupByN snap behind it and as target field $Cars.
Regards
Jens
I need to correct my question … every JSON should have header “Cars”
{
"Cars":
{
"CompanyName": "TestCompany",
"CompanyAddress": "TestAddress",
"Brand": "BMW",
"Year": "2020",
"Fuel": "Petrol"
}
,
{
"Cars" :
{
"CompanyName": "TestCompany",
"CompanyAddress": "TestAddress",
"Brand": "Jaguar",
"Year": "2020",
"Fuel": "Diesel"
}
}
- Siva_Venna6 years agoContributor
Thanks @Spiro_Taleski @jcampion
For now I have used mapper snap and it worked.
In the mapper I have created(tablename+year) - abc_Date.now().getFullYear() - $tablename
Instead, if I create only date part as variable Date.now().getFullYear() - $year How to pass this in table name filed in Select snap?
Table name = ‘abc_’+$year ?- jcampion6 years agoNew Contributor III
Hi @Siva_Venna,
I think that would work. It seems like there’s a bug in the SQL snap’s expression evaluation where it’s choking on Date.now(), but if you already have the $year field I would think you can use ‘abc_’ + $year to get the tablename. Give it a try!- Judy
- Siva_Venna6 years agoContributor
I gave a try it did not work. Hope the fix will resolve the issue.