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.

Can I overwrite an element of a list config?

See original GitHub issue

How can I overwrite the database.tables.name from students to people?

schema:
  database: school
  tables:
    - name: students
      fields:
        - name: string
        - class: int
    - name: exams

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
omrycommented, Feb 7, 2020

When overriding a list, you need to use the index like in the example below.

$ python examples/tutorial/5_composition/my_app.py schema=school schema.tables.0.name=people
db:
  driver: mysql
  pass: secret
  user: omry
schema:
  database: school
  tables:
  - fields:
    - name: string
    - class: int
    name: people
  - fields:
    - profession: string
    - time: data
    - class: int
    name: exams
ui:
  windows:
    create_db: true
    view: true
1reaction
timruhkopfcommented, May 5, 2022

Thank You very much!

I thought as much, but the plugin I used does not yet support the array unpacking properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

override list dictionalry element in FB hydra - Stack Overflow
Your key seems to be missing an element. try: 'preprocessing.steps_config.1.SeriesMaker.value_cols=[x, y]'. Or the equivalent:
Read more >
How to Replace a Element in Java ArrayList? - GeeksforGeeks
To replace an element in Java ArrayList, set() method of java.util. An ArrayList class can be used. The set() method takes two ...
Read more >
Replace Item in List in Python: A Complete Guide
The easiest way to replace an item in a list is to use the Python indexing syntax. Indexing allows you to choose an...
Read more >
Replace items of list except items that are member of another list
The easiest is to simply use Replace with a level specification of 1: ... (note that this will fail when li1 is itself...
Read more >
list — CMake 3.25.1 Documentation
The TRANSFORM sub-command does not change the number of elements in the list. If a <SELECTOR> is specified, only some elements will be...
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