Comments (8)
Hi Paul,
Happy to see that you are using Deequ! Actually, histograms on numeric columns should work, I wrote a test for this here #96 .
Can you provide us with more details about the error that you are seeing?
Best,
Sebastian
from deequ.
@sscdotopen I was using the column profiler and the histogram analysis was only working with String and boolean columns. On further investigation I found this code in ColumnProfiler.scala
`
/* Identifies all columns, which:
*
- (1) have type string or boolean
- (2) have less than
lowCardinalityHistogramThreshold
approximate distinct values
*/
private[this] def findTargetColumnsForHistograms(
schema: StructType,
genericStatistics: GenericColumnStatistics,
lowCardinalityHistogramThreshold: Long)
: Seq[String] = {
val originalStringOrBooleanColumns = schema
.flatMap { field =>
if (field.dataType == StringType || field.dataType == BooleanType) {
Some(field.name)
} else {
None
}
}
.toSet
genericStatistics.approximateNumDistincts
.filter { case (column, _) => originalStringOrBooleanColumns.contains(column) }
.filter { case (column, _) =>
genericStatistics.typeOf(column) == String || genericStatistics.typeOf(column) == Boolean
}
.filter { case (_, count) => count <= lowCardinalityHistogramThreshold }
.map { case (column, _) => column }
.toSeq
}
`
from deequ.
I could be wrong, but it looks like the column profiler is filtering out the numeric columns before using the histogram class you wrote the test for. Thanks for the quick response btw. Deequ is pretty sweet so far
from deequ.
Ah, good find. You are right that we do not consider low-cardinality numeric columns as categorical here. Would you like to write a PR to fix this?
from deequ.
Ya, I'll write up a pr later today.
from deequ.
Cool, looking forward to that!
from deequ.
pr for fix #97
from deequ.
#97 merged. Closing issue
from deequ.
Related Issues (20)
- Compliance calculation result HOT 1
- numerical statistical indicators have lost precision
- [FEATURE] Supporing Aggregation metrics for a group
- [FEATURE] Filter condition is ignored when filtering records based on row-level checks HOT 5
- Anomaly checks when fails
- containsCreditCardNumber analyser constraint doesnt support for JCB credit card
- Performance impact when trying to generate profiling report for more than 200 columns HOT 2
- Is AggregateMatch type check supported in the library? HOT 1
- [FEATURE] Cross-building via Mill HOT 5
- How to use Deequ to implement a custom return result set and return the correct and incorrect number of each check result
- Java null pointer issue , while creating sparksession , with deequ jar
- [BUG] Spark 3.4 and Deequ breeze version conflict HOT 1
- [FEATURE] Can we enhance `VerificationSuite` to supports more than one Dataframe?
- Custom user analyzers
- Support for Custom SQL Execution in Deequ Library
- Question: DQ over time
- [FEATURE] Extend RatioOfSums to support other aggregations
- [FEATURE] Support Wilson Score Interval for RetainCompletenessRule
- [BUG] Row-level filtering marking the records as pass when null values are present in the column
- Why is `Distance` not an analyzer?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deequ.