i am using apache-pinot-0.11.0-SNAPSHOT-bin.. acco...
# troubleshooting
s
i am using apache-pinot-0.11.0-SNAPSHOT-bin.. according to the documentation https://docs.pinot.apache.org/v/release-0.11.0/users/user-guide-query/scalar-functions I configured the “queryConfig” : { “disableGroovy”: false } but seeing this error {“unrecognizedProperties”{“/queryConfig/disableGroovy”false},“status”:“Table offlinebookingwide_poc_OFFLINE successfully added”} does this property work or is there any issue
p
we have disabled groovy on our cluster because of security issue
s
documentation says u can enable just at a table level even if its disabled at cluster level.. does the disable feature you have even apply to this table level property
m
@Tim Santos ^^
p
@suraj sheshadri i am not sure about that, but please don't enable groovy. 🙏
s
ok sure will try the scalar function approach
thankyou 1
t
The table config override for groovy will take precedence over the cluster level config
Not sure why you got that error when creating the table. Can you post the full table config you used @suraj sheshadri? so i can take a closer look.
s
Copy code
{
  "tableName": "offlinebookingwide_poc",
  "queryConfig": {
    "disableGroovy": false
  },
  "segmentsConfig": {
    "replication": "2",
    "schemaName": "offlinebookingwide",
    "segmentPushType": "REFRESH"
  },
  "tableIndexConfig": {
    "invertedIndexColumns": [
      "dmp_segments",
      "zip_code",
      "day_of_week",
      "hour",
      "dma_code",
      "channel_id",
      "country",
      "state",
      "city",
      "is_spot_buy",
      "is_trc_kids",
      "local_timezone",
      "trc_business_model",
      "user_id",
      "trc_content_ratings",
      "tag_category",
      "channel_genre",
      "is_kids_directed",
      "is_spanish",
      "trc_content_type"
    ],
    "loadMode": "MMAP"
  },
  "tenants": {
    "broker": "DefaultTenant",
    "server": "DefaultTenant"
  },
  "tableType": "OFFLINE",
  "metadata": {}
}
p
The table config override for groovy will take precedence over the cluster level config
Should that not be allowed specifically for groovy as there was an open cve related to it?
m
Groovy is off by default. There are cases where one would like to use it, and in those cases, it is OK for them to try out. Typically use case is around rapid prototyping before you convert it into a scalar function and go to production.
p
Thinking out loud - we will have to figure out how we enforce to not allow users to create tables with groovy enabled without an explicit approval. This makes it easy for anyone to not realize the security implications and enable in production etc. with a self serve platform.
m
Well, the default is OFF. And there have been tons of asks for a way to enable them once we disabled (there are legit use cases for those). Any way to turn it ON must be controlled by the deployment owners (regardless of table level or cluster level).
@Tim Santos please help it document so folks on both sides of this ask are aware.
t
Btw @suraj sheshadri, the config was not working because the query config should be defined as:
Copy code
"query": {

}
👍 1
Let me fix the doc