Skip to content

Commit

Permalink
fix(ingest/abs): detect jsonl schema (datahub-project#11775)
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylJonny authored Dec 11, 2024
1 parent 54d53cf commit e6cc676
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metadata-ingestion/src/datahub/ingestion/source/abs/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ def get_fields(self, table_data: TableData, path_spec: PathSpec) -> List:
).infer_schema(file)
elif extension == ".json":
fields = json.JsonInferrer().infer_schema(file)
elif extension == ".jsonl":
fields = json.JsonInferrer(
max_rows=self.source_config.max_rows, format="jsonl"
).infer_schema(file)
elif extension == ".avro":
fields = avro.AvroInferrer().infer_schema(file)
else:
Expand Down

0 comments on commit e6cc676

Please sign in to comment.