Skip to content

Commit

Permalink
remove pk
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jun 27, 2024
1 parent 53ce508 commit b74b523
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions datapackage_pipelines_budgetkey/pipelines/simpledb/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,13 +614,12 @@ def debug_source(source, debug):
)

def remove_pk(package: DF.PackageWrapper):
for res in package.pkg.descriptor['resources']:
schema = res.get('schema', {})
if 'primaryKey' in schema:
del schema['primaryKey']
yield package.pkg
for res in package:
res: DF.ResourceWrapper
schema = res.res.descriptor.get('schema')
if schema and 'primaryKey' in schema:
schema.pop('primaryKey')
yield res
yield from package

def get_flow(table, params, debug=False):
steps = []
Expand Down

0 comments on commit b74b523

Please sign in to comment.