You’d want tensile strength rather than compressive. The trick is to anchor a counterweight out beyond your target distance and let it pull the weight of the cable up rather than building a tower. Think of swinging a ball on a string rather than building a skyscraper. Assuming a sufficiently sized counterweight you can support the weight of the anchoring cable plus whatever else you want to hang off of it (space dock, elevator terminus, etc.)
You’d want tensile strength rather than compressive. The trick is to anchor a counterweight out beyond your target distance and let it pull the weight of the cable up rather than building a tower. Think of swinging a ball on a string rather than building a skyscraper. Assuming a sufficiently sized counterweight you can support the weight of the anchoring cable plus whatever else you want to hang off of it (space dock, elevator terminus, etc.)