This message was deleted.
# general
s
This message was deleted.
l
This has been fixed in Druid 28, so upgrading to Druid 28, or Druid 29 (soon to be released) would resolve it
a
Thanks Laksh. We are planning to upgrade to 27 shortly. I presume the issue persists in 27 as well. Are the release notes for older versions available? I wanted to check if there were any incompatible changes in the versions b/w v24.0.2 (our current version) and v27 (target upgrade version).
l
yes it is present in Druid 27 as well.
https://github.com/apache/druid/releases You can check the release notes of all the versions between 24 and 27 (i.e. for 25, 26 and 27). There’ll be explicit upgrade notes and incompatible changes sections, that you can see.
a
Thank you Laksh. I was looking at the archives page and couldn't find the release notes there. One more q: REPLACE INTO <TAB> OVERWRITE ... SELECT ... FROM <TAB_1> WHERE TIME_IN_INTERVAL(__time, '') UNION ALL SELECT ... FROM <TAB_2> WHERE TIME_IN_INTERVAL(__time, '') Above query is not supported in 24.0.2 even when the source tables are Druid tables. It fails with the exception that the UNION query contains a FILTER. Note that only the SELECT .. UNION ALL SELECT.. works. But it fails when we add the REPLACE INTO. Will this be supported in v27 or higher? Thanks, AR.
l
Sadly, nope 😞 But the functionality is definitely needed, so it should come soon enough
j
AR, in the meantime you might try using full outer join to do this ... it is the only way I know how to do it in an atomic operation short of the enhancements Laksh references.
Copy code
replace into wiki_test overwrite all
WITH "ext" AS (
  SELECT *
  FROM TABLE(
    EXTERN(
      '{"type":"http","uris":["<https://druid.apache.org/data/wikipedia.json.gz>"]}',
      '{"type":"json"}'
    )
  ) EXTEND ("isRobot" VARCHAR, "channel" VARCHAR, "timestamp" VARCHAR, "flags" VARCHAR, "isUnpatrolled" VARCHAR, "page" VARCHAR, "diffUrl" VARCHAR, "added" BIGINT, "comment" VARCHAR, "commentLength" BIGINT, "isNew" VARCHAR, "isMinor" VARCHAR, "delta" BIGINT, "isAnonymous" VARCHAR, "user" VARCHAR, "deltaBucket" BIGINT, "deleted" BIGINT, "namespace" VARCHAR, "cityName" VARCHAR, "countryName" VARCHAR, "regionIsoCode" VARCHAR, "metroCode" BIGINT, "countryIsoCode" VARCHAR, "regionName" VARCHAR)
)
SELECT
  coalesce(w.__time, TIME_PARSE("timestamp")) AS "__time",
  coalesce(u.isRobot, w.isRobot) as isRobot,
  coalesce(u.channel, w.channel) as channel,
  coalesce(u.flags, w.flags) as flags,
  coalesce(u.isUnpatrolled, w.isUnpatrolled) as isUnpatrolled,
  coalesce(u.page, w.page) as page,
  coalesce(u.diffUrl, w.diffUrl) as diffUrl,
  coalesce(u.added, w.added) as added,
  coalesce(u.comment, w.comment) as comment,
  coalesce(u.commentLength, w.commentLength) as commentLength,
  coalesce(u.isNew, w.isNew) as isNew,
  coalesce(u.isMinor, w.isMinor) as isMinor,
  coalesce(u.delta, w.delta) as delta,
  coalesce(u.isAnonymous, w.isAnonymous) as isAnonymous,
  coalesce(u."user", w."user") as "user",
  coalesce(u.deltaBucket, w.deltaBucket) as deltaBucket,
  coalesce(u.deleted, w.deleted) as deleted,
  coalesce(u.namespace, w.namespace) as namespace,
  coalesce(u.cityName, w.cityName) as cityName,
  coalesce(u.countryName, w.countryName) as countryName,
  coalesce(u.regionIsoCode, w.regionIsoCode) as regionIsoCode,
  coalesce(u.metroCode, w.metroCode) as metroCode,
  coalesce(u.countryIsoCode, w.countryIsoCode) as countryIsoCode,
  coalesce(u.regionName, w.regionName) as regionName
FROM "ext" u
full outer join wiki_test w on TIME_PARSE("timestamp") = w.__time
PARTITIONED BY DAY
a
Thanks John. Good suggestion. Will try it out. Thanks, AR.