Forum Replies Created

Page 5 of 8
  • davidcrossey

    Member
    July 5, 2022 at 12:00 am in reply to: How to install kxreaper?

    Hi cyhuang,

    Is kxreaper in your $QHOME/l64 directory?

    There is also some extra documentation here for starting kxreaper

    Hope this helps

  • davidcrossey

    Member
    July 5, 2022 at 12:00 am in reply to: dxATAlert table grown too big

    Hi cj,

    Alerts will be persisted to the HDB at end-of-day (EOD) in the standard AT workflow. For this to happen, you need to close out alerts via the Action Tracker.

    When EOD runs on your ds_actiontracker (AT) process, the closed alerts will be persisted to disk. You can wait to EOD, or optionally call dxATEOD[.z.D] on the AT process after alerts have been closed.

    More info on end of day here

    Kind regards,

    David

  • davidcrossey

    Member
    July 5, 2022 at 12:00 am in reply to: How to make externally-changed files tracked by Kx Developer

    Hi Darren,

    Developer has unidirectional change management with the OS. Only changes from the UI are reflected on disk, not the other way around.

    The current workflow to edit files outside of developer and have them be changed is git ops.

    You clone a separate copy of your repository, make your edits, commit and push. Then within Developer, do the reverse. You pull the changes to see them update in the tree.

  • davidcrossey

    Member
    July 5, 2022 at 12:00 am in reply to: dxATAlert table grown too big

    Hi cj,

    1. For this you will need to check the AT HDB directory on disk to find out if it exists; if it does then you should run some checks to determine if source of the type
    2. You would need to check the process log of the AT to see which HDB’s it’s tried to reload. In some misconfigurations it’s possible that an HDB outside of the AT workflow is being picked up and the AT is trying to connect to that permissioned HDB to reload (which it doesn’t have access to)

    Hope the above helps your initial investigation

  • davidcrossey

    Member
    July 5, 2022 at 12:00 am in reply to: Behavior of asc table

    Hi darrenwsun,

    Yes, this is expected behavior and we will update the documentation to reflect.

    Thanks for raising, I’ve created a GitHub issue for tracking.

    Kind regards,

    David

  • davidcrossey

    Member
    July 1, 2022 at 12:00 am in reply to: How to make externally-changed files tracked by Kx Developer

    Hi darrenwsun,

    It wouldn’t be very efficient for KX Developer to continually poll the filesystem for changes, so I presume KX Developer only refreshes it’s view of those files once one of the actions you’ve mentioned has been triggered.

    You would almost need your script to also cause an action in KX Developer via a hook.

    I’ll reach out internally to see if anyone is aware if this is possible, or if there is another option available.

  • Hi k-mambo,

    Do you mean if the data in the RDB contains data that has e.g. timestamps from multiple different dates, you’d want to save those down to their respective date partitions?

    If yes, you’d need to customize your RDB’s .u.end function .

    For example, instead of calling .Q.hdft (as default in r.q), you could instead write some logic to determine which dates you have for each table, then upsert on disk for each pair.

    You’d also need to handle enumeration, sorting, compression (where applicable) and adding attributes on disk post operation.

    To get a bit of an idea, check out some of the logic in w.q as mentioned here

  • davidcrossey

    Member
    June 30, 2022 at 12:00 am in reply to: select avg (ignore null)

    avg/min/max/sum where implemented similar to SQL92 as per the note here.

    From what I gather, there are some optimizations available for a vector that aren’t available for a slice, hence the functionality we see today, and trying to change this would be difficult now as you might, (and probably will) see different results in an existing system.

  • davidcrossey

    Member
    June 29, 2022 at 12:00 am in reply to: select avg (ignore null)

    Hi powerpeanuts,

    As per this note avg does ignore nulls for a single vector, so you could apply the average to each pair of values from each column as follows:

    q)t:([]c1:`a`b`c;c2:1 0N 2;c3:5 3 5) 
    q)update c4:avg each flip (c2;c3) from t 
    c1 c2 c3 c4 
    ------------ 
    a  1  5  3 
    b     3  3 
    c  2  5  3.5

    Hope this helps

  • davidcrossey

    Member
    June 29, 2022 at 12:00 am in reply to: Cartesian Products

    Q excels in generating and querying large datasets due to it’s capability of performing efficient vector based operations; you’ll see more benefit with Q the larger your dataset becomes.

    “Column Oriented SQL tables are organized as rows distributed across storage and operations apply to fields within a row. Q tables are column lists in contiguous storage and operations apply on entire columns.” – (Jeffry Borror, 0. Overview – Q for Mortals (kx.com))

    In terms of resources, there are a lot of options. Here are a few ideas to get started:

    Check out this blog for some more insight What Makes Time-Series Database kdb+ So Fast? | KX along with other material on code.kx.com, in particular whitepapers and the Community.

    The sales brochure and blog also contain a lot of useful information around performance.

    Hope you find this insightful

     

  • davidcrossey

    Member
    June 28, 2022 at 12:00 am in reply to: Cartesian Products

    Hi jn001,

    Welcome to the KX Community

    How are you currently generating your permutations?

    q)x:2 
    q)n:8 
    q)fac:{prd 1+til x} 
    q)p:`long$fac[n] xexp x; / max permutations 
    q)s:1+til p; / list of n permutations

    I.e. determining the actual number of permutations is easy in q

    q)fac[8] xexp 8 
    6.9849642471415143e+036

    However for each factor added, the list you will be creating will use a lot more ram so you could hit ‘wsfull depending on your machine size.

    In that case you might want to split up the calculations and iteratively calculate each before joining the results together (a kind of ‘map-reduce’ if you will.)

    Notes:

    • ‘fac’ taken from the phrases.
    • cross may also be of interest to you, for example creating the list of players and games they can participate in:
    q)x:2 
    q)n:4 
    q)flip `players`games!flip (1+til n) cross (1+til x) 
    players games 
    ------------- 
    1       1 
    1       2 
    2       1 
    2       2 
    3       1 
    3       2 
    4       1 
    4       2

    I hope this helps provoke some ideas and to kick of this thread

    David

  • davidcrossey

    Member
    June 28, 2022 at 12:00 am in reply to: Dashboard differences in edit mode

    Just to double check, after making the changes did you log in and back in?

    As a failback you could try clearing your browser cache/cookies, or use incognitio mode.

  • davidcrossey

    Member
    June 28, 2022 at 12:00 am in reply to: Dashboard differences in edit mode

    Check out the documentation here. There is a note just under the link above stating:

    “User configuration is saved on exiting the dashboard and will be available on next login.”

    Are you dragging your columns to re-order on the data grid, or using the ‘Configuration’ button? (top right in your screenshots)

    I would suggest trying the ‘Configuration’ option, exiting the dashboard and re-logging in to see if that resolves your issue.

    Hope this helps

  • davidcrossey

    Member
    June 27, 2022 at 12:00 am in reply to: Dashboard differences in edit mode

    Hi soldham,

    In non-edit mode, did you happen to press the save button?

    You may have saved a view state of the dashboard and this may be why you continue to see the old styling after editing the dashboard in edit mode.

    To pick up the new changes, you need to reset the viewstate in non-edit mode by pressing the “Reset View State” icon:

     

    If you are a KX Control user, you can also remove view states by deleting via the Control UI. The files have the naming convention of [guid-username], e.g.

     

    Hope this helps

  • davidcrossey

    Member
    May 17, 2022 at 12:00 am in reply to: how to download kx for personal use

    Hi wangbo223,

    You can request a personal licence by sending a request via trial@kx.com.

    Kind regards,

    David

Page 5 of 8