I did a fresh installation of the dashboard and created the data source from the opensearch-dashboard UI. During the creation I observed that we need to configure a master key. I modified the opensearch.yaml to include the master key as discribed in sql/docs/user/ppl/admin/datasources.rst at main · opensearch-project/sql · GitHub. This resolved the issue.