Skip to content
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

Starburst/Trino integration not working properly #10326

Closed
ishtartec opened this issue Apr 18, 2024 · 2 comments
Closed

Starburst/Trino integration not working properly #10326

ishtartec opened this issue Apr 18, 2024 · 2 comments

Comments

@ishtartec
Copy link
Contributor

Hi!,
when ingesting the audit data from Starburst, the integration fails silently with the following error:

- Error while parsing TrinoJoinedAccessEvent: 1 validation error for TrinoJoinedAccessEvent
create_time
  none is not an allowed value (type=type_error.none.not_allowed)

This integration executes a query that returns a create_time field with a DateTime format, but the code only returns the value if it is an string:

To fix this, I have slightly modified the code to return a value if the value is a DateTime type:

def _convert_str_to_datetime(self, v):
        if isinstance(v, str):
            isodate = parser.parse(v)  # compatible with Python 3.6+
            return isodate
        if isinstance(v, datetime):
            return v

After this change, the integration works as expected.

Should I PR this or is it enough with this issue?

Thanks!

@pedro93
Copy link
Collaborator

pedro93 commented Apr 18, 2024

Hello Sergio.

Please open a PR. cc @hsheth2

@hsheth2
Copy link
Collaborator

hsheth2 commented Apr 22, 2024

Closed by #10345

@hsheth2 hsheth2 closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants