Skip to content

Commit

Permalink
Merge pull request #11230 from Azure/updatescriptingestion01
Browse files Browse the repository at this point in the history
Update ingestASimSampleData.py
  • Loading branch information
v-dvedak authored Oct 8, 2024
2 parents e7380c9 + 180ea6a commit 3bc4d79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .script/tests/asimParsersTest/ingestASimSampleData.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ def extract_event_vendor_product(parser_query,parser_file):
continue
print(f"Starting ingestion for sample data present in {file}")
asim_parser_url = f'{SENTINEL_REPO_RAW_URL}/{commit_number}/{file}'
print(f"Reading Asim Parser file from : {asim_parser_url}")
asim_parser = read_github_yaml(asim_parser_url)
parser_query = asim_parser.get('ParserQuery', '')
normalization = asim_parser.get('Normalization', {})
Expand All @@ -312,6 +313,7 @@ def extract_event_vendor_product(parser_query,parser_file):
SampleDataFile = f'{event_vendor}_{event_product}_{schema}_IngestedLogs.csv'
sample_data_url = f'{SENTINEL_REPO_RAW_URL}/{commit_number}/{SAMPLE_DATA_PATH}'
SampleDataUrl = sample_data_url+SampleDataFile
print(f"Sample data log file reading from url: {SampleDataUrl}")
response = requests.get(SampleDataUrl)
if response.status_code == 200:
with open('tempfile.csv', 'wb') as file:
Expand Down Expand Up @@ -388,4 +390,4 @@ def extract_event_vendor_product(parser_query,parser_file):
senddtosentinel(immutable_id,data_result,stream_name,flag)
else:
print(f"Table {table_name} is not supported for log ingestion")
continue
continue

0 comments on commit 3bc4d79

Please sign in to comment.