Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Data Sources element not showing any data

Solved352 views8th January 2025#datasources #scripted connector Data API
2
Apurva Tandon [DevOps Advocate]1.53K 7th January 2025 0 Comments

Hi,
I have datasources script in python which runs fine and also I can see the element also got created, but when I click on that element it shows that no visible data pages available.
in http://localhost:34567/swagger/index.html when test on api/parameters I see that I get "Sequence contains no element" what can be the reason?

Apurva Tandon [DevOps Advocate] Selected answer as best 8th January 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
3
João Severino [SLC] [DevOps Catalyst]12.94K Posted 8th January 2025 0 Comments

Hi Apurva,

With DataAPI, an array symbolizes a table. If you have an array inside another array, we try to create a linked table with a foreign key relationship. This means that the "ServiceInvolved" property in your JSON would be a linked table, but because it does not have a key-value pair structure, it fails to resolve the parameter structure.

I did a quick local test and with your JSON I got the same error but if I adapt it not to include the "ServiceInvolved" property

{
"components": [{
"AlarmId": 3614501,
"ElementId": 290,
"ElementName": "Sky-News-TXCore",
"Severity": "Critical",
"ParameterDescription": "Memory Usage (Servers Info) sky-news-pi-ams",
"ParameterValue": "70.000000",
"StartTime": "/Date(1736263098000)/",
"ClusterName": "Contribution"
}, {
"AlarmId": 3614481,
"ElementId": 312,
"ElementName": "MUN-X20-FRM-003_1_2_4_19",
"Severity": "Critical",
"ParameterDescription": "Signal Loss (Decoder Services) 3/Auto First Service [239.202.1.4:5000] 3G-1BD",
"ParameterValue": "BLACK_FRAME",
"StartTime": "/Date(1736262135000)/",
"ClusterName": "Contribution"
}
] }

I get it to work with the following result

If you still want to keep the "ServiceInvolved" property I would suggest adapting the structure to be something more like

{
"components": [{
"AlarmId": 3614501,
"ElementId": 290,
"ElementName": "Sky-News-TXCore",
"Severity": "Critical",
"ParameterDescription": "Memory Usage (Servers Info) sky-news-pi-ams",
"ParameterValue": "70.000000",
"StartTime": "/Date(1736263098000)/",
"ServiceInvolved": "TX Core",
"ClusterName": "Contribution"
}, {
"AlarmId": 3614481,
"ElementId": 312,
"ElementName": "MUN-X20-FRM-003_1_2_4_19",
"Severity": "Critical",
"ParameterDescription": "Signal Loss (Decoder Services) 3/Auto First Service [239.202.1.4:5000] 3G-1BD",
"ParameterValue": "BLACK_FRAME",
"StartTime": "/Date(1736262135000)/",
"ServiceInvolved": "",
"ClusterName": "Contribution"
}
] }

And you would get something like

Apurva Tandon [DevOps Advocate] Selected answer as best 8th January 2025
0
José Silva [SLC] [DevOps Catalyst]1.32K Posted 8th January 2025 1 Comment

Hi Apurva,

I’m not sure if this will help with your debugging, but the error "Sequence contains no element" typically occurs when LINQ methods like .First(), .Single(), etc., are used on a collection that is either empty or null. These methods assume the collection contains at least one element and will throw this error if none are found.

To avoid this, it’s better to use .FirstOrDefault() or .SingleOrDefault(). These methods return null when no elements are present, allowing you to handle such cases more gracefully. After retrieving the result, you can add a check to see if it’s null or empty before proceeding with the logic.

Using this approach can help ensure your code is more robust and avoids unexpected exceptions when dealing with empty collections.

Apurva Tandon [DevOps Advocate] Posted new comment 8th January 2025
Apurva Tandon [DevOps Advocate] commented 8th January 2025

Hi,
In API on swagger I pass this type of JSON and still get Sequence contains no element cant figure out what issue
{ "components": [
{
"AlarmId": 3614501,
"ElementId": 290,
"ElementName": "Sky-News-TXCore",
"Severity": "Critical",
"ParameterDescription": "Memory Usage (Servers Info) sky-news-pi-ams",
"ParameterValue": "70.000000",
"StartTime": "/Date(1736263098000)/",
"ServiceInvolved": [
"TX Core"
],
"ClusterName": "Contribution"
},
{
"AlarmId": 3614481,
"ElementId": 312,
"ElementName": "MUN-X20-FRM-003_1_2_4_19",
"Severity": "Critical",
"ParameterDescription": "Signal Loss (Decoder Services) 3/Auto First Service [239.202.1.4:5000] 3G-1BD",
"ParameterValue": "BLACK_FRAME",
"StartTime": "/Date(1736262135000)/",
"ServiceInvolved": [

],
"ClusterName": "Contribution"
}
]
}

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin