[FIX] Proposal for fixing datetime query examples (#110) #111
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.
Wanted to try address #110 :)
If it helps to save you some time.
I would also have changed the Wiki, but I can't easily fork it. I would have changed it to:
Query Syntax
The syntax for queries can be found by clicking on the
Filter Query (?)
label:The syntax is very similar to SQL except for how Dates are handled. Example query formats can be found below:
WHERE field_name IS NOT NULL
WHERE field_name <> 10
WHERE field_name = 'equals value'
WHERE field_name <> 'not equals'
WHERE my_map = '(a,1)'
WHERE my_map LIKE '%key_or_value%'
WHERE my_struct LIKE '%field_or_value%'
Note: List, Map, and Struct fields are automatically cast to String type for querying.
Note: The following datetime structures are accepted
yyyy/MM/dd
and the North AmericanMM/dd/yyyy
. (according to stackoverflowEscaping field names
You will need to escape field names with square brackets if they contain spaces or punctuation:
Running the query
The query can be entered in the Query Box located at the top of the UI:
To execute you may either hit Enter or click the Execute button. The grid below will be updated with your results. This can be verified by looking at the bottom-left side of the status bar which will show how many records have been filtered by the query:
The Clear button will only remove the filter from the results in the grid below and will not clear the query text that you have entered. You may hit the Esc key while editing the query to quickly clear any existing query filters.
It should be noted that queries will not run against the entire Parquet file but rather only the records that have been loaded into memory. For more information please see Query Scope.
Query Scope
Currently, queries that are run only apply to records that have been loaded into the application (First 1000 records by default). To run your queries against more records you must increase the Record Count so that more data from the Apache Parquet file is loaded into the application.
Loading more data into the application requires more RAM so this might become troublesome for really large files. See Tips For Large Files for some hints on how to deal with that.