-
Notifications
You must be signed in to change notification settings - Fork 110
Fixed bug where nested json inside pandas wouldn't be ingested correctly #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1ef6c6d
Fixed bug where nested json inside pandas wouldn't be ingested correctly
AsafMah 9a7f33b
Update changelog
AsafMah ccd04ee
Format
AsafMah a51d4d1
Fixed test
AsafMah 5d04968
Fixed test
AsafMah 78ee00d
New logic
AsafMah 819b983
New logic
AsafMah 027433a
New logic
AsafMah 7bf9b98
New logic
AsafMah 60fc0f2
New logic
AsafMah 18d85ce
Update
AsafMah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -529,15 +529,20 @@ async def test_streaming_ingest_from_dataframe(self): | |
| "xtextWithNulls", | ||
| "xdynamicWithNulls", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: but column name is not correct anymore (not sure if the table is created ad-hoc or not) |
||
| ] | ||
| rows = [ | ||
| [0, "00000000-0000-0000-0001-020304050607", 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, "2014-01-01T01:01:01Z", "Zero", "Zero", "0", "00:00:00", None, ""] | ||
| ] | ||
|
|
||
| guid = uuid.uuid4() | ||
|
|
||
| dynamic_value = ["[email protected]", "[email protected]", "[email protected]"] | ||
| rows = [[0, str(guid), 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, "2014-01-01T01:01:01Z", "Zero", "Zero", "0", "00:00:00", None, dynamic_value]] | ||
| df = DataFrame(data=rows, columns=fields) | ||
| ingestion_properties = IngestionProperties(database=self.test_db, table=self.test_table, flush_immediately=True, data_format=DataFormat.CSV) | ||
| ingestion_properties = IngestionProperties(database=self.test_db, table=self.test_table, flush_immediately=True) | ||
| self.ingest_client.ingest_from_dataframe(df, ingestion_properties) | ||
|
|
||
| await self.assert_rows_added(1, timeout=120) | ||
|
|
||
| a = self.client.execute(self.test_db, f"{self.test_table} | where rowguid == '{guid}'") | ||
| assert a.primary_results[0].rows[0]["xdynamicWithNulls"] == dynamic_value | ||
|
|
||
| @pytest.mark.asyncio | ||
| async def test_streaming_ingest_from_blob(self, is_managed_streaming): | ||
| ingestion_properties = IngestionProperties( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should check explictly for json mapping and throw if not CSV or JSON or None
https://learn.microsoft.com/en-us/kusto/management/mappings?view=microsoft-fabric#supported-mapping-types