标签: yandex-metrika

ClickHouse:如何以正确的方式存储 JSON 数据?

我要将数据从 PostgreSQL 数据库迁移到 Yandex 的 ClickHouse。源表中的字段之一是 JSON 类型 - 称为additional_data。因此,PostgreSQL允许我访问JSON属性中如SELECT ...查询与->>->等。

我需要相同的行为才能在 ClickHouse 存储中的结果表中保留。(即在选择查询和/或使用过滤和聚合子句时解析 JSON 的能力)

这是我CREATE TABLE ...在 ClickHouse 客户端中所做的:

create table if not exists analytics.events
(
    uuid UUID,
    ...,
    created_at DateTime,
    updated_at DateTime,
    additional_data Nested (
        message Nullable(String),
        eventValue Nullable(String),
        rating Nullable(String),
        focalLength Nullable(Float64)
        )
)
engine = MergeTree

ORDER BY (uuid, created_at)
PRIMARY KEY uuid;
Run Code Online (Sandbox Code Playgroud)

这是如何存储 JSON 可序列化数据的好选择?有任何想法吗?

也许最好将 JSON 数据存储为普通数据,String而不是 …

sql yandex yandex-metrika clickhouse

5
推荐指数
1
解决办法
3359
查看次数

Next.js、Styled-components 和 Yandex Metrica 会话重播

我正在使用 Next.js 和样式组件的项目中工作。在我的文件 [slug].tsx 中:

export default function ProductDetails({ product }: IProductDetailsProps) {
  const router = useRouter();

  if (router.isFallback) {
    return (
      <LoadingContainer>
        <ReactLoading color="#000" type="bubbles" />
      </LoadingContainer>
    );
  }

  return (
    <>
      {product._id ? (
        <>
          <Header />

          <Container>
            <ProductPath>
              <Link href="/">Home</Link>

              <Link href="/shop">Shop</Link>

              {product.categoryId && (
                <Link href={`/shop/${product.categoryId.slug}`}>
                  {product.categoryId.name}
                </Link>
              )}

              <span>{product.name}</span>
            </ProductPath>

            <ProductInfo product={product} />
          </Container>
        </>
      ) : (
        <Error>An unexpected error has occurred.</Error>
      )}
    </>
  );
}
Run Code Online (Sandbox Code Playgroud)

大多数标签来自 styled-components,例如:

export const LoadingContainer = styled.div`
  display: …
Run Code Online (Sandbox Code Playgroud)

typescript session-replay yandex-metrika styled-components next.js

5
推荐指数
1
解决办法
1669
查看次数

如何分析混淆的第 3 方库代码的泄漏痕迹

我发现了内存泄漏(使用 LeakCanary),但泄漏跟踪中的代码被混淆了。我对代码混淆没有太多经验,我想知道是否有办法对其进行反混淆,或者是否可以禁用第三个库代码的代码混淆?

我使用的第三个库代码是yandex-ads-sdk。泄漏痕迹:

2020-10-20 12:03:00.931 D/LeakCanary: ?
????
? GC Root: System class
?
?? com.yandex.metrica.impl.ob.dr class
?    Leaking: NO (a class is never leaking)
?    ? static dr.a
?                ~
?? com.yandex.metrica.impl.ob.dr instance
?    Leaking: UNKNOWN
?    Retaining 125 bytes in 5 objects
?    f instance of com.example.Application
?    ? dr.h
?         ~
?? com.yandex.metrica.impl.ob.bj instance
?    Leaking: UNKNOWN
?    Retaining 1538 bytes in 60 objects
?    q instance of com.example.MainActivity with mDestroyed = false
?    a …
Run Code Online (Sandbox Code Playgroud)

obfuscation android yandex-metrika leakcanary

2
推荐指数
1
解决办法
292
查看次数