Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/mapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1 class="title">Module <code>keboola.json_to_csv.mapping</code></h1>

for child_key, child_mapping in mapping.child_tables.items():
# TODO: use dynamic separator
key = f&#39;{key}_{child_key}&#39;
flat_mappings.update(_flatten_mapping(child_mapping, key))
new_key = f&#39;{key}_{child_key}&#39;
flat_mappings.update(_flatten_mapping(child_mapping, new_key))

return flat_mappings

Expand Down Expand Up @@ -283,8 +283,8 @@ <h2 id="attributes">Attributes</h2>

for child_key, child_mapping in mapping.child_tables.items():
# TODO: use dynamic separator
key = f&#39;{key}_{child_key}&#39;
flat_mappings.update(_flatten_mapping(child_mapping, key))
new_key = f&#39;{key}_{child_key}&#39;
flat_mappings.update(_flatten_mapping(child_mapping, new_key))

return flat_mappings

Expand Down Expand Up @@ -567,8 +567,8 @@ <h3>Methods</h3>

for child_key, child_mapping in mapping.child_tables.items():
# TODO: use dynamic separator
key = f&#39;{key}_{child_key}&#39;
flat_mappings.update(_flatten_mapping(child_mapping, key))
new_key = f&#39;{key}_{child_key}&#39;
flat_mappings.update(_flatten_mapping(child_mapping, new_key))

return flat_mappings

Expand Down
4 changes: 2 additions & 2 deletions src/keboola/json_to_csv/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def _flatten_mapping(mapping: 'TableMapping', key='') -> Dict:

for child_key, child_mapping in mapping.child_tables.items():
# TODO: use dynamic separator
key = f'{key}_{child_key}'
flat_mappings.update(_flatten_mapping(child_mapping, key))
new_key = f'{key}_{child_key}'
flat_mappings.update(_flatten_mapping(child_mapping, new_key))

return flat_mappings

Expand Down