question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to represent arrays contents in plugin definitions?

See original GitHub issue

Is there a more detailed way to define the plugin settings when theyre arrays/objects? I’m thinking of something like tap-csv that has a list of file definitions and the definition on the hub just assigns it as an array and describes the nested structured of each element in the description. Is there a way to describe these in more detail?

I know we already have the dot syntax for object like setting.sub_setting but is there a way to do that for arrays?

"setting": {
   "sub_setting": "x"
}

Like files.0.setting.sub_setting?

"files": [
  {
    "setting": {
         "sub_setting": "x"
      }
  }
]

I’m not sure if something like this already exists or if we would even want it if not but wanted to check. This was following a discussion in office hours about more detailed settings definitions.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
WillDaSilvacommented, Oct 23, 2022

Seems like we should be able to do setting[n].sub_setting.

@tayloramurphy @pnadolny13 Yeah, that can be done. Shouldn’t be difficult. We cannot, however, have an attribute name that starts with a digit*.


*Unless we’re being very pedantic, in which case I’d clarify that though we can have such an attribute, we wouldn’t be able to access it with the normal dot notation.

1reaction
pnadolny13commented, Oct 26, 2022

Closing this issue and moving the discussion to https://github.com/meltano/meltano/discussions/6237

Read more comments on GitHub >

github_iconTop Results From Across the Web

WordPress Development: Working with Arrays - WPMU Dev
First let's start by identifying exactly what an array is. Wikipedia defines an array as: “a data structure consisting of a collection of ......
Read more >
Render arrays | Render API | Drupal Wiki guide on Drupal.org
"Render Arrays" or "Renderable Arrays" are the building blocks of a Drupal page. A render array is an associative array which confirms to ......
Read more >
What is an Array in WordPress functions? - WPBeginner
In computer programming languages, an array is a special variable that can hold more than one value under a single name. It is...
Read more >
Better way to represent array in java properties file
I can suggest using delimiters and using the. String.split(delimiter). Example properties file: MON=0800#Something#Something1, Something2
Read more >
Working With Arrays In C#
The Array class in C# represents an array. This tutorial is an introduction to array and how to use arrays in C#.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found