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 90e4c9e commit 53ce508
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datapackage_pipelines_budgetkey/pipelines/simpledb/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,9 @@ def remove_pk(package: DF.PackageWrapper):
yield package.pkg
for res in package:
res: DF.ResourceWrapper
if res.res.descriptor.get('primaryKey'):
res.res.descriptor.pop('primaryKey')
schema = res.res.descriptor.get('schema')
if schema and 'primaryKey' in schema:
schema.pop('primaryKey')
yield res

def get_flow(table, params, debug=False):
Expand All @@ -629,7 +630,6 @@ def get_flow(table, params, debug=False):
search = params.get('search')
steps.append(DF.load(f'{source}/datapackage.json', limit_rows=10000 if debug else None))
steps.append(DF.update_resource(-1, description=description, name=table, search=search))
steps.append(DF.set_primary_key(None))

field_names = []
for field in fields:
Expand Down

0 comments on commit 53ce508

Please sign in to comment.